第13章 插件开发基础 《Eclipse从入门到精通》教学课件
- 格式:ppt
- 大小:2.92 MB
- 文档页数:32
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。
什么是EclipseEclipse是一个开放源代码的、与NetBeans、Sun ONE Studio和Borland Jbuilder类似的一种基于Java的整合型可扩展开发平台,也是目前最著名的开源项目之一,IBM在最近几年里也一直在大力支持该项目的发展,目标是将其做成用以替代IBM Visual Age for Java(简称IVJ)的下一代IDE开发环境,并于2001年11月宣布投入4千万美元资金到该项目的研发。
就其本身而言,它只是一个框架和一组服务,用于通过插件组件构建开发环境。
幸运的是,Eclips e 附带了一个标准的插件集,包括Java 开发工具(Java Development Tools,JDT)。
其未来的目标不仅仅是成为专门开发Java程序的IDE环境,根据Ecli pse的体系结构,通过开发插件,它能扩展到任何语言的开发,甚至能成为图片绘制的工具。
目前,Eclipse已经开始提供C语言开发的功能插件。
更难能可贵的是,Ec lipse是一个开放源代码的项目,任何人都可以下载Eclipse的源代码,并且在此基础上开发自己的功能插件。
也就是说未来只要有人需要,就会有建立在Eclip se之上的COBOL,Perl,Python等语言的开发插件出现。
同时可以通过开发新的插件扩展现有插件的功能,比如本系列文章为了进行手机应用程序的开发就是通过J2ME插件的扩展来加以实现的。
可以无限扩展,而且有着统一的外观,操作和系统资源管理,这也正是Eclipse的潜力所在。
Eclipse的主要组成Eclipse是一个开放源代码的软件开发项目,专注于为高度集成的工具开发提供一个全功能的、具有商业品质的工业平台。
它主要由Eclipse项目、Eclips e工具项目和Eclipse技术项目三个项目组成,具体包括四个部分组成--Eclipse Platform、JDT、CDT和PDE。
JDT支持Java开发、CDT支持C开发、PDE 用来支持插件开发,Eclipse Platform则是一个开放的可扩展IDE,提供了一个通用的开发平台。
Copyright© Interacoustics A/S:版权所有。
本文档中的信息归 Interacoustics⅍专有。
本文档中的信息如有更改,恕不另行通知。
未经 Interacoustics A/S事先书面许可,不得以任何方式或手段复制或传播本文档的任何部分。
目录1简介 (1)1.1关于本手册 (1)1.2使用说明 (2)1.2.1预期的操作人员 (2)1.2.2患者人群 (2)1.2.3禁忌症 (2)1.3产品说明 (3)1.4警告 (4)1.5故障 (5)2开箱和安装 (6)2.1检查 (6)2.2标记 (7)2.3硬件安装 (8)2.3.1将病床 /椅子放在地上 (9)2.3.2Eclipse 后面板 (10)2.3.3Eclipse前部面板 (10)2.3.4前置放大器按钮 (11)2.4软件安装 (11)2.4.1安装前须知 (11)2.4.2计算机系统最低要求 (11)2.4.3所需材料: (12)2.4.4软件安装 (12)2.4.5驱动程序安装 (13)2.4.6恢复软件出厂默认设置 (13)2.4.7安装语言包 (13)2.5识读台 (15)2.6许可证 (15)2.6.1Eclipse序列号 (15)2.6.2DSP序列号和许可证密钥 (15)2.7从 OtoAccess® 数据库启动 (16)2.7.1OtoAccess® 数据库中的模块设置 (16)2.8从Noah启动(仅 ASSR 或 IA OAE Suite) (17)3EP15/EP25操作说明 (18)3.1记录标签 (19)3.1.1主菜单项 (19)3.1.2电子帮助 (20)3.1.3查看历史会话 (20)3.1.4协议选择 (20)3.1.5临时设置 (20)3.1.6重新排列曲线 (20)3.1.7波形分组 (20)3.1.8报告 (20)3.1.9打印 (21)3.1.10显示A-B曲线 (21)3.1.11显示对侧曲线 (21)3.1.12授话 (21)3.1.13单曲线显示 (21)3.1.14分屏显示 (22)3.1.15保存并新建 (22)3.1.16保存并退出 (22)3.1.17刺激率选择 (22)3.1.18频率选择 (23)3.1.19刺激窗口 (23)3.1.20手动刺激窗口 (23)3.1.21状态窗口 (23)3.1.22波形再现性 (24)3.1.23开始/停止 (24)3.1.24暂停 (24)3.1.25下一强度 (24)3.1.26Fmp与残留噪声曲线图 (24)3.1.27扫描数/平均数的扩展 (25)3.1.28原始EEG (25)3.1.29高级EEG (25)3.1.30隐藏刺激伪影 (26)3.1.31显示增益 (27)3.1.32记录窗口 (27)3.1.33选择波形 (27)3.1.34移动单条曲线 (27)3.1.35显示微分曲线 (27)3.1.36为波形增添一条注释 (28)3.1.37拒收监测 (29)3.1.38放置波形标记 (29)3.1.39删除波形标记 (29)3.1.40建议波形标记 (30)3.1.41标准化潜伏期数据 (30)3.1.42删除单条曲线 (30)3.1.43放大/缩小单条曲线 (30)3.1.44隐藏单条曲线 (31)3.1.45固定单条曲线/与历史会话进行比较 (31)3.1.46合并曲线(创建加总曲线) (31)3.1.47添加曲线 (32)3.1.48同侧减对侧差值(Ipsi-Contra)曲线 (32)3.1.49A减B差值(A-B(N))曲线 (32)3.1.50修改显示滤波 (33)3.1.51记录的曲线状况 (33)3.1.52向曲线添加备注 (33)3.1.53使用光标 (34)3.1.54信噪比计算(3:1) (34)3.1.55CR、RA和INC波形标记 (34)3.2潜伏期标签 (35)3.2.1潜伏期值 (35)3.2.2潜伏期间值 (35)3.2.3潜伏期曲线图 (36)3.2.4显示波峰至波谷标记(SN10标记)(仅EPx5软件) (37)3.3Windows® 8, 10 和 11 无法启动帮助 (37)3.4电脑快捷键 (38)3.5测试前患者准备 (39)3.5.1阻抗检查 (39)3.5.2换能器 (39)3.6进行ABR阈值记录 (40)3.6.1电极画面 (40)3.6.2ABR阈值刺激 (40)3.6.3编辑ABR阈值记录 (41)3.6.4使用ABR阈值结果说明 (41)3.7进行神经潜伏期记录 (42)3.7.1电极画面 (42)3.7.2编辑神经潜伏期记录 (42)3.8进行eABR记录 (44)3.8.1两个推荐eABR电极画面 (44)3.8.2编辑eABR记录 (44)3.8.3电气阈值估算(用于人工耳蜗安接) (45)3.9进行ECochG记录 (46)3.9.1ECochG 电极安装 (46)3.9.2编辑ECochG记录 (48)3.10进行CM记录 (49)针对患者的准备工作至关重要 (49)3.10.1CM电极画面 (49)3.10.2用于CM记录的刺激 (49)3.10.3CM记录示例 (49)3.10.4CM结果内差值 (49)3.11进行AMLR记录 (50)3.11.1电极画面AMLR示例 (50)3.11.2可用AMLR刺激 (50)3.11.3AMLR记录示例 (51)3.12进行ALR记录/皮层ERA (52)3.12.1ALR阈值记录的电极画面示例 (52)3.12.2刺激信号 (52)3.12.3ALR结果说明 (53)3.12.4电生理阈值估算和婴幼儿听力仪器安接 (53)3.13进行P300/MMN记录 (54)3.13.1P300/MMN电极画面示例 (54)3.13.2可用P300/MMN刺激 (54)3.13.3P300和MMN参数汇总表 (55)3.14性能/环回(LBK15)测试 (55)4VEMP操作说明 (56)4.1前置放大器设置 (56)4.2VEMP监示器 (56)4.3VEMP波形标记 (57)4.4计算VEMP不对称率(VEMP伙伴) (57)4.5VEMP比例设定 (58)4.6进行cVEMP记录 (58)4.6.1用于cVEMP的电极画面 (58)4.6.2用于cVEMP的刺激 (59)4.6.3默认收集参数 (59)4.6.4程序 (59)4.6.5编辑cVEMP结果 (59)4.6.6cVEMP结果示例 (60)4.6.7cVEMP结果示例 (60)4.7进行oVEMP记录 (61)4.7.1oVEMP电极画面 (61)4.7.2用于oVEMP的刺激 (61)4.7.3默认收集参数 (61)4.7.4程序 (62)4.7.5oVEMP结果示例 (62)5研究模块 (63)5.1.1记录每次扫描(以便以后进行“中继”) (63)5.1.2导出平均曲线和/或完整会话 (64)5.1.3导出会话(所有曲线) (65)5.1.4离线导出波形 (65)5.1.5导入用于刺激的波形文件 (65)6操作说明 (69)6.1耳塞的操作和选择 (69)6.2OAE 设备的日常系统检查 (70)6.2.1探头完整性测试 (70)6.2.2真耳检查 (71)7.IA OAE Suite (72)7.1PC 电源配置 (72)7.2兼容的设备 (72)7.2.1从 OtoAccess® 数据库启动 (72)7.2.2从 Noah 4 启动 (72)7.2.3模拟模式 (72)7.2.4崩溃报告 (73)7.3使用菜单 (74)7.4使用 DPOAE 探头 (75)7.4.1准备测试 (75)7.4.2DPOAE 模块中的元素 (77)7.5使用 TEOAE 模块 (83)7.5.1准备测试 (83)7.5.2TEOAE 模块中的元素 (85)7.6使用打印向导 (90)8.ABRIS操作说明 (92)8.1使用ABRIS模块 (92)8.2安装电极 (92)8.3阻抗检查 (92)8.4回路(LBK15)测试 (93)8.5ABRIS测试屏幕 (93)8.5.1主菜单项 (93)8.5.2查看历史会话 (94)8.5.3保存并退出 (94)8.5.4打印 (94)8.5.5电子帮助 (94)8.5.6报告 (94)8.5.7查看EEG或噪声条 (94)8.5.8刺激窗口 (94)8.5.9测试状态窗口 (95)8.5.10受试耳 (95)8.6进行ABRIS记录 (96)8.6.1开始与暂停测试 (96)8.6.2EEG曲线图 (96)8.6.3EEG噪声条 (96)8.6.4AEP波形 (96)8.6.5备注框 (96)8.6.6状态栏 (97)8.6.7ABRIS反应曲线 (97)8.7电脑快捷键 (98)8.8可拆卸零部件 (98)9.ASSR操作说明 (99)9.1使用ASSR模块 (99)9.2ASSR测试前准备 (99)9.3测试前准备 (99)9.3.1皮肤准备 (99)9.3.2放置电极 (100)9.3.3阻抗检查 (100)9.4安装电极 (101)9.5阻抗检查 (101)9.6系统性能/回路(LBK15)测试 (101)9.7ASSR标签 (102)9.7.1主菜单项 (102)9.7.2协议选择 (102)9.7.3临时设置 (103)9.7.4报告 (103)9.7.5打印 (103)9.7.6保存并退出 (103)9.7.7查看历史会话 (103)9.7.8刺激窗口 (103)9.7.9总会话状态窗口 (104)9.7.10刺激率 (104)9.8进行ASSR记录 (105)9.8.1开始/停止 (105)9.8.2暂停 (105)9.8.3原始EEG曲线图 (105)9.8.4测试频率曲线图 (105)9.8.5CM 检测器 (106)9.8.6ASSR表 (106)9.8.7延长测试时间 (107)9.8.8调整刺激强度 (107)9.8.9中止测试频率/强度 (108)9.8.10ASSR 遮蔽计算器 (108)9.9听力图标签 (110)9.9.1估计的听力图符号 (110)9.9.2NOAH 或 OtoAccess® 数据库中的听力符号 (111)9.9.3估算听力图 (112)9.9.4AC 和 BC 在同一听力图中 (113)9.9.5无反应 (114)9.9.6选定的校正系数 (114)9.9.7电脑快捷键 (114)10.维护 (115)10.1通用维护程序 (115)10.2如何清洁国际听力产品 (115)10.3清洁OAE探头尖 (116)10.4关于维修 (117)10.5保修 (117)11.技术规格 (119)11.1技术规格 - Eclipse硬件 (119)11.2EP15/EP25/VEMP技术规格 (120)11.2.1peSPL至nHL校正值 (122)11.3TEOAE25技术规格 (123)11.4DPOAE技术规格 (124)11.5ABRIS技术规格 (125)11.6ASSR技术规格 (126)11.7电磁兼容性(EMC) (127)11.8Eclipse软件模块概览 (132)11.8.1EP15/EP25/VEMP模块 (132)11.8.2P15/EP25/VEMP模块刺激最大强度 (133)11.8.3TEOAE25模块 (134)11.8.4DPOAE模块 (134)11.8.5ABRIS模块 (134)11.8.6ASSR模块 (134)1简介1.1 关于本手册本手册适用于EP15/25 v4.6软件版本、IA OAE套件1.2、ABRIS v1.6.3、VEMP v4.6和ASSR v 1.3。
1.Eclipse简介俗话说:工欲善其事,必先利其器,想要快速高效的开发,选择好的开发工具是非常重要的。
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。
1.2 开发原始码软件Eclipse 是开放原始码,结果很多人在使用的时候都不注重合法权的问题。
开放原始码软件让使用者能够取得软件的原始码,有权去修改和散布这个软件。
如果想修改软件,这件事的另一面就是,除非其它人对修改后的软件也有相同的权力,否则是不能散布修改后的软件,这种权利和著作权(copyright)相反,开放原始码项目中有时称之为著作义(copyleft)。
有些开放原始码许可书,坚持要求任何和其它开发原始码合组成的软件也必须是开放原始码。
然而,Eclipse 使用的开放原始码许可书:公共公众许可书-Common Public License(CPL)作为授权方式,设计上是可以容许商业利益的。
插件开发指南 Eclipse插件开发指南目录第1章Eclipse概述1.1 Eclipse简介1.1.1 Eclipse的历史1.1.2 Eclipse的优势与技术特征1.2 安装Eclipse1.2.1 安装的软硬件环境要求1.2.2 安装Eclipse 3.01.3 Eclipse插件的安装方法1.3.1 第三方插件SWT Deginer的下载与安装1.3.2 Eclipse中文包的安装(以Eclipse2.1.3为例)第2章Eclipse的使用2.1 Eclipse常用技巧和设置2.1.1 创建一个新的项目2.1.2 运行项目2.1.3 代码格式化及注释的设置2.1.4 使用Eclipse强大的重构功能2.1.5 任务(TODO)的设定2.1.6 程序代码的追踪2.1.7 在代码中搜索关键字2.1.8 打开类型层次结构2.1.9 调试器的使用2.2 Eclipse中CVS的使用2.2.1 CVS简介服务器端的安装、、配置与使用2.2.2 CVS服务器端的安装2.2.2.1 安装CVS服务器2.2.2.2 新建一个CVS项目2.2.2.3 CVS在服务器端的常用操作2.2.3 CVS客户端的配置与使用2.2.3.1 连接的设置导入、、导出项目2.2.3.2 导入2.2.4 文件提交与更新的方法2.2.4.1 提交与更新文件2.2.4.2 当文件冲突时的解决办法2.2.4.3 其它使用注意事项2.3 Eclipse中JUnit的使用2.3.1 JUnit简介2.3.2 JUnit的Hello World2.3.3 在实际项目中使用JUnit的注意事项第3章实战SWT3.1 SWT概述3.1.1 SWT简介起步::用SWT Deginer写一个Hello World3.1.2 SWT起步3.1.3 使用SWT Deginer的界面开发流程3.1.4使用SWT Deginer进行界面开发的注意事项3.2 SWT/JFace中的事件模型3.2.1 事件的两种常用写法3.2.2 常用事件介绍3.2.3 编写事件代码的注意事项3.3 SWT 常用控件类3.3.1 按钮按钮、、复选框复选框、、单选框单选框((Button 类)3.3.2 标签标签((Label 类)3.3.3 文本框本框((Text 类)3.3.4 下拉框下拉框((Combo 类)3.3.5 列表框列表框((List 类)3.3.6 一个多控件组合应用的综合实例3.4 容器类3.4.1 面板面板((Composite 类)3.4.2 分组框分组框((Group 类)3.4.3 属性页属性页((TabFolder 类)3.4.4 分割栏分割栏((SashForm 类)3.4.5 一个综合实例3.5 布局管理器3.5.1 填充式填充式((FillLayout 类)3.5.2 行列式行列式((RowLayout 类)3.5.3 网格式网格式((GridLayout 类)3.5.4 堆栈式堆栈式((StackLayout 类)3.5.5 表格式表格式((FormLayout 类)3.5.6 一个复杂布局的综合实例3.6 其它SWT 控件3.6.1 工具栏工具栏((ToolBar 类、ToolItem 类)3.6.3 动态工具栏动态工具栏((CoolBar 类、CoolItem 类)3.6.5 进度条进度条((ProgressBar 类)3.6.6 刻度条刻度条((Scale 类)3.6.7 滑动条滑动条((Slider 类)3.6.8 画布画布((Canvas 类)3.5.7 一个综合完整的应用程序一个综合完整的应用程序((Application )实例第4章 JFace 常用控件常用控件::实例步步深入4.1 表格表格((TableViewer 类)4.1.1 表格简介4.1.2 前期准备前期准备::实例所用数据模型说明4.1.3 让数据在表格中显示出来4.1.4 使用内容器使用内容器((ITreeContentProvider 接口接口))和标签器和标签器((ITableLabelProvider 接口接口))4.1.5 加上右键快捷菜单(Action 类、IMenuManager 接口)4.1.6 实现点击表头排序的功能实现点击表头排序的功能((ViewerSorter 类)4.1.7 加工具加工具栏栏:实现翻页实现翻页、、删除删除、、刷新功能刷新功能((ToolBarManager 类)4.1.8 创建一个带复选框的表格创建一个带复选框的表格((CheckboxTableViewer 类)4.1.9 表格的其它使用技巧4.1.10 表格使用的注意事项4.2 树(TreeViewer 类):):用实例步步深入用实例步步深入4.2.1 树简介4.2.2 前期准备前期准备::实例所用数据模型说明4.2.3 让数据在树中显示出来4.2.4 给树加上内容器和标签器4.2.5 加上右键快捷菜单并用ActionGroup 类来集中管理4.2.6 如何捕捉树中不如何捕捉树中不同结点的值同结点的值4.2.7 创建一个带复选框的树4.2.8 树的其它使用技巧4.2.9 树使用应注意事项4.3 对话框对话框((Dialog 类):):用实例步步深入用实例步步深入4.3.1 对话框简介4.3.2 对话框的Hello World4.3.3 给对话框设置初始值4.3.4 取得对话框中的数据4.3.5 自定义对话框的按钮带提示栏的对话框((TitleAreaDialog类)4.3.6 带提示栏的对话框4.3.7 对话框使用的注意事项向导式对话框((WizardDialog类)4.4 向导式对话框4.4.1 向导式对话框简介4.4.2 向导式对话框实例4.4.3 向导式对话框使用的注意事项进度条对话框((ProgressMonitorDialog类)4.5 进度条对话框4.5.1 进度条对话框简介4.5.2 进度条对话框实例4.5.3 进度条对话框使用的注意事项4.6 自制界面控件4.6.1 绘图包Draw2D简介4.6.2 一个Draw2D的简单的实例4.6.3 跟我一步步来写个实用的界面控件第5章Eclipse插件开发5.1 Eclipse插件开发概述5.1.1 Eclipse插件开发简介5.1.2 Eclipse插件开发的优势和不足5.2 插件的Hello World5.2.1 使用向导一步步创建5.2.2 以空白项目为基础手工创建5.2.3 构建插件项目时的注意事项5.3 常用插件扩展点实战(plugin.xml)5.3.1 扩展点简介5.3.2 在Eclipse中加入一个透视图5.3.3 往透视图中加入视图(views)5.3.4 如何在两个视图之间的实现事件监听5.3.5 主菜单(actionSets)5.3.6 编辑器(editors)5.3.7 首选项和属性(preferencePages)5.3.8 帮助(contexts)5.3.9 编写扩展点的注意事项5.4 Eclipse插件开发项目的国际化5.4.1 国际化简介5.4.2 创建一个国际化项目5.4.3 使用Eclipse的向导功能进行国际化5.4.4 国际化的注意事项5.5 为项目制作帮助5.5.1 帮助简介5.5.2 项目帮助的制作实例5.5.3 帮助中的高级特性的使用5.6 项目打包与发行5.6.1 插件项目的打包与发行5.6.2 应用程序项目的打包与发行报表::用POI包与MS Office交互第6章报表6.1 POI概述6.1.1 POI简介6.1.2 POI的下载与安装6.2 将数据导出成Excel的实例6.3 更多高级的用法6.3.1 设置页眉页脚6.3.2 浮动文字框6.3.3 冻结和分割窗6.3.4 在表中画图6.3.5 打印的相关设置第7章项目实战:一个实际Eclipse插件项目项目实战:7.1 项目概述7.1.1 项目简介7.1.2 项目的总体构思7.2 项目前期7.2.1 项目的需求分析7.2.2 项目的技术选型7.2.3 项目过程控制的管理方案项目的数据建模::基于面向对象的系统分析7.2.4 项目的数据建模项目中期::代码实现7.3 项目中期7.3.1 项目起步7.3.1.1 创建一个空白项目7.3.1.2 创建透视图并加入视图7.3.2 主界面构建主界面构建::导航栏及编辑器(Editor)7.3.2.1 本模块的设计及数据模型7.3.2.2 主体代码的具体实现与程序导读7.3.3 用户管理及权限管理模块7.3.3.1 权限管理的设计及数据模型7.3.3.2 权限管理的设计及数据模型7.3.3.3 主体代码的具体实现与程序导读7.3.4 消息通知模块7.3.4.1 消息通知的设计及数据模型7.3.4.2 主体代码的具体实现与程序导读7.3.5 系统日志模块7.3.5.1 系统日志的设计及数据模型7.3.5.2 主体代码的具体实现与程序导读7.3.6 报表模块7.3.6.1 系统日志的设计及数据模型7.3.6.2 主体代码的具体实现与程序导读7.4 项目的后期完善7.4.1 创建系统的首选项设置7.4.2 创建帮助对整个项目进行国际化((英、中、繁)7.4.3 对整个项目进行国际化7.4.4 打包和发行第1篇 SOAP的HelloWord实例1.1 前言1.12005-3-2公司开会并分给我一个任务:写一个程序从福建移动的BOSS系统取出一些相关数据。
Eclipse插件开发入门.Eclipse最有魅力的地方就是它的插件体系结构。
在这个体系中重要的概念是扩展点(extension points)。
扩展点就是在软件开发过程中暴露出来的接口。
每一个插件都是在现有的扩展点上开发的,并可能还留有自己的扩展点,以便在这个插件上继续开发。
简介Eclipse 平台是IBM向开发源码社区捐赠的开发框架,它之所以出名并不是因为IBM宣称投入开发的资金总数为4 000万美元,而是因为如此巨大的投入所带来的成果:一个成熟的、精心设计的、可扩展的体系结构。
Eclipse 的价值是它为创建可扩展的集成开发环境提供了一个开放源码平台。
这个平台允许任何人构建与环境和其他工具无缝集成的工具。
工具与Eclipse无缝集成的关键是插件。
除了小型的运行时内核之外,Eclipse中的所有东西都是插件。
从这个角度来讲,所有功能部件都是以同等的方式创建的。
由于有了插件,Eclipse系统的核心部分在启动时要完成的工作十分简单:启动平台的基础部分和查找系统的插件。
整个Eclipse体系结构就像一个大拼图,可以不断地向上加插件,同时,在现有插件上还可以再加插件。
开发“Hello,world”插件创建插件最简单的方法是使用Eclipse中专门为开发插件而设计的插件PDE(Plug-in Development Environment)。
PDE 和 Java Development Tooling(JDT)IDE是 Eclipse 的标准扩展。
PDE 提供了一些向导可以帮助创建插件。
下面的“Hello,world”插件将通过PDE进行开发。
下面是创建一个简单插件的操作步骤。
(1)运行Eclipse。
单击Eclipse的“File”→“New”→“Other”菜单项,在弹出的对话框中选择Select对话框左边的Plug-in Development向导。
如图1所示,选择Plug-in Project。
JDT核心JDT 核心JDT 核心(org.eclipse.jdt.core)是用于定义 Java 核心元素和 API 的插件。
在开发特定于 Java 的功能部件时,总是应该将此插件列示为先决条件。
JDT 核心包使您能够访问 Java 模型对象和无外设 Java IDE 基础结构。
JDT 核心包包括:•org.eclipse.jdt.core-定义用于描述Java 模型的类。
•piler-定义编译器基础结构的API。
•org.eclipse.jdt.core.dom-支持可用于检查编译单元的结构直到语句级别的“抽象语法树”(AST)。
•org.eclipse.jdt.core.eval-支持对代码片段编辑测试窗或调试器中的代码段进行评估。
•org.eclipse.jdt.core.jdom-支持Java“文档对象模型”(DOM),它可用于表示Java 编译单元的结构。
•org.eclipse.jdt.core.search-支持在工作空间的Java 模型中搜索与特定描述相匹配的Java 元素。
•org.eclipse.jdt.core.util-提供用于处理.class 文件和Java 模型元素的实用程序类。
从版本 3.0 起,建议不要使用 org.eclipse.jdt.core.jdom。
应使用org.eclipse.jdt.core.dom 来完成对编译单元的结构的处理。
Java 模型Java 模型是用来对与创建、编辑和构建 Java 程序相关联的对象进行建模的一些类。
Java 模型类是在org.eclipse.jdt.core中定义的。
这些类实现资源的特定于 Java 的行为,并进一步将 Java 资源分解成模型元素。
Java 元素包org.eclipse.jdt.core定义了用来对组成 Java 程序的元素建模的一些类。
JDT 使用内存中的对象模型来表示 Java 程序的结构。
此结构是从项目的类路径派生的。