In this article, I wanted to talk about how to create applications using the Eclipse RCP (Rich Client Platform). The reason for writing was the fact that there are absolutely no articles on Habré that describe this platform. As an example, we will create a custom input form; the correctness of the data will be checked using the JFace Data Binding framework. For starters, I will give a screenshot below with what we should get.

What is Eclipse RCP

To begin with, it is still necessary to say what Eclipse RCP is. Eclipse is a development environment written in Java developed and maintained by the Eclipse Foundation (whose members are IBM, SAP, Oracle, companies offering products based on Eclipse RCP and participating in the development of the Google, RedHat, Adobe, Cisco, Intel ecosystem). Eclipse RCP is a set of plug-ins for creating so-called rich client applications. Everything that the user sees when opening the Eclipse IDE is a plug-in created on the basis of this platform. The user can create his own plugins based on a huge number of existing ones, and if necessary, you can find most popular frameworks such as Hibernate, Google Guice, Google Guava, JUnit, TestNG as plugins. It is also worth noting that the runtime architecture is based on the service platform specification OSGI, this specification describes how to create and operate modular applications. Eclipse, as mentioned above, is written in Java and is positioned as a cross-platform product (in 90% of cases, an RCP application will be built on Windows, Linux and Mac). All plug-ins that make up the core of the platform and most third-party plug-ins are distributed under the EPL (Eclipse Public License). The user interface of RCP applications is based on the visual components of the SWT and JFace frameworks, as well as native Eclipse widgets. The figures below show the components of an application based on the RCP platform and the structure of the Eclipse platform itself.


Figure 1 - Components used in the RCP application (picture taken from this site)


Figure 2 - Eclipse architecture (picture taken from this site)

Platform pros and cons
The main question is what is so good this platform and why use it to develop desktop applications (by the way, it is possible to develop web applications and applications for mobile platforms). Modularity, cross-platform, multilingual support, free, great amount existing plugins, libraries and frameworks. All this allows you to create commercial-grade applications (a link to a list of existing applications developed on this platform is given at the end of the article). The disadvantages include enough high level occurrences, since to develop a serious application, you need to know at least in general terms how the OSGI framework works, be able to work with SWT and JFace components and widgets. Also, for Russian-speaking developers, it will be a problem to find any materials or books about the frameworks and libraries mentioned above (links to the resources found, including Russian ones, are given at the end of the article), although conferences are periodically held in Europe and the USA, which are organized by participants Eclipse Foundation, a special magazine is published in Germany that talks about new plug-ins and contains a lot of examples of their use, and there is also a whole series of books in German that describes all the nuances and subtleties of development. In English, you can find a special series of books eclipse series from Addison-Wesley, you can also find a couple of books from Apress. But there are very few materials and books in our native language.

Getting Started

Installing the required plugins
Let's jump straight into creating our first RCP application. To work, we need to download the assembly: Eclipse for RCP and RAP Developers from the official site. If Eclipse IDE is already installed, then you can use the update manager. Select Help->Install New Software from the main menu. In the Install window that appears, select from the drop-down list the site with updates we need from the drop-down list - download.eclipse.org/releases/indigo, if there is no such site in the list, then click the Add button on the right, in the Name field we write - Indigo Update Site, in the Location field - the address given above, click OK (if a message appears when adding the address - Duplicate location, then the address already exists in Available Software Sites list, the list of update sites can be viewed in the previous Install window by clicking on the Available Software Sites link below the drop-down list). After selecting the update site, a tree-like list will appear below (if the Group items by category checkbox is checked), open the General Purpose Tools item and select Eclipse Plug-in Development Environment, then open the item EclipseRT Target Platform Components and mark the plugin - Eclipse RCP Plug-in Developer Resources, it is these two plugins that we need to create our project. Next, click Next twice, accept license agreement and click on the Finish button; That's it, the installation of the necessary plugins will begin. After installation, we will be prompted to restart Eclipse, which we will do.


Figure 3 - Plugin installation window

Create a project
After the reboot, select the File-> New-> Other item in the main menu, select the Plug-in Development item, then, in the drop-down menu, mark the Plug-in Project.


Figure 4 - Menu for selecting the type of project being created

Click Next, we need to give a name to our project, let it be called first.rcp.application, click Next again. In the next window, we need to specify the name of the application, in the Name field we will write First RCP Application. Uncheck the box Generate an activator, a Java class that controls the plug-in’s life cycle; for our simple application no activator class needed. Let's leave the checkbox on the item - This plug-in will make contributions to the UI, since our application will contain user interface. Let's leave the third option Enable API Analysis unchecked. To the question - Would you like to create a rich client application? answer Yes.


Figure 5 - Plugin creation window

Click Next, we will be prompted to select a template for the future application, select Hello RCP and click Next.


Figure 6 - RCP project template selection window

In the last window, in the Application window title field, write - User Form, in the Application class field - MyApplication. Leave the Add branding checkbox inactive. Let's press the Finish button. We will be asked to switch to the Plug-in Development perspective, we will agree with this proposal.


Figure 7 - RCP project template configuration window

Project structure
So we have the structure of the newly created project.


Figure 8 - Project structure

Contents of the five classes in the first.rcp.application package in this moment we are not interested, I will only say that the class MyApplication this is in some way the main () method of a regular Java program, this class is responsible for how our plugin will be started and how it will be stopped. In class ApplicationWorkbenchWindowAdvisor, we can set the size of the application window with the following line of code:
configurer.setInitialSize(new Point(400, 300));
We can also see that the toolbar and status bar will not be shown by default:
configurer.setShowCoolBar(false);
configurer.setShowStatusLine(false);
The last line sets the title of the main window:
configurer.setTitle("User Form");
Class ApplicationActionBarAdvisor is responsible for setting up our application's menu bar. Class Perspective is responsible for the location and size of the editors (editors) and views (views) that are in this perspective (perspective), in an RCP application there must be at least one perspective.

Launch of the project
In order to run the application we just created, we need to go to the META-INF folder and open the file MANIFEST.MF, if you suddenly closed it (this file is opened by default when creating a project).


Figure 9 - RCP Application Property Editor

This file allows us to change many project settings, connect additional plugins, connect and manage extensions, customize the build of our plugin, and much more. We are on the Overview tab, in the Testing section, click on the link - Launch an Eclipse application, in a moment the window of our application will appear on the screen, close it and move on to the next step.


Figure 10 - The window of our application

Adding a view (view)

Adding an extension
Our task is to create a view (view), on which we can place the elements of the graphical interface. Let's go back to the file. MANIFEST.MF, select the tab at the bottom - Extensions. We can see that we have two extensions by default: org.eclipse.core.runtime.applications and org.eclipse.ui.perspectives. The first extension is related to our application class. MyApplication, if we select this extension and expand the tree view to the first.rcp.application.MyApplication (run) node, we will see that the class field contains the name of this particular class. Returning to the root node of this list, on the right in the Extension Details section we will see two fields, the values ​​of which we can also change (we will not do this now): ID - application identifier and Name - application name.

The second extension is responsible for setting up the perspective of our application. File MANIFEST.MF allows us to specify, without looking into the code of the Perspective class, which views and / or editors this perspective will contain, their position, size and ratio. By clicking on this extension and going to the child item we will see that in the Extension Element Details section we can specify the perspective class, ID and name. It should be noted that such changes, as mentioned above, can be made by directly editing the class code that is associated with this extension and editing the file plugin.xml, but we don't want to complicate the creation of our first project.


Figure 11 - Tab with extensions of our project

We need to add a new extension to create the view. To do this, click on the Add button and in the window that appears, in the Extension Point filter field, enter views, there should be only one extension - org.eclipse.ui.views, select it and click the Finish button.


Figure 12 - New extension selection window

In the list of extensions, we should have one more, third extension in a row.

View customization
Click on the extension we added right click mice, will appear context menu, select New->view in it, thereby we will add an element to our extension (this element is the view we need). The settings for this element will appear on the right side. First, let's create a class for our view. We can do this by clicking on the class* link.


Figure 13 - View settings (view)

A standard dialog for creating a Java class will open, give it a name - MainView; as we can see, this class is inherited from the class org.eclipse.ui.part.ViewPart, the parent class for all views. We complete the creation of the class by clicking on the Finish button. There is very little left, after creating a class for our view, its code will open in front of us, we will create a static variable that will contain the identifier of this view, we will set the canonical name of this class as an identifier. Let's write the following:

public class MainView extends ViewPart(
public static final String ID = MainView.class.getCanonicalName();

}
Let's go back to the file MANIFEST.MF, open the Extension tab, copy the contents of the class* field and paste it into the ID field. Now the class name and the ID of this view are the same, this trick is a good practice, as it always allows you to quickly find the desired view and find out its ID. In the name* field, write - User Form. The whole view is created, it remains to associate it with our perspective, since the view itself cannot be used, in other words, it must belong to some perspective.

Setting the View Position
We can perform further manipulations while remaining in the extension editor or open the perspective class code - Perspective.java, which we will do. In class Perspective, let's go to the method - createInitialLayout(), this method sets the initial position of views and editors. In the method, write the following two lines of code:
layout.setEditorAreaVisible(false);
layout.addStandaloneView(MainView.ID, true, IPageLayout.LEFT, 1.0f, layout.getEditorArea());
The first line tells the layout object that we don't need an edit area since we only have one view and no editors. The second line adds our view, and as a standalone (standalone). The first parameter is our view ID. The second parameter is a boolean value that determines whether or not the title of our view (User Form) will be shown. The third parameter is intended to indicate the orientation of the view in perspective, since we have one view and will occupy the entire perspective space, this value can be any. The fourth parameter determines the position of this view in relation to other views or editors, since, in our case, the view alone must occupy the entire perspective space. The last fifth parameter is the identifier of the editor area. Let's save our changes.
Running the application with the added view
Let's go back to the file MANIFEST.MF and launch our application again, to do this, go to the Overview tab, in the Testing section, click on the Launch an Eclipse application link. We will not see a big difference with how the form looked at the previous launch, only a tab with our view, User Form, has been added.


Figure 14 - The window of our application with the added view

That's all for today, the continuation will be in the next article.

What does IBM contribute to the open source community for you?

Marc Erickson and Angus McIntyre
Published on 01.11.2001

The Eclipse platform is designed to build integrated development environments (IDEs). It can be used to create a variety of end-to-end computing solutions for a variety of program execution environments. When choosing an architecture, toolmakers need to:

  • Equal terms and full disclosure of information in the absence of hidden APIs and interfaces from tool to tool. Eclipse offers an open source platform for this purpose. To check the quality, portability and performance of the code, the published APIs are tested by a consortium of related industries.
  • Freedom to expand the platform to reach new opportunities. Eclipse provides the ability to create derivative works, including redistribution of the platform. Using Eclipse allows tool developers to focus on their own core competencies and new models for development technology.
  • Receiving timely responses to requests for product changes and improvements delivered in a controlled and organized manner. Through the site www.eclipse.org developers can make various changes. This is achieved through joint work and all kinds of assistance from developers in the development of the platform.

Questions and answers

    What is Eclipse.org?

    Eclipse.org is an open community consortium of software development tool vendors. The community is interested in working together to improve development environments and product integration. The community shares a common interest in creating such products that will be able to easily interoperate in various environments through the use of plug-in technology. By collaborating and distributing key integration technology, Eclipse-compatible tool vendors can focus on their own areas of expertise and the creation of new development technologies.

    What is the Eclipse Platform?

    The main idea of ​​the Eclipse project is to create "Apache for developer tools". This means creating an open source infrastructure that provides many of the basic services that software developers need. It should be a "toolbox for developing toolboxes". Not just a collection of APIs, the Eclipse framework will consist of real code built to do real work.

    The Eclipse platform provides a foundation for building and running integrated end-to-end software development tools. The platform consists of open source components used by tool providers to build solutions that are embedded in an integrated workspace. The Eclipse platform integrates technology into a well-formed design and implementation environment.

    Why is IBM distributing Eclipse as open source?

    Open source is the only way to provide an open platform for integrating tools. In addition, there are other benefits to using open source.

    The main one of these benefits is the reuse of products. Why rebuild something if it already exists in a working format? Using the open Eclipse platform, toolmakers can focus on their own development by providing a tooling infrastructure for building integrated development environments (IDEs). Be that as it may, using someone else's code is starting to gain trust.

    Trust in any new architecture or platform takes a long time to build. For example, it's hard to gain the trust of developers to create tools that contain proprietary interfaces that restrict the use of an application on a particular operating system (eg, Windows). Also, it's hard to gain the trust of tool makers when various levels of APIs come with different levels tools (for example, community APIs that are different from corporate APIs).

    The Eclipse platform allows you to build trust by providing platform source code.

    Open source is provided for all APIs, with no internal, native or hidden interfaces. Developers whose trust takes a long time to gain can see the code and draw the appropriate conclusions. Trust the source and innovate!

    Bringing together open source developers can also help create better code. When collaborating on the code, the creators put extra effort into it. Such a code becomes a reflection of their work, a product of individual and corporate reputation. Trust the sources and establish your position in the market!

    An open source project based on pure specifications can provide code that is easier to understand. An interface describes (in black box terms) the abstract behavior of a component. By examining the source code, developers can parse the action of the code line by line. It's hard to trust someone else's interface. Trust the sources, and explore the technology!

    Open source is easier to debug. When an error is found, view source code help speed up the identification of its cause. This may be your fault, or a platform and environment fault. Access to the source code nullifies the work of guessing the cause of the error. Sharing issues in the forums allows you to share your notes with those who are familiar with similar issues. If a problem occurs in commonly used open source code, it is easier to fix or work around it. Trust the sources to get the information you need.

    Working on complex technology alone is quite difficult. Several toolmakers can take the liberty of researching new technology together. Trust the sources to reduce the risk!

    Tool vendors come and go. Enterprise developers want to be sure of the long-term support of the platform. With the source code available, corporations can short term get started and keep the business running for a long time: Trust the source to grow your business!

    Flexibility is the main property of Eclipse. With the Eclipse platform, a component that doesn't suit you can be modified to your requirements. For example, if you're not happy with the editor, create your own or plug in one of the popular editors built in the open source marketplace offered by the Eclipse platform. Looking to tie a new hosting platform into an existing end-to-end support? Trust the sources and create plugins!

    So, open source, open community, and open platform set the level playing field that tool makers small and large need to support end-to-end development projects and explore new horizons.

    Are you still in doubt?.. Thanks to Frank Hecker for his excellent work on building the open source store (see Resources for a link).

    What platforms is Eclipse available on?

    Eclipse has been implemented and tested for Windows NT, Windows XP (Beta), Windows 2000, Windows 98, Windows ME, and Red Hat Linux Version 7.1. Eclipse technology was written in Java, which makes it easy to use on a wide range of different platforms.

    Will Eclipse be ported to other platforms?

    This is a question to be solved, but that's the beauty of the Eclipse platform. Tool builders can embrace Eclipse technology and explore new frontiers with the confidence of an industry-proven open tool platform.

    What is the cost of the Eclipse platform?

    The Eclipse platform is available under the Common Public License. License details are available at http://www.eclipse.org.

    What about the fact that tool developers are not really eager to deal with source code, and can not really benefit from it?

    Access to source code often allows you to quickly identify problems, eliminate duplication of work, and speed up the completion of work on new compatible technology.

    Won't this end up splitting the product into incompatible versions?

    The Eclipse community has the right to determine and approve "official" versions of the Eclipse platform. Community members can also make changes and additions for their own needs. However, the fundamentals of the code are different, and creating a custom version outside of an Eclipse project becomes increasingly difficult. The cost of porting improvements from the "official" version to it also increases. Thus, all members of the Eclipse community are interested in working together on a common core Eclipse technology and infrastructure.

    Will steps be taken to define an "official" version in shipping products (eg as part of a brand like "Eclipse Inside")?

    This issue is being considered by the Eclipse Board of Directors.

    What is the consumer risk when using individual versions?

    Typically, the "official" version of the Eclipse platform, after testing and review, is posted to www.eclipse.org. This version is maintained through Eclipse.org. Individual versions must be fully supported by the vendor, so the benefit of collaborating with community members is lost.

    Will toolmakers be concerned about open source Eclipse technology "spoiling" other code if they use it in their own projects?

    Eclipse is licensed under the Common Programming License, which does not allow you to "spoil" other code that calls Eclipse code using public APIs.

    What about nasty things that users might find in the Eclipse source code, like bugs?

    Open source development increases the chances of finding and fixing both small and large bugs. They are discovered and fixed by the original developer or community members.

    Can the disclosure of source code give away confidential plans and strategies to competitors?

    Yes, essentially we share strategies with our competitors. Undoubtedly, there is a more significant opinion. Developers are tired of integrating tools only into their applications. They are tired of wasting time figuring out how to make tools work together in an end-to-end computing environment. With the Eclipse platform, everyone can benefit from a complete understanding of how to integrate an IDE at an industrial level. We do this solely to simplify the work of the end developer.

    Can users simply use the Eclipse source code and rely on community support without adequate returns?

    Potentially yes, however, sooner or later the interoperability will bring more value to the end user than it can bring on its own. Independent isolated developers will gradually go into oblivion.

    What if competitors try to "steal" an open source product for their own purposes?

    Such an attempt is possible, but the community is protected by the Common Public License. Official versions Eclipse platforms will continue to be released in the future. The license is structured so that no vendor can illegally take advantage of the product. By working together on the Eclipse project, we want to help create a true level playing field for tool developers.

    Where can I find information about integrating tools into Eclipse technology?

    There are several white papers on http://www.eclipse.org.

    How does the Eclipse platform work and what features does it offer?

    The Eclipse platform was built on the following principles:

    • Facilitating the homogeneous integration of internal tools, as well as between various types content and tool providers.
    • Support for creating a variety of tools.
    • Support for an unlimited number of tool providers, including independent software vendors (ISVs).
    • Support for tools for working with any format (including HTML, Java, C, JSP, EJB, XML and GIF).
    • Support for application development environments with and without a graphical user interface (GUI).
    • Runs on a wide range of operating systems including Windows and Linux.
    • Using the popularity of the Java language to write tools.
  • Will IBM release the Eclipse platform source code to the open community? When will this happen?

    Yes, the source code is available now under the Common Public License. Very soon, IBM will hand over Eclipse to an interim board of directors that will manage the Eclipse platform.

    Who is on the interim board of directors?

    The interim council will be announced at a later date.

    I want to join the community. How to do it?

    Visit www.eclipse.org.

    How to become a council member?

    Collaborate, contribute, promote: offer your own code, ideas, products, bug fixes, share knowledge and experience.

    How is the Eclipse platform supported?

    Support is provided through the forum and e-mail on a voluntary basis, using resources recognized by the community. More information can be found at www.eclipse.org

    Is there 24/7 support?

    How is the interim board of directors elected?

    With limited staff, the Eclipse team can only interact with a select few companies selected to build the platform. The members of the interim board of directors are elected from the companies that have contributed to the development of the platform, so far on an experimental basis. The selection is based on three criteria: Board members must use Eclipse in their company; they must also use Eclipse to create sales pitches; they must openly maintain Eclipse.org.

    Why did you delay the release of the Eclipse source code for so long?

    When the company's plans to ship the source code were scrutinized, the development team wanted to make sure that the first platform had been thoroughly developed and thoroughly tested. We have tried several alternative building concepts, some of which are already on the market. Subsequently, we shared these ideas with other tool providers and improved them. The Eclipse platform is now ready for the first release.

    When IBM releases a technology for free, does that mean that IBM is no longer committed to the technology?

    IBM is committed to adopting the Eclipse platform and using it as the foundation for the entire family of end-to-end IBM software development tools, which is the WebSphere Studio family. These products only benefit from the use of integrated quality control, from the already legendary support IBM products, as well as our commitment to the IBM brand. They use similar interfaces and are built on technology shared with the Eclipse platform.

    Where can I find documentation and information about Eclipse?

    On the website www.eclipse.org.

    How different is Eclipse from .NET?

    .NET was created exclusively for use on Microsoft platforms through a proprietary interface imposed by Microsoft. Developers need to be responsive to changes happening in .NET. In a world described as more than "wintel" technology, the .NET platform is a significant pain point. End-to-end computing projects that need to integrate servers, workstations, embedded devices, and portable PDAs operate in a variety of other highly advanced and advanced execution environments. This results in the use of many powerful processor architectures and operating platforms such as OS/390, Linux, and QNX.

    The Eclipse platform is available under an open public license with all well-documented APIs and extension points, so it allows tool developers to support any number of workspaces, including Microsoft products.

    Can Eclipse be compared to Sun Microsystems' Open Source initiative?

    The idea behind the Eclipse project is to create "Apache for developer tools". This means creating an open source infrastructure that provides many basic services that software developers need. It should be a "toolbox for developing toolboxes". Not just a collection of APIs, the Eclipse framework will consist of real code built to do real work.

    As Erich Gamma states: "Everything in Eclipse is a plug-in. The Java IDE has no special status, it's just another set of plug-ins that demonstrates the platform's easy-to-integrate extensibility. Making the Eclipse platform open source allows tool makers to do the same." and not only to create new plug-ins, but also to help improve existing ones. As a result, large enterprises and representatives of enterprises have a level playing field for integrating tools."

    What are the differences between WebSphere Studio Workbench and the Eclipse platform?

    WebSphere Studio Workbench uses Eclipse as a foundation to provide product integration that supports software platform WebSphere. WebSphere Studio Workbench is an example of using Eclipse technology from the Eclipse platform.

    Eclipse is an open source tool integration platform available for use in any work environment.

    They differ in four main points:

    1. Support

      Support for the Eclipse platform is provided through the Eclipse.org consortium, while support for WebSphere is provided by the standard IBM support structure (PartnerWorld).

      Licensing

      The Eclipse Patform is available under the "Common Public License", while the WebSphere Studio Workbench is available under the IBM PartnerWorld License

      Spin-offs / Source Code Modifications

      The Eclipse Platform allows tool developers to explore new frontiers, target new platforms and operating systems by extending and modifying code derived from the Eclipse project. WebSphere Studio Workbench must be integrated and distributed as delivered by IBM.

      Branding

      Eclipse technology is not claimed by a centralized brand. How component brand, it can be adopted by the community when compatible products are released. WebSphere Studio Workbench contains its own branding, partner programs and support offerings.

  • When should you choose Eclipse and when should you choose WebSphere Studio Workbench?

    To help choose which technology to use, toolmakers need to answer a few simple questions:

    Determine the supported working environment of the tool:

    • If only WebSphere, then select WebSphere Studio Workbench.
    • Other environments or extensions for future technologies? The Eclipse platform should be selected.
    • Both environments. The choice should be made after evaluating the degree of synergy between IBM and IBM partner programs.
  • Will you maintain the entire offering, both the Eclipse code and your own?

    • If not, then WebSphere Studio Workbench is more suitable for you.
  • Do you provide tools for platforms not supported by IBM?

    • If yes, then the Eclipse platform should be selected.
    • If not, then the choice should be made based on the two previous criteria.
  • Do you wish to have official support and participation in available affiliate programs IBM.

    • If yes, then select WebSphere Studio Workbench.
    • If not, then the Eclipse platform should be selected.

- free framework to develop modular cross-platform applications.

The project was originally developed in IBM as a corporate standard IDE for development on different languages for IBM platforms. Then the project was renamed to and provided for further development to the community.

First of all, complete Java IDE, aimed at group development, equipped with tools for working with version control systems (CVS support is included in the Eclipse distribution, several variants of SVN modules are actively developed, there is support for VSS and others). Because of the free Eclipse is the corporate standard for application development in many organizations.

Second appointment- serve as a platform for the development of new extensions (which has gained popularity - any developer can extend Eclipse with their modules). Those became C/C++ Development Tools(CDT), developed by QNX engineers together with IBM, COBOL, FORTRAN, PHP tools from various developers. Many extensions complement Eclipse with managers for working with databases, application servers, etc.

Since version 3.0, Eclipse is no longer a monolithic IDE that supports extensions, but a collection of extensions. It is based on the OSGi framework and SWT / JFace, on the basis of which the next layer was developed - a platform for developing full-fledged RCP client applications (Rich Client Platform - (English rich-client applications). The RCP platform serves as the basis for RCP applications such as Azareus and File Arranger The next layer is the Eclipse platform, which is a set of RCP extensions - editors, panels, perspectives, a CVS module, and a Java Development Tools (JDT) module.

Written in Java, therefore it is a platform-independent product, with the exception of the SWT library, which is developed for all common platforms. The SWT library is used instead of the "slow" Swing and is completely dependent on the underlying platform (operating system), which ensures fast and natural appearance user interface.

The basis of Eclipse is the rich client platform (RCP). It consists of the following components:


  • OSGi (standard delivery environment for kits);
  • SWT (portable widget toolkit);
  • JFace (file buffers, text manipulation, );
  • Eclipse working environment (panels, editors, projections, wizards).
  • The GUI is written using the SWT toolkit. The latter, unlike Swing (which only emulates certain graphical elements of the platform used), actually uses the graphical components of this system. The Eclipse user interface also depends on a GUI middleware called JFace that makes it easy to build a user interface based on SWT.

    Flexibility is provided through plug-ins, which makes it possible to develop not only in Java, but also in other languages ​​such as C / C ++, Perl, Ruby, Python, PHP, ErLang and others.

    Localization

    From version 3.1.1, a language pack for Russification has been released. Translated into Russian as GUI as well as documentation.

    For the environment there is whole line free and commercial modules. The environment was originally developed for the Java language, but there are now numerous extensions to support other languages, such as

    • C/C++ - CDT Eclipse's C/C++ Development Tooling
    • Perl - EPIC module, Eclipse Perl Integration
    • PHP - PDT PHP Development Tools
    • JavaScript - JSEclipse Javascript plugin for the Eclipse environment
    • Python - Pydev, Python Development Environment
    • Ruby - RDT, Ruby Development Tools

    There are also modules for creating graphical interfaces.

    For developing and receiving reports and developing analytical BI applications, there are en:BIRT_Projec t.

    The function of installing and updating modules via .

    Aptana(aptana.com) - distribution of Eclipse and plugin that supports development with using JavaScript(all major JS Ajax libraries are included in the distribution), HTML, CSS, Ruby on rails, Adobe AIR.

    Leave your comment!

    04/19/2005 Natalia Dubova

    The Open Source community is leading several key projects, among which, along with the Linux OS, is the creation of the Eclipse development platform. Launched a few years ago by IBM, today this open source application development tool integration platform is freely distributed in open source and developed by the user community.

    Without going into a discussion of the question of what programming is - an art or a craft, we admit: in both cases, a programmer cannot do without tools for creating programs. Along with the evolution of the programming process (from “witchcraft” over machine commands to the use of high-level languages), the possibilities for automating the hard work of programmers were also improved. The first development environments were limited to sequential launch of compilers, linkers, loaders and debuggers using the interface command line. In the 1980s, along with personal computers a market appeared software products a new class - integrated development environments (IDE) for algorithmic (Pascal, etc.), and then object-oriented (Smalltalk, C ++) programming languages. This area has reached its real heyday thanks to the active adaptation of the developers of the Java language; the most famous integrated environments for creating programs in this language are Borland JBuilder, Symantec Visual Cafe, Microsoft J++, IBM VisualAge and Oracle JDeveloper.

    The main purpose of an IDE is to increase developer productivity. The first development environments, combining the functionality of program text editors, compilers and debuggers, mainly freed consumers from routine operations. Over time, the IDE's feature set has become richer. It includes step-by-step compilers, browsers for a more logical presentation of programs, automatic code generation tools, and visual editors to create graphical user interfaces. Following the trends of the times, development environments have been transformed from tools for increasing the productivity of a programmer into a means of supporting all stages of teamwork on a software project. The latest trend is the transformation of the IDE into ALM (application lifecycle management), an integrated application lifecycle management system - from requirements definition and modeling to software configuration and version management, deployment and maintenance of a turnkey solution.

    Each new step in the evolution of the IDE has complicated development environments. However, users of such products were still forced to resort to tools that were not integrated into the IDE, if only because the creation of an application is not limited to writing and debugging programs in one programming language. The need to use in the application system, for example, HTML pages, relational database schemas, or pieces of code in other languages ​​(like Cobol or PL / 1) forces developers to use the appropriate tools that were not originally included in the IDE.

    This is why many vendors of commercial development environments strive to make them as open as possible and provide special mechanisms for integrating external tools. But no single environment is able to satisfy all possible user requirements. To do this, it must be completely neutral to the programming language and support the maximum set of functions. Eclipse is not such an environment, but it is a base, a platform with which you can build multifunctional and multilingual development environments.

    Platform

    As the initiators of the Eclipse project explain, his idea was to create "Apache for development tools" - an open platform that provides the maximum basic features for development environments and provides mechanisms for integrating various tools. The first version of this platform was developed by IBM and released in open source at the end of 2001. Eclipse-based commercial implementations soon began to emerge, pioneered by WebSphere Studio Application Developer 4.0. Eclipse now has a whole ecosystem of open source development that brings together vendors and users of tools, research organizations and individual developers.

    In the official Eclipse Foundation docs ( www.eclipse.org) The Eclipse Platform is defined as a vendor-independent open development platform that provides framework and exemplary features, as well as extensible tools. The toolkit within the Eclipse Platform is typical in the sense that it checks the applicability of the platform's basic features, illustrates typical situations of their use, and supports the development and maintenance of the Eclipse platform itself. The toolkit is extensible because its functionality is available through documented programming interfaces. Basic principles, which guided the creators of the Eclipse Platform and in accordance with which it continues to develop, are as follows:

    • support for constructing tools for application development;
    • support for an unlimited number of tool vendors, including independent software developers;
    • support for tools for working with arbitrary content types, including HTML, Java, C, JavaServer Pages, EJB, XML, GIF, etc.;
    • ensuring "seamless" integration of tools for working with various types of content different manufacturers;
    • support for application development environments with conventional and graphical user interfaces;
    • providing the ability to run a development environment based on different operating systems (today, Eclipse-based tools are implemented for Linux, HP-UX, IBM AIX, Sun Solaris, QNX, Mac OS X, Windows);
    • taking into account in the interests of platform development the popularity of the Java language when creating development tools.

    The Eclipse Platform is a very general-purpose development environment written in Java, whose architecture provides integration of various tools and programming languages ​​to solve different problems. The mechanisms of such integration make it possible to use the Eclipse Platform to build advanced development environments, free from the routine of writing basic tools in favor of creating complex, specialized functions. This not only solves the problem of supporting multifunctional and multilingual development environments, but also lays the foundation for simplifying the transition from one type of environment to another in the process of their evolution. Developed by a community of developers, the Eclipse platform will accumulate the latest advances, making them available to developers of specific products and eliminating the need for a fundamental redesign of their systems.

    Eclipse Development Environment

    The basis of the architecture of the Eclipse Platform is the principle of using plug-ins (plug-in). The platform implements mechanisms for detecting, integrating and executing such modules (see figure). A developer who wants to take advantage of the power of the Eclipse Platform writes their toolkit in Java as a separate plug-in. This module will work with files in the workspace, which is implemented using the workspace component. And its user interface is based on the tools of the workbench component, which defines the general structure of the interface and the possibility of its extension.

    Typically, a single plug-in implements the simplest functionality of an Eclipse Platform-based IDE, while more complex tools are built from multiple modules. At the same time, almost all the built-in functionality of the Eclipse Platform is also implemented using such modules - with the exception of a small Platform Runtime core. Each plug-in has its own manifest file (manifest), which describes the relationship this module with others. When an Eclipse Platform-based development environment is launched, the Platform Runtime determines the set of available plug-ins, reads their manifest files, and builds a plug-in registry. Once the system is started, additional modules can no longer be added. The Eclipse project implemented a special environment for creating plug-ins - Plug-In Development Environment (PDE).

    With the help of special modules, the components of the workspace (workspace) and the user interface (workbench) of the Eclipse platform are implemented. The workspace contains files that are created by users of the tools implemented by the plug-ins. The workbench component provides a common framework and tools to extend the user interface of the Eclipse Platform-based development environment and includes two components to implement the means of providing information to the user.

    • Standard Widget Toolkit (SWT) is a set of interface elements and a graphic library that have mechanisms for integrating with the window system of a specific operating platform, but implement OS-independent APIs. This allows you to build user interfaces of the development environment according to the same principles, which correspond to the window environment familiar to the consumer, but are intended for the maximum possible range of operating systems;
    • JFace is a toolkit for implementing a number of common tasks related to programming interfaces using SWT tools.

    Based on the APIs provided by the SWT and JFace components, a personalized user interface is built that defines the structure of the consumer's interaction with the development toolkit. The Eclipse Platform interface is organized using editors (editor), views (view) and perspectives (perspective).

    The purpose of editors is to open, edit, and save workspace objects. The platform has a built-in editor for text resources, and other features must be implemented as plug-ins. Views provide information about the object the user is currently working with. Finally, the perspective mechanism allows you to select and organize the right editors and views to be displayed on the screen.

    Organization

    Maintaining projects in open source provides a number of advantages. So, one of the tasks of such a platform is to provide developers with tools from a common base, invariant for different development environments. Why does every manufacturer need to write again what can be written once? But in order to build their developments on such a platform, the manufacturer must fully trust the one who created it. And this is possible only if he is able to test everything that is in it, that is, to get a platform in open codes.

    Developing a product in accordance with the principles of Open Source improves the quality of the code, as it is jointly “polished” by many interested developers. Debugging becomes easier and better - thanks to access to the source code of the program and, again, the involvement of a distributed team in the work. Collaboration allows you to share the risks of creating complex technologies. And the platform's collective development body ensures its support, regardless of the ups and downs that may occur with the providers of specific development environments. Finally, using an open source development platform with a flexible plug-in mechanism to implement additional functionality opens up unlimited possibilities for its improvement.

    Eclipse Platform Architecture

    However, it will not be possible to realize the advantages of the open source development model simply by releasing a technical platform “in free float”. You need to organize the process. With the release of the first version of Eclipse in 2001, this concern was taken over by a consortium organized by IBM along with a number of leading market players, and in February 2004, the Eclipse Board of Directors decided to transform the Eclipse Foundation into a non-profit independent corporation.

    The Eclipse Foundation, a consortium of more than 60 companies, coordinates work to improve the Eclipse platform and other open source projects.

    The Eclipse project is completely open, any interested developer who is not required to be an employee of any company can participate in it. In principle, everyone can not only be interested in the details of development and contribute to identifying errors, but also take part in writing code and the overall design of the next version of the platform. However, Eclipse follows the principle of prioritizing professionalism. A developer with a proven professional track record can expect additional responsibility and the opportunity to actively implement their skills in Eclipse projects. Some developers are defined as "responsible" (committer), since they are responsible for the source codes, and only they have the right to create new versions in the open source code repository. Typically, these developers are employees of companies that pay for their work within the Eclipse projects.

    The development process is iterative, aimed at maximizing the involvement of Eclipse community members in the work on the project. The release of the next release is preceded by several stages of a fixed duration (of the order of several weeks), each of which is a complete cycle that includes planning, development, testing and intermediate release of the version. The completion of the next cycle is accompanied by an open publication of a description of the new features of the system, which encourages community members to discuss, use and issue recommendations for improvement. As a result, at the next stages of development, it becomes possible to take into account the reaction of the community to the interim release. This is an open process of continuous improvement of the Eclipse platform and the development of other initiatives based on it.

    The objective of the Eclipse technology project is to coordinate the efforts of developers, researchers, members of scientific and educational organizations to determine the prospects for the Eclipse Platform and other open source developments. Among the most notable research subprojects within this area are the development of aspect-oriented software (AspectJ and AJDT), the creation of a kernel alternative to Eclipse Runtime (Equinox), the creation of a collaborative development platform (Koi), software configuration management (Stellation), toolkit for XML schemas (XML Schema Definition) and for model-based development (Generative Model Transformer).

    Community

    The use of all materials obtained from the implementation of Eclipse projects is governed by the Common Public License (CPL) license rules, which are approved by the Open Source Initiative. Under the CPL, anyone is free to use and distribute Eclipse for commercial and non-commercial purposes. Freely available on the eclipse.org website are:

    • current versions of the Eclipse Platform for direct use (in binary form);
    • source code repository where anyone can view the contents and revision history of any source file, as well as get scripts for recompiling and building the Eclipse platform from source codes;
    • open discussion forums to discuss the Eclipse Platform;
    • bug database to track defects and issues current versions platforms. With this database, users can identify known defects in their Eclipse-based developments and make new problems they discover public;
    • development plans and contacts of developers involved in Eclipse projects.

    Today on eclipse.org freely available - more than a hundred plug-ins in source codes for the Eclipse platform. Eclipse's open source projects are over 2 million lines of code in total.

    Key to market development software tools development has participation in the Eclipse project of commercial companies. With the Eclipse Platform, they get the core services of a language- and platform-neutral development environment out-of-the-box, so they can focus their efforts and investments on developing complex functionality that will keep their solutions competitive. There are examples of Eclipse-based implementations of both full-featured development environments that promote the most advanced solutions in this area, and specialized tools aimed at a specific range of tasks.

    So, on the Eclipse platform, all products of the IBM Rational family work. Borland intends to transfer all its support tools to Eclipse life cycle applications. There is an Eclipse version of QNX's embedded development tools; a similar project is being implemented by Wind River. In turn, Hewlett-Packard offers an Eclipse-based component development environment for its Internet Usage Manager system, target audience which are telecom operators. Nokia announced support for Eclipse as a development platform mobile applications. IBM has implemented a special Autonomic Computing Toolkit based on Eclipse, designed to support autonomous computing technologies in developed applications. Of all the world's leading software vendors, only Sun Microsystems and Microsoft do not collaborate with the Eclipse Foundation.

    Eclipse-based commercial environment vendors allow third-party developers to sell add-ons for their IDE, and it happens that a company implements the same proprietary plug-in for different environments on the Eclipse platform. This is not only a method of developing new markets, but also another way to increase the significance of the project. Users value freedom of choice: if they are not satisfied with the existing functionality of an open source platform-based environment, they can expand it through self-development or by purchasing commercial solutions in the same format.

    These groups use the Eclipse developments in different ways, but they all contribute to its development. The trend is to use the Eclipse platform to build non-IDE applications. This is possible because in technological solution Eclipse Platform doesn't have many IDE-specific elements. In the third version of Eclipse, there is an evolution from a platform for development environments to a platform for implementing full-featured client workstations (Rich Client Platform). It is no coincidence that IBM is implementing its promising collaboration environment Workplace based on Eclipse.

    Literature

    1. Marc R. Erickson, Angus McIntyre. , 2001, November.
    2. J. dea Rivieres, J. Wiegand. eclipse. A platform for integrating development tools. IBM Systems Journal, 2004, no. 2.

    Eclipse organization structure

    Eclipse development and participation in open source projects of various organizations and individual developers is coordinated by the non-profit independent consortium Eclipse Foundation

    The Board of Directors of the Eclipse Foundation is formed from four main categories of participants:

    • strategic developers (Strategic Developers) - Actuate, Borland, IBM, Computer Associates, Intel, QNX, Wind River, Sybase, Scapa Technologies, BEA Systems;
    • strategic consumers (Strategic Consumers) - HP, Montavista Software, SAP, Serena Software;
    • included providers (Add-in Providers);
    • open source project leads.

    All strategic developers and strategic consumers are on the board of directors, and the other two groups delegate their representatives to it. Strategic members of the consortium also have certain rights to participate in project management committees and Councils that coordinate development processes.

    The consortium maintains several basic open source projects, which include a certain number of subprojects. The basic project is managed by the Project Management Committee (PMC). To manage the development as a whole, three main councils are created - on the definition of requirements (Requirements Council), on architecture (Architecture Council) and on planning (Planning Council).

    The Requirements Definition Board analyzes and structures the requirements for the project. They combine requirements aimed at achieving the overall goals of the Eclipse Foundation and the specific goals of the project, solving the problems of key members of the consortium and developing the Eclipse ecosystem. Based on the analysis, a list of topics and priorities is formulated that will determine the course of development. The Architecture Board is responsible for designing the Eclipse Platform architecture, clearly describing it, communicating the relevant information to development teams, and protecting it from inadvertent tampering. The Planning Board creates a coordinated platform release plan.

    Projects are implemented by development teams led by project managers and including developers and responsible developers. The former are engaged in writing code, identifying errors, testing and documenting programs, and also perform other tasks within the project. Responsible developers have the right to replenish the source code repository and must influence the development of the project. Companies that have strategic developer status with the Eclipse Foundation are required to lead at least one project. They are also encouraged to lead committees.



    Eclipse is a Java-based software creation platform that provides the ability to develop programs with plug-ins. It contains a set of built-in components, among which is the well-known Eclipse product - the PDE plugin development environment. PDE allows you to extend the platform itself, made up of built-in components. Toolkit creators can offer their own extensions and give users a coherent development environment (IDE).

    In addition to the Java language in which Eclipse is written, the development environment is used for other programming languages. Many plug-ins have been created that support C++, Fortran, Perl, Prolog, Python, Ruby, etc. The platform can be the basis for other software that is not related to writing programs, such as telnet and DBMS. Another example of code based on Eclipse is the PDT development environment with basic functions for editing and debugging PHP applications.

    All rights perverted

    Open source software is licensed to guarantee user rights. For example, the source program must be made available with the right to modify and redistribute it. This level of protection of rights is achieved with the help of copyleft. Copyright protects copyright by prohibiting the distribution of programs in the event that the user does not have this right. Copyleft also requires the license to cover the redistributable software without modification. In this case, the essence of copyright becomes the opposite. Copyleft uses copyright not to preserve the rights of developers, but to transfer them to users.

    Therefore, there are fears and doubts that open programs will lead to the loss of intellectual property, since copyleft will spread to other parts of the software. In other words, the license will require that all open source applications be distributed with the same rights. This is true under the General Public License (GNU) - Linux is distributed under it. But there are permits that provide a different attitude to the public and commercial interests.

    OSI is a non-profit organization that clearly defines what open source is and approves those licenses that meet its criteria. The Eclipse platform is distributed under the EPL, an OSI-certified open source license that facilitates its commercial use while maintaining the loyalty of open source authors.

    Plugin creators or users of the software development environment must publish any Eclipse code they use or modify, but may license their own add-ons in any way they like. Transfer of rights to them as to open software is not required, as is the publication of the source code.

    And while many won't use Eclipse to create their own developments, the availability of the platform's source code has great importance not only due to the absence of fees, but also because it promotes innovation and encourages programmers to contribute their own product as a contribution to the common cause. main reason This - the more work is invested in the project, the more significant it is for everyone. If it is useful, then the number of developers increases even more and a community is created around the project, similar to those that have arisen around Linux and Apache.

    Non-profit organization

    Eclipse is a development environment, libraries and tools for creating, deploying and managing software, as well as a community of its creators. The platform was created by IBM in 2001 with the support of software vendors.

    The Eclipse Foundation was established in 2004. It is a non-profit association that supports platform projects and improves the developer community and the system of complementary programs and services. Today, the Eclipse ecosystem includes organizations and individuals from the software industry.

    The Foundation oversees and manages the projects of the platform. It serves the community and the developers, called committers, are not on staff. They are employees of other organizations or independent programmers who voluntarily donate their personal time to work on a project.

    Eclipse: platform characteristics

    • Creation of various software development tools.
    • Unlimited number of tool providers, including independent ones.
    • Support for tools for working with various content, such as HTML, C, EJB, Java, JSP, GIF, and XML.
    • Ensuring full integration within and between different content.
    • Eclipse is a software development environment with or without it.
    • Work in different operating systems, including Linux, Windows, Solaris AIX, Mac OS X.
    • Using Java, a popular language for writing tools.

    Eclipse Getting Started Guide

    After the first launch of the program, a welcome message appears. The user can go to the overview and learn new features, examples or training.

    The workspace is made up of view panels. The set of representations is called a perspective. The Resources perspective, for example, includes views for editing, managing, and viewing projects.

    Beginners should start with "Toolspace Basics" where you can learn a lot about the different parts of Eclipse and how they interact.

    Working with JDT

    For an introduction to JDT, you can open the Eclipse Java project. To do this, select the menu item "File" - "New" - "Java Project", enter the name of the project and click "Finish".

    To change the current perspective, you must select the menu item "Window" - "Open Perspective" - ​​Java or open a new window through "Window" - "New Window" and select a different perspective.

    The perspective contains views that are designed for Java development. In the left corner, at the top, there is a hierarchy with Eclipse Java packages, classes, JARs, and miscellaneous files called the "Package Browser". At the same time, the main menu was replenished with 2 items: Source and Refactor.

    Creating a program in JDT

    To create a Java application, right-click on the previously created project and select "New" - "Class". In the pop-up dialog box, enter the name of the class. Under the question: "What method stubs do you want to create?" - specify public static void main(String args) and click Finish.

    The result will be a program containing the introduced class and an empty main(). Method must be completed program code(declaration j is intentionally omitted):

    public class hello(

    public static void main(String args)(

    for(j=0; j<=5;j++)

    System.out.println("Hi");

    During typing, you can notice the features of the editor:

    • autocomplete;
    • syntax check;
    • auto-closing of an opening bracket or quotation marks.

    Code completion is invoked by pressing Ctrl + Spacebar. This will bring up a context-sensitive list of options that can be selected by the keyboard or mouse, whether it be a list of methods on that object or part of a keyword.

    The syntax is checked against incremental compilation. It happens while the code is being written at the same time as it is being compiled. Syntax errors are underlined in red, and a red dot with a white oblique cross appears to the left of them. The remaining errors are indicated in the margins in the form of a light bulb. You can fix them yourself with Quick Fix.

    In the above example, the light bulb is opposite the for statement because there is no i declaration. After double-clicking on the light bulb, a list of possible corrections will appear. In this case, for j it is proposed to create:

    • class field;
    • method parameter;
    • local variable.

    If you select one of the options with the mouse, you can see the resulting text.

    Double clicking on the required option generates a program code.

    Application launch

    If there are no compilation errors, the application can be launched through the Start menu item. There is no compilation step, since it is done at the time of saving the code. In the "Run Configuration" dialog that appears, the required values ​​​​of which have already been set, you need to click on the Run button on the right, below. A console with tabs and the result of the application will appear at the bottom.

    The program can be run in a debugger. First of all, a breakpoint is set in System.out.println() by two mouse clicks on the gray field to the left of the editing window, next to the method call. As a result, a blue dot will appear. Select menu "Start" - "Debugging". The launch configuration window will reappear. After clicking the Start button, the Debug perspective will appear with new views.

    In the "Debug" view on the left, at the top, there is a call stack and to control the progress of the program. The panel contains buttons for stopping, continuing and exiting the application, executing and skipping the next statement, and returning from a method. At the top right is a series of tabbed panels: variables, breakpoints, expressions, and screen. When you select the variable tab, you can see the value of the variable j.

    Detailed information about each of the views can be provided by a context clue. You just need to click on the panel header and press F1.

    Additional plugins

    Software development environments that are designed to modify, compile and debug them in Eclipse are supplemented with components that are able to model, automate building, test modules, performance, configuration and version management.

    The CVS source management system allows you to navigate over them. In this case, the changes made are not mixed. It is an important and integral part of Eclipse.

    The development environment is located at eclipse.org. The plugins are located in the Plug-in Central directory.

    Architecture

    The basis of the platform is functionally rich RCP clients. Simplified, they can be represented as a set of plug-ins used in the development of programs. There are also additional recommended components and optional.

    The main components are as follows:

    • The runtime defines the component model based on the OSGi specification, extensions, and extension points. It also provides additional services such as syslog and concurrency.
    • The SWT package contains Eclipse functions and user interface widgets. It has an add-on with classes that make it easier to create graphical applications.
    • The toolspace includes perspectives, views, and editing windows.
    • The Help component provides user support in the form of a help system or an interactive task list.
    • Plugin "Update" allows you to get the latest version of the software.
    • The Team component offers the infrastructure for connecting your own

    The platform created by IBM has become a full-featured open source system. Its participants are more than a hundred companies. Although there have been ideas about creating such systems before, Eclipse's thoughtful, reliable and elegant design has put it at the forefront.