Eclipse platform entry
English original
content:
What is eclipse? Eclipse is the software Eclipse for open source code? Eclipse Workbench Java Development Environment (JDE) Additional Plug-in An example: a plug-in in UML modeling Eclipse's foreground reference information about the author's evaluation of this article
related information:
Insert SWING-based development tools into Eclipse China Eclipse plugin USE Eclipse to build a user interface for xmdeveloperWorks Toolbox Subscription
In the Linux area:
Tutorial Tools & Product Codes & Component Articles
Use the Eclipse plugin to edit, compile and debug applications
Level: Getting Started David Gallardo (David@gallardo.org) Software Consultant January 2004
This article provides you with an overview of the Eclipse platform, including its origin and architecture. This article first briefly discusses the nature of Eclipse's open source and its support for multiple programming languages, and then demonstrates the Java development environment through a simple program example. This article will also examine some software development tools available in plug-in extension and show a plug-in extension for UML modeling.
What is eclipse? Eclipse is an open source, based on Java-based extensible development platform. As far as it is itself, it is just a framework and a set of services to build development environments through plug-in components. Fortunately, Eclipse comes with a standard plug-in set, including Java Development Tools, JDTs. Although most users are happy to use Eclipse as Java IDE, the goal of Eclipse is not limited thereto. Eclipse also includes a plug-in development environment (PDE), which is primarily for software developers who wish to extend Eclipse because it allows them to build a seamless integration with the Eclipse environment. Because each thing in Eclipse is plug-in, all tool developers have equal places for all tool developments for Eclipse, and integrated and unified integrated development environments. This equality and consistency is not limited to Java development tools. Although Eclipse is developed using Java language, its use is not limited to Java language; for example, plugins that support programming languages such as C / C , COBOL and Eiffel are available, or expected to be launched. The Eclipse framework can also be used as the basis of other application types that are independent of software development, such as content management systems. Eclipse-based applications is the IBM's WebSphere Studio Workbench, which constitutes the foundation of the IBM Java Development Tool Series. For example, WebSphere Studio Application Developer adds support for JSP, Servlet, EJB, XML, Web services, and database access. Eclipse is an open source software open source software for open source is such a software that comes with a license aimed at ensuring certain rights to users at the time of publication. Of course, the most obvious right is that the source code must be available so that users can freely modify and distribute the software. Such user rights are completed by a strategy called COPYLEFT: software license advocates copyright protection unless clearly granted such rights such as users, users do not score the software. Copyleft also requires the same license to cover any software that is redistributed. This actually inverted the purpose of the copyright - using copyright to grant user rights, rather than reserving copyright to software developers --CopyLeft is often described as "all copyrights". There are many fear, worry, and doubts of open source software, are related to the so-called "virus" nature of some CopyleFT licenses - if you use open source software as part of your development, you will lose Your own intellectual property, because the license will "infect" your own proprietary part. In other words, the license may require all the software that packaged with open source software, must be released under the same license. Although this may be true for the most famous CopyleFT license (ie GNU universal public license, such as Linux is released under this license), there are other licenses to provide between commercialization and community considerations. Good balance. Open Software Initiative is a non-profit organization that explicitly defines the meaning of open source and certification licenses that meet their standards.
Eclipse is a granted license under OSI-approved General Public License (CPL) 1.0 version, CPL "aims to promote the commercial use of procedures ..." (To get link to the full text of the General Public License version 1.0 Please refer to the reference material later in this article). Creating a plug-in for Eclipse or develops Eclipse as a developer based on the software development application, requiring any Eclipse code that they use or modified under the CPL, but they can freely determine the license grant method of the code you added. The proprietary code packaged with the software from Eclipse does not need to grant licenses as an open source, and the source code does not need to be provided to the user. Although most developers do not use Eclipse to develop plugins, or create an Eclipse-based new product, but Eclipse's open source, not just it makes Eclipse free available (although it means easy to commercialized license means Plugins may have to spend money). Open source code encourages innovation, and motivates developers (even commercial developers) contribute to the public open source. There are many reasons for this, but the more essential causes, the more developers contributing to this project, the project will become more precious for everyone. As this project becomes more useful, more developers will use it and form a community around it, just like those communities formed around Apache and Linux. What institutions are Eclipse? Eclipse.org Association Management and Guide Eclipse is underway. It is said that IBM has spent $ 40 million to develop Eclipse and put it as an open source project, and the Eclipse.org Association absorbed many software tool providers, including Borland, Merant, Rational, Redhat, SUSE, Together, Rational, and QNX. From then on, there are other companies to join, including Hewlett Packard, Fujitsu, Sybase. These companies sent a representative to the Board, and this Council is responsible for determining the direction and scope of the Eclipse project. At the highest level, the Project Management Committee (PMC) is managed in the Eclipse project. This project is divided into multiple sub-projects, and each sub-project has a person in charge. The large sub-project is divided into groups, and each group also has a person in charge. At present, most of these management characters are served by people who originally developed Eclipse IBM subsidiary Object Technology International (OTI), but as an open source project, it welcomes anyone's participation. The responsibility of any particular department is to win through the contribution of the project. Now we have examined some of the theoretical, history and management behind Eclipse, let us investigate the product itself. When the Eclipse Workbater opened Eclipse, the Eclipse workbench first saw the following welcome screen: Figure 1. Eclipse Workbench Eclipse Workbench consists of several panes called views (View), such as Navigator View in the upper left corner . The set of panes is called a perspective (PERSPECTIVE). The default perspective is a resource perspective, which is a basic generic view set, used to manage the project and the files in the project. The Navigator view allows you to create, select, and delete items. The pane on the right side of Navigator is the editor area. Depending on the selected document type in Navigator, an appropriate editor window will open here.
If Eclipse is not registered for an appropriate editor for a particular document type (for example, a .doc file on a Windows system), Eclipse will try to use an external editor to open the document. Navigator The following Outline view displays the outline of the document in the editor; the accuracy of this outline depends on the type of editor and document; for the Java source file, the outline will display all declared classes, properties, and methods. The Tasks view collects information about the item you are operating; this can be the information generated by Eclipse, such as compiling errors, or you can manually add tasks. Most of the tables of the workbench, such as menus and toolbars, should be similar to those familiar applications. A convenient feature is a shortcut toolbar of different perspective, which is displayed on the left end of the screen; these features have significant differences in the following and history. Eclipse also comes with a robust help system, including the Eclipse workbench and user guide for plugins (such as Java Development Tools). At least it browsing this help system is worth it, which can see which available options, and better understand the workflow of Eclipse. To continue this brief Eclipse tour, we will create a project in Navigator. Right click on the Navigator view and select New => Project. When the New Project dialog box appears, select the left Java. Standard Eclipse has only one Java project type called "Java Project". If the plugin is installed to provide JSP and Servlet support, we will see an additional option for web applications here. Now, select Java Project, enter "Hello" when prompted the project name, and press Finish. Next, we will check the Java perspective. Depending on your favorite screen management method, you can change the perspective in the current window by selecting Window => Open Perspective => Java, or you can select Window => New Window, then select this new perspective, thus Open a new window. As you may expect, the Java perspective contains a group of views that are more suitable for Java development. One of them is the view of the upper left corner, which is a hierarchy containing a variety of Java packages, classes, jar, and other files. This view is called Package Explorer. Pay attention to the main menu has been expanded - two new menu items appear: Source and Refactor. Java Development Environment (JDE) is a Java development environment, we will create and run a "Hello, World" application. Use the Java perspective, right-click "Hello" item, select New => Class, as shown in Figure 2. In the subsequent dialog box, type "Hello" as class name. In "Which Method Stubs Would You Like To Create?", Select "Public Static Void Main (String [] args" check box, then press Finish. Figure 2. Creating a new class in the Java perspective This will create a .java file that contains the Hello class and empty main () method in the editor area, as shown in Figure 3.
The following code is then added to the method (note that the declaration of I I is intended to be omitted): Figure 3. Hello classes in the Java Editor You will notice some of the features of the Eclipse editor, including syntax check and code automatic carry out. In version 2.1 (I have downloaded M2 editions), when you type a knot or double quotation, Eclipse automatically provides paired symbols and places the cursor within the symbol. In other cases, you can call the code automatic completion by pressing Ctrl-Space. The code automatically completes the list of suggested suggestions, you can choose from the list via the keyboard or mouse. These recommendations can be a list of methods for a particular object, or a code snippet that is expanded based on different keywords (such as for or while). Grammatical check reliance on incremental compilation. Whenever you save the code, it accepts compilation and syntax check in the background. By default, syntax errors will be displayed in red underline, and a red dot with white "X" will appear on the left. Other errors indicate along the left side of the editor; these are the editor perhaps the problem that you can fix - the so-called Quick Fix feature. The above code example has a bulb-like icon behind the for statement because the declaration of i is omitted. Double-click the icon to call up the recommended fix list. In this example, it will provide recommendations for creating a class field I, a local variable I or a method parameter i; one of the suggestions that click it will display the code to be generated. Figure 4 shows the recommended list and the code generated after a local variable is recommended. Figure 4. Quick FIX recommends Double-click the suggestion to insert the suggested code into the appropriate location in the code. Once the code is not erroneously compiled, you can select RUN from the Eclipse menu (note that there is no separate compilation step because compile is done when you save the code. If the code does not have a syntax error, it Can run). A Launch Configurations dialog with an appropriate default setting will appear; please press the Run button in the upper right corner. A new tab pane will appear in the following pane (console), which shows the output of the program, as shown in Figure 5. Figure 5. The output of the program can also be run in the Java debugger. First double-click the gray edge of the left end of the editor view to set a breakpoint in the main () system.out.println () after calling System.out.Println (). A blue point will appear there. Then select Debug from the RUN menu. As described above, a Launch Configurations dialog appears. Please select RUN. The perspective will automatically switch to the Debug perspective, which has many interesting new views, as shown in Figure 6: Figure 6. Debug Perspective First, note the DEBUG view of the upper left corner of this perspective. This view displays the stack, and there is a toolbar in the title bar, which allows you to perform execution, including continuing, suspend, or terminating programs, tracking the next statement, single-step execution, or returning from ways. The pane in the upper right corner contains many tabs, including Variables, Breakpoints, Expressions, and Display. Here I click on the Variables view so that we can see the current value of I. You can get more information about these views by context-sensitive help: click on the title, then press F1.
Additional plugins In addition to the plug-ins of JDT for editing, compiling, and debug applications, some available plugins support from modeling, generating automation, unit testing, performance test, and version control to configure management's complete development process. The Eclipse standard comes with a plug-in with CVS, and CVS is an open source code for source code control and a Concurrent Version System. The Team plug-in is connected to the CVS server, allowing a member of the development team to operate a set of source code files, but will not cover each other changes. Here is not intended to further explore how to source source code from Eclipse, as this requires installation of CVS servers, but supports development teams, not just independent development, this is an important essential feature of Eclipse. Some third-party plugins that have been available or have announced include: version control and configuration management CVS merant PVCS Rational ClearCase UML modeling
Omondo Eclipseuml Rational Xde (instead Rose) TOGETHER WebSphere Studio Edition graphics
Batik Svg Macromedia Flash Web Development, HTML, XML
Macromedia Dreamweaver XMLBuddy Application Server Integration
Sysdeo Tomcat Launcher wants to understand the more complete list of available plugins, see the links in the reference. Example: A plug-in for UML modeling To view the plugin example, and how to integrate with Eclipse, please download popular Omondo Eclipseuml (see the link in the reference); you need to register, but the plugin is free of. This plugin relies on GEF, which is Graphical Editor Framework, which is another Eclipse plugin. GEF is part of the Tools subproject. To download the GEF, go to the Eclipse Web site (see Reference), select Downloads, and then click the "Tools PMC Downloads Page" link. Note that you need to download the GEF version recommended by Omondo (for Omondo 1.0.2 is a GEF version 2.0). After downloading, the plugin installation is usually done by decompressing the download file and copy its content to the Eclipse plugin directory. In this example, the GEF needs to decompress the Eclipse directory (it will automatically enter the plugin directory from the directory). For security, you may want to extract it into a temporary directory, and then copy the relevant directory accordingly. If Eclipse is running, you will need to stop it and then restart it so that it can recognize the newly installed plugin. Once Eclipseuml (and gef) installation is complete, you can create a class diagram like creating a Java class file. In the Java perspective, right-click the "Hello" project in Package Explorer and select New => Other from the pop-up menu. There will be a new option for UML in the left pane of the New dialog. The free version of Eclipseuml only supports a class diagram, so the only option on the right is UML Class Diagram. Select UML Class Diagram, then type a name for this class, such as "Hello": Figure 7. A graphic editor will appear in the Class Diagram Editor Editor area, with canvas for drawing class diagrams. You can create class diagrams in two ways: Drag and drop the Java file from the package Explorer to the existing code reverse engineering; or use a blank class map to draw a drawing tool in the toolbar. To test the first method, create a new class named Person (using file => new => class), then give it the two private properties listed below: / ** Person.java
* @Author David
* /
Public class person {
PRIVATE STRING NAME;
Private address address;
/ **
* Returns the address.
* @Return Address
* /
Public address getaddress () {
Return Address;
}
/ **
* Returns the name.
* @Return String
* /
Public string getname () {
Return Name;
}
/ **
* Sets the address.
* @Param Address The Address to set
* /
Public void setaddress (address address {this.address = address;
}
/ **
* Sets the name.
* @Param Name the name to set
* /
Public void setname (String name) {
THIS.NAME = Name;
}
}
(It should be acknowledged, I only type lines for Name and Address. Getter and setter methods are automatically generated by Eclipse, that is, right-click source code, then select Source => generate getter and setter from the pop-up menu.) Please save And close the Person.java Hello.ucd. Figure 8. Person class diagram To create a Java class from the UML, click the "New Class" button on the top toolbar on the Class Cap window, you click on the third button, and then click the Class. When the New class wizard is opened, type adress as class name and press Finish. You can first click on the class name and select New => Attribute to add attributes to the class. In the New Properties dialog box, enter the property name, type, and visibility. Then right-click the class name and select New => Method to add a method. When you change the class map, the Source Editor window below will reflect the changes made. Finally, you can click on the Association button (fifth from left) to draw a line segment from the Person class to the Address class to draw the relationship diagram between the two classes. This will call another dialog that you can enter the associated property (see Eclipseuml Help for more content about the required information). The completed figure should be similar as follows: Figure 9. Associated this UML plugin demonstrates several typical features of the Eclipse plugin. First, it shows the tight integration between the tools. The surface is absolutely unasight to see multiple components at work; integration with the Eclipse platform and JDT is seamless. For example, when the Person class is created, it shows a syntax error because it is not defined by ADDRESS. Once the Address class is created in the UML diagram, these components are displayed separately. Another feature is the ability of Eclipseuml to utilize other plug-ins. - In this example, it is a GEF plugin that provides tools for developing visual editing editors. Another feature involves the way the Eclipseuml plugin uses multi-level features. The basic plugins that support the class diagrams are free, but more mature versions will be available. The Eclipse platform architecture Eclipse platform is a framework with a strong service that supports plugins, such as JDT and Plug-in Development Environment (PDE). It consists of several major parts: platform runners, workspaces, workbenches, team support and help. Figure 10. The Eclipse platform architecture platform platform running library is the kernel. It checks which plugins have been installed when starting, and create registry information about their registry. To reduce startup time and resource, then load the plugin when there is any plug-in. In addition to the kernel, other everything is implemented as a plugin. Workspace Workspace is a plug-in that manages user resources. This includes items created by users, files in those projects, and file changes and other resources. The work area is also responsible for notifying other plugins about resource changes, such as file creation, deletion, or changes. The workbench workbench provides the user interface for Eclipse. It is built using a standard window toolkit (SWT) and a higher API (JFACE); SWT is a non-standard alternative for Java Swing / AWT GUI API. JFACE is based on SWT, providing user interface components. . SWT has proven to be the most controversial part of Eclipse.
SWT is more closely mapped to the native graphics function of the base operating system than Swing or SWT, which not only makes SWT faster, but also makes the Java program have more appearance and feel like this appliance. Using this new GUI API may limit portability of the Eclipse table, but the SWT transplanarized version of most popular operating systems is available. Eclipse's use of SWT will only affect Eclipse itself - any Java applications built using Eclipse will not be affected unless they use SWT instead of using Swing / AWT. Team Support Team Support Components are responsible for providing version control and configuration management support. It adds views as needed to allow users to interact with any version control system (if any) used. Most plugins do not need to interact with team support, unless they provide version control services. Help the help component has the ability to scalable with the Eclipse platform itself. The same is the same as the plug-in to add features to help provide an additional navigation structure that allows the tool to add documents in the form of an HTML file. The prospect of Eclipse is in a critical stage around Eclipse. The main software tool providers are involved, and the number of open source Eclipse plug-in projects is growing. Portable, expandable, open source frames are not new ideas (you will think of emacs), but because of its mature, robust and elegant design, Eclipse brings new power. The world-class software worth $ 40 million in the open source area has brought long-lost shock to the industry. References You can get Eclipse documents, articles, and download Eclipse from the Eclipse project website. View the content of the general public license V1.0. Browse the full Eclipse plugin list. Download popular Omondo Eclipseuml; you need to register, but the plugin is free. Information about open source software, including authentication open source licenses such as public universal licenses, can be found on the open source planning Web site. About Copyleft's authority explanation can be found on the Web site of the Foundation Foundation. Read IBM Announces Press Releases of Eclipse to Open Source Community. Learn more about Eclipse in these developerWorks articles:
"Interview with Marc Erikson About The Eclipse Code Donation" (DeveloperWorks, November 2001). "Working The Eclipse Platform" (DeveloperWorks, November 2001). "Getting to Know WebSphere Studio Application Developer" (DeveloperWorks, November 2001). "Help for Reusing Your assets" (DeveloperWorks, November 2001). "Create Native, Cross-Platform GUI Applications" (DeveloperWorks, April 2002). "International Eclipse plugin" (DeveloperWorks, June 2002). "Test your international Eclipse plugin" (DeveloperWorks, July 2002). "Insert SWING-based development tools into Eclipse" (developerWorks, January 2003). "Working XML: Use Eclipse to Build A User Interface for XM" (DEVELOPERWORKS, October 2002). Recently, there have been many articles about Eclipse. Learn from "PROTING SOFTWARE THROUGH Eclipse" (DTMAG.COM, November 2002) Why a professor at the University of Carleton chooses Eclipse to build two ambitious projects. About the author David Gallardo is an independent software consultant and writer, his expertise is software internationalization, Java web applications and database development. He became a professional software engineer for 15 years, and he has many experience in operating systems, programming languages and network protocols. He recently engaged in advanced database and international development in a B2B e-commerce company TradeAccess, Inc.. Prior to this, he was a senior engineer in the Lotus Development Corporation International Product Development Department, which was responsible for developing a cross-platform library that provides Unicode and international language support for Lotus products (including Domino). You can contact David via David@gallardo.org.