Eclipse使用手册
Eclipse IDE开发环境使用教程说明书

iAbout the T utorialEclipse is an integrated development environment (IDE) for Java and other programming languages like C, C++, PHP, and Ruby etc. Development environment provided by Eclipse includes the Eclipse Java development tools (JDT) for Java, Eclipse CDT for C/C++, and Eclipse PDT for PHP, among others.This tutorial will teach you how to use Eclipse in your day-2-day life while developing any software project using Eclipse IDE. We will give special emphasis on Java project. AudienceThis tutorial has been prepared for beginners to help them understand basic functionality of Eclipse tool. After completing this tutorial, you will find yourself at a moderate level of expertise in using Eclipse IDE from where you can take yourself to next levels. PrerequisitesWe assume you are going to use Eclipse IDE to handle all levels of Java projects development. So it will be good if you have knowledge of software development using any programming language specially Java programming.Copyright & Disclaimer© Copyright 2015 by Tutorials Point (I) Pvt. Ltd.All the content and graphics published in this e-book are the property of Tutorials Point (I) Pvt. Ltd. The user of this e-book can retain a copy for future reference but commercial use of this data is not allowed. Distribution or republishing any content or a part of the content of this e-book in any manner is also not allowed without written consent of the publisher. We strive to update the contents of our website and tutorials as timely and as precisely as possible, however, the contents may contain inaccuracies or errors. Tutorials Point (I) Pvt. Ltd. provides no guarantee regarding the accuracy, timeliness or completeness of our website or its contents including this tutorial. If you discover any errors on our website or inthistutorial,******************************************iT able of ContentsAbout the Tutorial (i)Audience (i)Prerequisites (i)Copyright & Disclaimer (i)Table of Contents .................................................................................................................................... i i 1.OVERVIEW (1)What is Eclipse? (1)Licensing (1)Eclipse Releases (1)2.INSTALLATION (3)Downloading Eclipse (3)Installing Eclipse (3)Launching Eclipse (4)3.EXPLORE WINDOWS (5)Parts of an Eclipse Window (5)Using Multiple Windows (6)4.EXPLORE MENUS (7)Typical Eclipse Menus (7)Brief Description of Menus (8)Customizing Menus (8)5.EXPLORE VIEWS (9)About Views (9)Organizing Views (9)Moving Views (9)Creating View Folders (10)Opening a view (10)6.PERSPECTIVES (13)What is a Perspective? (13)Opening a Perspective (13)Switching between Perspectives (13)Closing a Perspective (14)Customizing a Perspective (14)7.WORKSPACES (16)About Eclipse Workspace (16)UI Elements for Managing the Workspace (16)8.CREATE JAVA PROJECT (18)Opening the New Java Project wizard (18)Using the New Java Project wizard (18)Viewing the Newly Created Project (20)9.CREATE JAVA PACKAGE (21)Opening the New Java Package wizard (21)Using the New Java Package Wizard (21)Viewing the Newly Created Package (22)10.CREATE JAVA CLASS (23)Opening the New Java Class Wizard (23)Using the New Java Class Wizard (23)Viewing the Newly Created Java class (24)11.CREATE JAVA INTERFACE (25)Opening the New Java Interface Wizard (25)Using the New Java Interface Wizard (25)Viewing the Newly Created Java Interface (26)12.CREATE XML FILE (27)Opening the New XML File wizard (27)Using the New XML File wizard (28)Viewing the Newly Created XML File (29)13.JAVA BUILD PATH (30)Setting the Java Build Path (30)14.RUN CONFIGURATION (31)Creating and Using a Run Configuration (31)15.RUNNING A PROGRAM (33)Running a Java Program (33)16.CREATE JAR FILES (35)Opening the Jar File wizard (35)Using the Jar File wizard (35)17.CLOSE PROJECT (37)Why Close a Project? (37)How to Close a Project? (37)Closed Project in Package Explorer (38)18.REOPEN PROJECT (39)Reopening a Closed Project (39)19.BUILD PROJECT (40)Building a Java Project (40)20.DEBUG CONFIGURATION (42)Creating and Using a Debug Configuration (42)21.DEBUGGING A PROGRAM (44)Debugging a Java Program (44)22.PREFERENCES (48)Setting Preferences (48)23.CONTENT ASSIST (50)Using Content Assist (50)24.QUICK FIX (52)Using Quix Fix (52)25.HOVER HELP (54)Using Hover Help (54)26.SEARCH MENU (56)Searching the Workspace (56)27.NAVIGATION (58)Navigating the Eclipse Workspace (58)Open Type (58)Open Type in Hierarchy (60)Open Resource (61)28.REFACTORING (63)Refactoring using Eclipse (63)29.ADD BOOKMARKS (64)About Bookmarks (64)Adding a Bookmark (64)Opening the Bookmarks View (64)Using the Bookmarks View (65)30.TASK MANAGEMENT (66)Managing Tasks (66)Opening the Tasks View (67)Using the Tasks View (67)31.INSTALL PLUGINS (69)Locating and Installing Plug-ins (69)32.CODE TEMPLATES (73)Using Code Templates (73)Modifying/Adding code templates (74)33.SHORTCUTS (75)About Shortcuts (75)34.RESTART OPTION (78)Restarting Eclipse (78)35.TIPS & TRICKS (79)36.WEB BROWSERS (81)Internal Web Browser (81)Eclipse 7What is Eclipse?In the context of computing, Eclipse is an integrated development environment (IDE) for developing applications using the Java programming language and other programming languages such as C/C++, Python, PERL, Ruby etc.The Eclipse platform which provides the foundation for the Eclipse IDE is composed of plug-ins and is designed to be extensible using additional plug-ins. Developed using Java, the Eclipse platform can be used to develop rich client applications, integrated development environments, and other tools. Eclipse can be used as an IDE for any programming language for which a plug-in is available.The Java Development Tools (JDT) project provides a plug-in that allows Eclipse to be used as a Java IDE, PyDev is a plugin that allows Eclipse to be used as a Python IDE, C/C++ Development Tools (CDT) is a plug-in that allows Eclipse to be used for developing application using C/C++, the Eclipse Scala plug-in allows Eclipse to be used an IDE to develop Scala applications and PHPeclipse is a plug-in to eclipse that provides complete development tool for PHP.LicensingEclipse platform and other plug-ins from the Eclipse foundation is released under the Eclipse Public License (EPL). EPL ensures that Eclipse is free to download and install. It also allows Eclipse to be modified and distributed.Eclipse ReleasesEvery year, since 2006, the Eclipse foundation releases the Eclipse Platform and a number of other plug-ins in June.1.Eclipse8Eclipse 9Downloading EclipseYou can download eclipse from /downloads/. The download page lists a number of flavors of eclipse.The capabilities of each packaging of eclipse are different. Java developers typically use Eclipse Classic or Eclipse IDE for developing Java applications.The drop down box in the right corner of the download page allows you to set the operating system on which eclipse is to be installed. You can choose between Windows, Linux and Mac. Eclipse is packaged as a zip file.Installing EclipseTo install on windows, you need a tool that can extract the contents of a zip file. For example you can use:∙7-zip ∙PeaZip ∙ IZArcUsing any one of these tools, extract the contents of the eclipse zip file to any folder of your choice.2.Launching EclipseOn the windows platform, if you extracted the contents of the zip file to c:\, then you can start eclipse by using c:\eclipse\eclipse.exeWhen eclipse starts up for the first time it prompts you for the location of the workspace folder. All your data will be stored in the workspace folder. You can accept the default or choose a new location.1011If you select "Use this as the default and do not ask again", this dialog box will not come up again. You can change this preference using the Workspaces Preference Page. See the Preference tutorialpage for more details.Eclipse 12Parts of an Eclipse WindowThe major visible parts of an eclipse window are:∙Views ∙Editors (all appear in one editor area) ∙Menu Bar ∙ ToolbarAn eclipse perspective is the name given to an initial collection and arrangement of views and an editor area. The default perspective is called java. An eclipse window can have multiple perspectives open in it but only one perspective can be active at any point of time. A user can switch between open perspectives or open a new perspective. A perspective controls what appears in some menus and tool bars.3.EclipseA perspective has only one editor area in which multiple editors can be open. The editor area is usually surrounded by multiple views. In general, editors are used to edit the project data and views are used to view the project metadata. For example, the package explorer shows the java files in the project and the java editor is used to edit a java file.The eclipse window can contain multiple editors and views but only one of them is active at any given point of time. The title bar of the active editor or view looks different from all the others.The UI elements on the menu bar and tool bar represent commands that can be triggered by an end user.Using Multiple WindowsMultiple Eclipse Windows can be open at the same time. To open a new window, click on the Windows menu and select the New Window menu item.Each window can have a different perspective open in them. For example you could open two Eclipse windows one in the Java perspective and the other in the Debug perspective. The window showing the Java perspective can be used for editing the java code and the window showing the debug perspective can be used for debugging the application being developed.13Eclipse 14T ypical Eclipse MenusThe typical menus available on the menu bar of an Eclipse window are:∙File menu ∙Edit menu ∙Navigate menu ∙Search menu ∙Project menu ∙Run menu ∙Window menu ∙ Help menu4.Plug-ins can add new menus and menu items. For example when the java editor is open, you will see the Source menu and when the XML editor is open, you will see the Design menu. Brief Description of Menus15Customizing MenusThe visible menu items on a menu depend on the installed plug-ins and customization done using the Customize Perspective dialog box.16Eclipse 17About ViewsEclipse views allow users to see a graphical representation of project metadata. For example the project navigator view presents a graphical representation of the folders and files associated with a project and properties view presents a graphical representation of an element selected in another view or editor.An eclipse perspective can show any number of views and editors. All editor instances appear in a single editor area, whereas views are placed inside view folders. A workbench window can display any number of view folders. Each view folder can display one or more views. Organizing ViewsThe following picture shows four views arranged in a view folder.The picture given below shows the same four views arranged in two view folders.5.Moving ViewsTo move a view from one view folder to another, just click on the view title and drag to the title bar area of another view folder. The green line shown below is a result of dragging the title bar of the Properties view from one view folder to the title bar area of another view folder. The Properties view can be moved to where the green line is by releasing the mouse button and sending out a drop event.Creating View FoldersView folders can be dynamically created by dragging the title bar of a view to anywhere outside the editor area and title bar of another view folder. As you drag the title bar around, green lines will indicate where exactly the new view folder will be created.Moving the drag icon to the bottom of a window allows you to create a view folder that spans the entire width of the window. Moving the drag icon to the left or right edge of window allows you to create a view folder that spans the entire height of the window.18Opening a viewTo open a view, click on the Window menu and select the Show View menu item.19Clicking on the Other menu item brings up the Show View dialog box that allows you to locate and activate a view.20The views are organized by category. To quickly locate a view, just type the name of a view into the filter text box. To open a view, select it and click on the OK button. The subsequent pages of this tutorial introduce you to a number of useful views.21End of ebook previewIf you liked what you saw…Buy it from our store @ https://22。
Eclipse版设计器使用说明

一、新建DeviceOne项目:
1.点击如图所示按钮,在弹出的菜单中选择DeviceOneProject
2.填写项目名称、选择开发语言为JavaScript或Lua、选择适合的屏幕尺寸后点击finish,
如果不是登陆状态,新建项目时需先登陆
3.新建成功后在左侧workspace即会创建项目树,如果需要配置组件,在网页的项目配置
中完成选择后,点击设计器中同步组件按钮即可将组件同步到设计器中;找到项目树里
的入口页面index.ui即可开始编程
二、项目调试及打包:
1.当项目开发完成后,想查看在移动端的真实效果,首先需要点击BuildDebugVersion按钮
打出一个调试包
2.下载并安装在移动端后,在设计器控制台的service右键新建一个服务,选择要调试的项
目,并启动服务,将提示的IP地址和端口号以192.168.1.83:9399的形式输入到移动端调试页面的ip地址处,再点击调试页面的更新即可取得设计器中的项目代码
3.需要将项目打包成安装版本,只需点击设计器中的Build Single Version按钮即可进行打包
三、新建UI页面
在需要创建文件的文件夹右键,点击new选择other下的DeviceOne,单击想要新建的文件类型并填写文件名称即可完成创建。
Eclipse使用指南

Eclipse使用指南(北京)技术有限公司1 修订记录2 目录1修订记录 (1)2目录 (1)3概述 (1)4基本操作 (1)4.1常用的快捷键 (1)4.2设置T ask (2)4.3eclipse.ini配置 (2)4.4代码模板 (2)5插件 (3)5.1Subversion插件 (3)5.2Tomcat插件 (4)6常见问题解答 (4)6.1Javaw.exe启动有问题 (4)6.2Ant不能执行 (4)6.3ant超时解决办法 (4)7参考资源 (5)7.1插件地址 (5)3 概述本文是关于Eclipse的使用指南。
内容包括:eclipse配置、快捷键的使用、使用建议、代码模版的配置、相关参考资源等。
4 基本操作4.1 常用的快捷键它可以大大的增强您的开发效率,要想成为高手的必备技能之一。
对于一个仅仅知道几个快捷键的选手,不要急于一天就能掌握所有的操作。
可以每天重点使用几个,对于一个java程序员,几周就可以熟练掌握。
1. Alt+shift+s 操作source源代码的一些方式2. F4 查看类的结构和继承关系3.可以用Ctrl+shift+L可以查阅,它能增加巨大的效率。
4. Ctr+H:查找具体的类5. F3 :等价于Ctr+被选中的某个单词6.Ctrl+/:可以在选中一定的区域后,可以直接的全部加上注释。
Ctrl + shift +/可以注释块。
7. Tab+shift:按钮可以跳tab距离。
8.全部选中+tab:可以向前跳置tab的距离。
9. F5和F6:是常用的调试按钮。
非常的有用。
10.F4:在选中的类中可以查看类图的集成结构。
11.Shift+鼠标右键,可以选择一行,比直接的按住右键好用多了。
12.Ctr + Shift + o organize import 非常的好用。
13.Ctr + o Quick outline14.Ctr + Shift + e 在单独的窗口中。
Eclipse使用新手教程

Eclipse使⽤新⼿教程说起java的IDE,朗朗上⼝的⽆⾮是Eclipse了,假若能熟练Eclipse,对于我们编写java程序会起到事半功倍的效果,⼤⼤提⾼我们⼯作效率。
因此本篇博⽂,笔者仅仅是针对刚刚⼊门java的新⼿,以便他们能尽快掌握Eclipse的使⽤。
1. 经常使⽤快捷键这是使⽤⼯具的第⼀步,熟练使⽤快捷键对于我们编敲代码会起到相当⼤帮助,所以这⾥笔者列出的快捷键建议⼤家必须都掌握。
Ctrl + ⿏标左键(类、⽅法、属性的变量名词):定位跟踪某变量声明或定义的位置Ctrl + S:保存当前⽂件Ctrl + X:剪切Ctrl + C:复制Ctrl + V:粘贴Ctrl + D:删除当前⾏Ctrl + F:查找/替换(当前编辑窗体)Ctrl + H:全局搜索Ctrl + /:凝视当前⾏或多⾏代码Ctrl + Shift + C:凝视当前⾏或多⾏代码Ctrl + Shift + F:格式化当前代码Ctrl + Shift + O:缺少的Import语句被添�,多余的Import语句被删除(先把光标定位到需导⼊包的类名上)Ctrl + Shift + S:保存全部⽂件Ctrl + Shift + X:把当前选中的⽂本所有变为⼤写Ctrl + Shift + Y:把当前选中的⽂本所有变为⼩写Alt + /:代码智能提⽰Alt + Shift + R:重命名(包含⽂件名称、类名、⽅法名、变量名等等,很好⽤)Alt + Shift + J:⽣成类或⽅法的凝视Alt + Shift + S:打开Source窗体(⽣成get、set⽅法,实现、覆盖接⼝或类的⽅法,⾮经常常使⽤)Alt + Shift + D, J:假设有main⽅法⼊⼝,则以Debug⽅式运⾏代码Alt + Shift + X, J:假设有main⽅法⼊⼝,则以Run⽅式运⾏代码2. 插件推荐Eclipse默认情况下是⼀个纯净版的,所以功能简单,⽽开源IDE最为强⼤的莫过于各种插件,通过使⽤插件能够帮助我们降低⼤量编写代码的⼯作量,也帮助我们降低了编写代码的难度,所以懂得安装必要插件,也是熟练使⽤IDE的鉴证。
Eclipse使用方法介绍

(1)Eclipse启动后,弹出一个【工作空间启动程序】对话框,在【工作空间】文本框中输入“D:\java”目录,单击【确定】按钮。
工作空间workspace用于保存Eclipse所建立的程序项目和相关的设置。
(2)单击【确定】按钮,系统将出现Eclipse的欢迎界面,其中包含【概述】、【教程】、【样本】、【新增内容】以及工作台相关按钮和菜单栏等。
在Eclipse的欢迎界面中,单击【工作台】按钮或者关闭【欢迎】的界面窗口,将显示出Eclipse的工作台,包括标题栏、菜单栏、工具栏、编辑器、透视图和相关的视图。
3.Eclipse菜单栏(1)文件菜单包含【新建】、【保存】、【关闭】以及【刷新】等命令,主要用于新项目的创建、保存以及关闭等操作。
(2)编辑菜单主要用于辅助程序设计代码设计工作、如代码的【复制】、【剪贴】和【粘贴】等。
(3)源代码菜单包含的命令都是和代码编写相关的,主要用于复制编程工作。
(4)重构菜单是Eclipse最为关键的菜单,主要包括对项目重构的相关命令,需重点掌握。
(5)项目菜单用于管理Eclipse中的项目,用于项目的打开与关闭、自动构建等操作。
(6)运行菜单包含了与程序运行和调试相关的各种操作,同时还具有保存运行和调试的记录功能。
(7)窗口菜单用于显示、隐藏或处理Eclipse中的各种视图和透视图。
4.Eclipse中创建Java项目在Eclipse中编写应用程序时,需要先创建一个项目。
Eclipse的多种项目中,其中Java 项目是用于管理和编写Java程序的。
(1)创建一个java项目(2)新建一个类文件5.在代码编辑器中编写并运行Java程序代码编辑器的使用技巧(1)自动导入程序中用到的类:Ctrl+Shift+O(2)自动补全代码:Alt+/Alt + / 具有代码提示、自动补全的功能能够帮助我们在开发的时候,如果忘了某个类的全名,只需要输入开头的几个字母,然后用alt+/出来就可以了,帮助实现快速开发的。
Eclipse使用入门指南及技巧

Eclipse使⽤⼊门指南及技巧Java是必须的安装⼀个JDK就可以了,⽐如jdk-6u39-windows-x64.exe,安装完毕,会⾃⾏安装JRE。
如果不⽤IDE,这个时候⽤记事本也是可以写程序,然后⽤javac编译,java命令来运⾏。
在windows下的话,⽅便javac命令⾏的使⽤,可以设置⼀个环境变量,例如:JAVA_HOME,C:\Work\Java\jdk1.7.0_67,然后在PATH变量中增加:%JAVA_HOME%\bin;Eclipse是纯绿⾊的软件解压即可使⽤,软件的各种配置、插件,在配置后,也都存储在解压后的⽬录下,拷贝后也就有了这些配置。
Eclipse插件管理插件安装:⼀般使⽤Help => Eclipse Marketplace进⾏安装即可,对于在Eclipse Marketplace没有的,可以使⽤Help ==> Install New Software 进⾏安装。
插件查看:Help ==> About Eclipse ==> Installation Details,会显⽰Eclipse安装的所有插件,并可以在这⾥进⾏卸载。
常⽤的Eclipse插件有:JRebel、SVN插件(Subversive或者SubEclipse)、Maven Integration For Eclipse。
⼀般每个Eclipse版本,和相应插件的版本必须对应,这些实际Eclipse Marketplace都已经帮我们管理了。
JRebel5.3破解版[html]1. -noverify2. -javaagent:/work/jrebel/jrebel.jar3. -Drebel.dirs=/work/privilege-server/target/classes4. -Drebel.disable_update=true5. -DJAVA_OPTS=-Xms128m -Xmx512m -XX:MaxNewSize=256m -XX:MaxPermSize=256mSVN插件注意问题当硬盘已经安装了TortoiseSVN时,对应的项⽬在Eclipse打开时,如果Eclipse已经安装了对应版本的SVN插件,则会⾃动进⾏管理,这⾥版本必须对应,例如:SubEclipse中如果SVN Client是1.8版本,则只能识别TortoiseSVN 1.8版本;如果是1.7版本,只能识别TortoiseSVN 1.7版本。
eclipse操作说明书

一、新建工程打开officeFile/new project;取名 example单击Data,打开对话框(一)单击 case definition,打开对话框Black oil(黑油模型);组分模型;热采;再这个界面上,1、选择general:输入模拟开始时间,模型定义:网格数X*Y*Z;单位(units):field,Metric,Lab2、选择reservoir定义Grid type:Cartesian;Radial定义geometry type:Block centered;Corner point选择流体类型:gas/oil/water点击OK,返回data模块(二)点击Grid,打开grid section如下对话框从菜单项中打开,subsection/grid keyword,打开grid keywords section1、选择keywords type: PropertiesInsert keyword:PERMX;PERMY;PERMZ;NTG;PORO;单击Apply2、选择keywords type: GeometryInsert keyword:DX;DY;DZ;TOPS3、选择keywords type: Operational keywordsInsert keyword:NORCHO;SAVE;RPTGRID;INIT4、可以选择水体等等。
5、单击close。
Grid View中Run Simulation运算后观看6、file/save file(四)打开PVT模块从这个模块中输入流体参数,组分模型应该再PVT模块下进行组分模拟。
输入 dead oil PVT PropertiesRock PropertiesFluid Dandifies at surface conditions流体、岩石等参数(五)打开SCAL模块。
从这个模块中输入相渗曲线(包括油水相渗和油气相渗)。
Eclipse-简明教程(全)

Data –开始
Data –开始
方案基本定义数据段:标题,开始的时间 油藏描述数据段:厚度、孔渗 流体性质数据段:高压物性 岩石—流体数据段:相渗曲线、毛管压力 油藏初始条件数据段:油气水界面、水区 分区数据段 井数据段:井位、完井位置、井史 输出控制段 敏感性分析
81
82
Data –开始
FloGrid 模块
--File containing the deviation data FILE “ well. dev " END
FloGrid
WELLNAME: 'PROD1' 554378.2 6805876 554378.2 6805876 554378.2 6805876 554378.2 6805876 554378.2 6805876 554378.2 6805876 554378.2 6805876 554378.2 6805876
FloGrid
一. 导 入 数 据
12
FloGrid
一. 导 入 数 据
13
FloGrid
一. 导 入 数 据
14
FloGrid
一.
导
入 数
Import Contour Maps
据
X Y Property
79.0 6500 3016 100. 6489 3016 200. 6431 3016
建 立 网 格 模 型
角 点
46
FloGrid
三. 建 立 地 质 模 型
建 立 网 格 模 型
角 点
47
FloGrid
三. 建 立 地 质 模 型
建 立 网 格 模 型
块 中 心
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
III. 在New Java Project的窗口中输入Project的名称,如图3.3 IV. 在Project Layout中可以选择编译好的档案是否要和原始档放在 同一个目录下,如图3.3 V. 按下Finish
III
IV
V
3.2建立Java类
新增Java类别的步骤: I. 选择「File」→「New」→「Class」 (或是在『Package Explorer』窗口上按鼠标右 键,选择「New」→「Class」选单选项) (或是按工具列上New Java Class的按钮) II. 在New Java Class窗口中,Source Folder 字段默认值是项目的数据夹,不需要更改。 III. Package字段输入程序套件的名称 IV. Name字段输入Class Name V. 在Which method would you like te creat 的部份,有勾选public static void main(String[] args)的话,会generate main method VI. 按Finish,会依套件新增适当的目录结构及 Java原始文件
1.1 历史背景 Eclipse这样功能完整且成熟的开发环境,是由蓝色巨人 IBM所释出。IBM花了4千万美金来开发这个 IDE(Integrated Development Environment)。第一 版1.0在2001年11月释出,随后逐渐受到欢迎。 Eclipse已经部分开放源码(Open Source Project),大 部分的开发扔然掌握在IBM手中,但是有一部份由 的软件联盟主导。 () Eclipse项目由Project Management Committee(PMC) 所管理,它综观项目全局,Eclipse项目分成3个子项目: 平台-Platform 开发工具箱-Java Development Toolkit(JDT) 外挂开发环境-Plug-in Development Environment(PDE) 这些子项目又细分成更多子项目。例如Platform子项目包 含数各组件,如Compare、Help与Search。JDT子项目 包括三各组件:User Interface(UI)、核心(Core)及除 错(Debug)。PDE子项目包含两各组件:UI与Core。
2. Eclipse Platform
Eclipse平台的目的,是提供多种软件开发 工具的整合机制,这些工具会实作成 Eclipse外挂程序,平台必须用外挂程序加 以扩充才有用处。Eclipse设计美妙之处, 在于所有东西都是外挂,除了底层的核心 以外。这种外挂设计让Eclipse具备强大扩 充性,但更重要的是,此平台提供一个定 义明确的机制,让各种外挂程序共通合作 (透过延伸点extension points)与贡献 (contributions)),因此新功能可以轻易且 无缝地加入平台。
也可以只打类别开头的字母,然后按Alt - /, 一样会显示一串建议清单。
Alt - /这个组合键不仅可以可以显示类别的 清单,还可以一并显示已建立的模板程序 代码,例如要显示数组的信息,只要先打 for,在按Alt - /这个组合键,就会显示模 板的请单。
3.4执行Java程序
大多数的程序不需特定的启动组态(Launch Configuration),首先确定要执行的程序代码在 编辑器中有选到(页签变蓝色),再执行下列步骤: I. 选单选「Run」→「Run as」→「Java Application」 II. 若有修改过程序,Eclipse会询问在执行前是 否要存档 III. Tasks试图会多出Consol页签并显示程序输 出 程序若要传参数、或是要使用其它的Java Runtim...等等,则需要设定程序启动的相关选 项,执行程序前,新增一个启动组态或选用现有 的启动组态。
1.4 跨语言、跨平台 多数人认为Eclipse是Java IDE,不过,当下载Eclipse之 后,除了有Java IDE(就是JDT),还有PDE。然而 Eclipse是万用工具平台。JDT实际上是Eclipse的添加品, 也就是外挂程序。Eclipse本身实际上是指Eclipse平台 (Eclipse Platform),除了下载时能取得Java工具集以外, 还提供各种工具的支持,所以平台本身只是相当小一组软 件。 如果想开发Java程序,用的是Eclipse随附的JDT外挂程 序。如果想开发其它语言的程序,就需要拿到其它外挂程 序,诸如CDT(C Development Toolkit)就可以开发 C/C++程序。 Eclipse跨计算机语言,也跨人类的语言。相同的外挂机 制可用来增加对不同语言的支持,这里使用一种特殊的外 挂,叫做外挂程序片断(plug-in fragment)。IBM以捐 出一个语言套件,支持中文(繁体与简体)、法文、德文、 意大利文、日文、韩文、葡萄牙文(巴西)与西班牙文。
程序文件(Source)卷标用以定义当除错 Java 应用程序时,用来显 示程序文件之程序文件的位置。依预设,这些设定是从相关联项目的 建置路径衍生而来。可以在这里置换这些设定。 环境(Environment)标签会定义在执行 Java 应用程序或者对它进 行除错时,所要使用的环境变量值。依预设,这个环境是继承自 Eclipse 执行时期。可以置换或附加至继承的环境。 共享(Common)卷标定义有关启动配置的一般信息。可以选择将启 动配置储存在特定档案,以及指定当启动配置启动时,哪些视景将变 成作用中。
选单选「Run」→「Run」,开启Run的设定窗口 Main 标签用以定义所要启动的类别。请在项目字段中, 输入内含所要启动之类别的项目名称,并在主要类别字段 中输入主要类别的完整名称。如果想要程序每当在除错模 式中启动时,在 main 方法中停止,请勾选Stop in main勾选框。 附注:不必指定一个项目,但这样做可以选择预设类别路 径、来源查阅路径,以及 JRE。 自变量(Arguments)标签用以定义要传递给应用程序与 虚拟机器(如果有的话)的自变量。也可以指定已启动应 用程序要使用的工作目录。 JRE 卷标用以定义执行或除错应用程序时所用的 JRE。 可以从已定义的 JRE 选取 JRE,或定义新的 JRE。 类别路径(Classpath)卷标用以定义在执行或除错应用 程序时所用类别文件的位置。依预设,使用者和 bootstrap 类别位置是从相关联项目的建置路径衍生而来。 可以在这里置换这些设定。
1.2 开放源码软件 Eclipse是开放源码软件,结果很多人在使用的时候都不 注重合法权的问题。开放原始码软件让使用者能够取得软 件的源码,有权去修改和散布这个软件。如果想修改软件, 这件事的另一面就是,除非其它人对修改后的软件也有相 同的权力,否则是不能散布修改后的软件,这种权利和著 作权(copyright)相反,开放源码项目中有时称之为著作 义(copyleft)。 有些开放源码许可证,坚持要求任何和其它开放源码合组 成的软件也必须是开放源码。然而,Eclipse使用的开放 源码许可证:公共公众许可书-Common Public License(CPL)作为授权方式,设计上是可以容许商业利 益的。CPL可以容许Eclipse和其它开放源码软件合组时, 能够以更严谨的许可证散布软件,以求用于商业途径。 CPL经过Open Software Initiative(OSI)认证,其内容 符合开放原始码授权的需求。
II III IVV VI来自3.3程序代码完成功能
3.3.1 Code Completion 在Eclipse中打左括号时会立刻加上又括号; 打双引号(单引号)时也会立刻加上双引号 (单引号)。 3.3.2 Code Assist 在输入程序代码时,例如要打 System.out.println时,打完类别名称后 暂停一会儿,Eclipse会显示一串建议清单, 列出此类别可用的方法和属性,并附上其 Javadoc批注。可以直接卷动选出然后按 Enter。
Eclipse使用手册
王凌武
1. Eclipse简介
Eclipse就像软件开发者的『打铁铺』,它 一开始备有火炉、铁钻与铁锤。就像铁匠 会用现有的工具打造新的工具,也能用 Eclipse打造新工具来开发软件-这些新工具 可扩充Eclipse的功能。(Eclipse其中一个 卖点就是它的扩充性)
3. Java程序开发
在Eclipse中做任何事之前,都必须新增一个项目。 Eclipse可透过外挂支持数种项目(如EJB或 C/C++),预设支持下列三种项目: Java Project – Java开发环境 Plug-in Project – 自行开发plug-in的环境 Sample Project – 提供操作文件的ㄧ般环境 如图
1.3 Eclipse版本介绍 可以从网站 (/downloads)下载,可以发现『最 新』与『最好』的版本,这两种版本通常不一样,基本上有四种 版本-或建置(build)可供下载: 发布版(Release builds) 由Eclipse开发团队所宣称的主要稳定版本。Release builds经 过完整测试,并具有一致性、定义清楚的功能。它的定位就跟上 市的商业软件一样。 稳定版(Stable builds) 比Release build新一级的版本,经由Eclipse开发团队测试, 并认定它相当稳定。新功能通常会在此过渡版本出现。它的定位 就跟商业软件的beta版一样。 整合版(Integration builds) 此版本的各个独立的组件已经过Eclipse开发团队认定具稳定度, 但不保证兜在一起没问题。若兜在一起够稳定,它就有可能晋级 成Stable build。 当日最新版(Nightly builds) 此版本显然是从最新的原始码产生出来的。可想而知,此版本 当然不保证它跑起来没问题,搞不好还有严重的bug。