Home Fruit trees Virtual assistant. A virtual assistant is a great home business option. "Being a virtual assistant" - what is it

Virtual assistant. A virtual assistant is a great home business option. "Being a virtual assistant" - what is it

Eclipse is a free IDE for developing modular cross-platform applications. Developed and maintained by the Eclipse Foundation.

The most well-known applications based on the Eclipse Platform are the various "Eclipse IDEs" for developing software in multiple languages ​​(for example, the most popular "Java IDE", which was supported natively, does not rely on any proprietary extensions, uses a standard public API to access the Eclipse Platform ).

Initially, Eclipse was developed by IBM as a successor to the IBM VisualAge development environment, as a corporate IDE standard for developing in different languages ​​for IBM platforms. According to IBM, the design and development cost $40 million. The source code was fully open sourced and made available after Eclipse was released to the IBM-independent community for further development.

In Eclipse 3.0 (2003), the OSGi service platform specifications were chosen as the runtime architecture. Since version 3.0, Eclipse has moved from being a monolithic IDE that supports extensions to being itself a set of extensions. It is based on the OSGi framework and SWT / JFace, on the basis of which the next layer is developed - RCP (Rich Client Platform, a platform for developing full-fledged client applications). RCP serves as the basis not only for Eclipse, but also for other RCP applications such as Azureus and File Arranger. The next layer is Eclipse itself, which is a set of RCP extensions - editors, panels, perspectives, a CVS module, and a Java Development Tools (JDT) module.

Since 2006, the Eclipse Foundation has been coordinating the annual Simultaneous Release, which takes place in June. Each release includes the Eclipse platform as well as a number of other Eclipse projects.

Benefits of Eclipse

Eclipse is primarily a platform for developing extensions, which is what made it popular: any developer can extend Eclipse with their own modules. There are already Java Development Tools (JDT), C/C++ Development Tools (CDT) developed by QNX engineers together with IBM, and tools for Ada languages ​​(GNATbench, Hibachi), COBOL, FORTRAN, PHP, etc. from various developers. Many extensions complement the Eclipse environment with managers for working with databases, application servers, and more.

Eclipse JDT (Java Development Tools) is the most famous module aimed at group development: the environment is integrated with CVS, GIT version control systems in the main distribution, there are plug-ins for other systems (for example, Subversion, MS SourceSafe). Also offers support for communication between the IDE and the task (error) management system. The main distribution includes support for the Bugzilla bug tracker, and there are also many extensions to support other trackers (Trac, Jira, etc.). Because it's free and of high quality, Eclipse is the corporate standard for application development in many organizations.

Eclipse is written in Java, so it is platform independent, with the exception of the SWT library, which is developed for all common platforms (see below). The SWT library is used instead of the standard Java Swing library. It relies entirely on the underlying platform (operating system) for speed and a natural look. user interface, but sometimes causes compatibility and application stability issues across platforms.

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

OSGi (standard bundle delivery environment);

SWT (portable widget toolkit);

JFace (file buffers, text manipulation, text editors);

Eclipse working environment (panels, editors, projections, wizards).

The GUI in Eclipse is written using the SWT toolkit. The latter, unlike Swing (which emulates graphical controls on its own), uses the graphical components of this operating 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.

The flexibility of Eclipse is provided by plug-ins, which makes it possible to develop not only in Java, but also in other languages, such as C / C ++, Perl, Groovy, Ruby, Python, PHP, Erlang, Component Pascal, Zonnon and others.

Java platform

Java Software Platform - Series software products and specifications from Sun Microsystems, formerly an independent company and now a subsidiary of Oracle Corporation, who together provide a system for developing application software and embedding it in any cross-platform software. Java is used in a wide variety of computing platforms from embedded devices and mobile phones in the lower price segment, to corporate servers and supercomputers in the higher price segment. Although Java applets are rarely used on desktop computers, they are sometimes used to improve functionality and security when browsing the World Wide Web.

Program code written in Java is converted by the Java virtual machine into Java bytecode. However, there are bytecode compilers for other programming languages ​​such as Ada, JavaScript, Python, and Ruby. There are also several new programming languages ​​designed to work with virtual machine Java. These are languages ​​such as Scala, Clojure and Groovy. Java's syntax is mostly borrowed from C and C++, but the object-oriented features are based on the model used in Smalltalk and Objective-C. Java lacks certain low-level constructs such as pointers, and Java has a very simple memory model where every object is located on the heap and all object type variables are references. Memory management is done through integrated automatic garbage collection, which is performed by the JVM.

Eclipse Development Environment

Initially, Eclipse was developed by IBM as a successor to the IBM VisualAge development environment, as a corporate IDE standard for developing in different languages ​​for IBM platforms. According to IBM, the design and development cost $40 million. The source code was fully open sourced and made available after Eclipse was released to the IBM-independent community for further development.

In Eclipse 3.0 (2003), the OSGi service platform specifications were chosen as the runtime architecture. Since version 3.0, Eclipse has moved from being a monolithic IDE that supports extensions to being itself a set of extensions. It is based on the OSGi framework and SWT / JFace, on the basis of which the next layer is developed - RCP (Rich Client Platform, a platform for developing full-fledged client applications). RCP serves as the basis not only for Eclipse, but also for other RCP applications such as Azureus and File Arranger. The next layer is Eclipse itself, which is a set of RCP extensions - editors, panels, perspectives, a CVS module, and a Java Development Tools (JDT) module.

Since 2006, the Eclipse Foundation has been coordinating the annual Simultaneous Release, which takes place in June. Each release includes the Eclipse platform as well as a number of other Eclipse projects.

Eclipse is primarily a platform for developing extensions, which is what made it popular: any developer can extend Eclipse with their own modules. There are already Java Development Tools (JDT), C/C++ Development Tools (CDT) developed by QNX engineers together with IBM, and tools for Ada languages ​​(GNATbench, Hibachi), COBOL, FORTRAN, PHP, etc. from various developers. Many extensions complement the Eclipse environment with managers for working with databases, application servers, and more.

Eclipse JDT (Java Development Tools) is the most famous module aimed at group development: the environment is integrated with version control systems - CVS, GIT in the main distribution, there are plug-ins for other systems (for example, Subversion, MS SourceSafe). Also offers support for communication between the IDE and the task (error) management system. The main distribution includes support for the Bugzilla bug tracker, and there are also many extensions to support other trackers (Trac, Jira, etc.). Because it's free and of high quality, Eclipse is the corporate standard for application development in many organizations.

Eclipse is written in Java, so it is platform independent, with the exception of the SWT library, which is developed for all common platforms (see below). The SWT library is used instead of the standard Java Swing library. It relies entirely on the underlying platform (operating system) for a responsive and natural looking user interface, but sometimes causes compatibility and application stability issues across platforms. The basis of Eclipse is the rich client platform (RCP). It consists of the following components:

OSGi (standard bundle delivery environment);

SWT (portable widget toolkit);

JFace (file buffers, text manipulation, text editors);

Eclipse working environment (panels, editors, projections, wizards).

GUI in Eclipse, written using the SWT toolkit. The latter, unlike Swing (which emulates graphical controls on its own), uses the graphical components of this operating 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.

The flexibility of Eclipse is provided by plug-ins, which makes it possible to develop not only in Java, but also in other languages, such as C / C ++, Perl, Groovy, Ruby, Python, PHP, Erlang, Component Pascal, Zonnon and others.

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 joint work 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 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, tool makers can focus on their own development by providing a tool 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 is difficult to gain the trust of tool makers when different levels of APIs come with different levels of tools (for example, community APIs that are different from enterprise 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 earn 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 you find a bug, looking at the source code will help you quickly identify the 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. Multiple tool makers can take the liberty of collaborating to explore new technology. 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, corporations can get up and running quickly 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 great work on building the open source store (see Resources for a link).

    What platforms is Eclipse available on?

    Eclipse has been released 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 IDEs 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 the support of community members 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 of the Eclipse platform 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:

    • Facilitate homogeneous integration of internal tools, as well as between different types of 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 via 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 should also use Eclipse to create commercial offers; 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 benefit from integrated quality assurance, legendary IBM product support, and 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 plugin. The Java IDE has no special status, it's just another set of plugins 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 the WebSphere software platform. 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 accepted by members of the community when released compatible products. 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.

The Eclipse Project is an open source project of the website, overseen by a Project Management Committee (PMC) and project leaders. The work is done in subprojects working against . The Eclipse Project Charter describes the organization of the project, roles and responsibilities of the participants, and top level development process for the project. The JDT and PDE are plug-in tools for the Eclipse Platform. Together, these three pieces form the Eclipse SDK , a complete development environment for Eclipse-based tools, and for developing Eclipse itself.

  • Eclipse Project Development
    Release plans and other information about the Eclipse Project development process.

  • Download the Eclipse SDK, Eclipse RCP, SWT, the Eclipse Java compiler, and many more. You can find the current release here. Or, download the latest stable and integration builds if you want to try out the newest features under development, or get started with contributing to the project.

  • Browse the documentation included with Eclipse Project releases.

Subprojects


  • The Platform defines the set of frameworks and common services that collectively make up "integration-ware" required to support the use of Eclipse as a component model, as a rich client platform () and as a comprehensive tool integration platform. These services and frameworks include a standard workbench user interface model and portable native widget toolkit, a project model for managing resources, automatic resource delta management for incremental compilers and builders, language-independent debug infrastructure, and infrastructure for distributed multi-user versioned resource management .

  • The JDT provides the tool plug-ins for the platform that implement a Java IDE for power-users, that supports the development of any Java application, including Eclipse plug-ins. The JDT adds the notion of Java projects and a Java perspective to the Eclipse platform, as well as a number of views, editors, wizards, builders, and code merging and refactoring tools. The JDT allows Eclipse to be a development environment for itself. The JDT plug-ins themselves can also be further extended by other tool builders.

  • The PDE project provides a number of views and editors that make it easier to build plug-ins for Eclipse. Using the PDE, you can create your plug-in manifest file (plugin.xml), specify your plug-in runtime and other required plug-ins, define extension points, including their specific markup, associate XML Schema files with the extension point markup so extensions can be validated, create extensions on other plug-in extension points, etc. The PDE makes integrating plug-ins easy and fun.

  • The e4 project is an incubator for developing the next generation of the Eclipse platform. The mission of the e4 project is to build a next generation platform for pervasive, component-based applications and tools.

If you've ever been a close follower of what's going on in the open-source or Java world, then you've just never heard all the buzz around Eclipse. Eclipse is an extensible, open-source Integrated Development Environment (IDE). This project was launched in November 2001 when IBM took the $40 million source code from the Websphere Studio Workbench and formed the Eclipse Consortium to manage the development of the tool.

The original goal was to "develop a stable, full-featured, industrial platform, commercial product quality, for the development of integrable tools." The Eclipse Consortium currently focuses on the following projects:

  1. The Eclipse Project (http://www.eclipse.org/eclipse/index.html) - responsible for the development of the Eclipse IDE (build platform for other Eclipse tools), Java Development Tools (JDT) and Plug-In Development Environment (PDE) ) used to allow the extension of the platform itself.
  2. The Eclipse Tools Project (http://www.eclipse.org/tools/index.html) is dedicated to creating optimal tools for the Eclipse platform. Current subprojects include: Cobol IDE, C/C++ IDE, and the EMF modeling tool.
  3. The Eclipse Technology Project (http://www.eclipse.org/technology/index.html) is engaged in technology research, incubation and education on the use of the Eclipse platform.

Together with the JDT, the Eclipse framework provides many different features that you might see in commercial IDEs: syntax highlighting in the editor, code compilation, a source-level debugger with threads support, a class navigator, a file manager, and a project manager, interfaces to standard source code control systems such as CVS and ClearCase.

In addition, Eclipse contains a number of unique features, such as code refactoring (http://www.refactoring.com/), automatic updating and building of code (via Update Manager), a task list, support for the ability to test units using JUnit (http:/ /www.junit.org/), as well as integration with the Jakarta Ant application build tool (http://jakarta.apache.org/ant/index.html).

In spite of a large number of standard set of features, Eclipse differs from traditional IDEs in several fundamental ways. Perhaps the most interesting feature of Eclipse is its absolute platform and language neutrality. In addition to the eclectic set of programming languages ​​that are supported by the Eclipse Consortium (Java, C/C++, Cobol), there are many third-party projects that you can use to support your programming language in Eclipse. To date, there are implementations of the following popular languages programming: Python, Eiffel, PHP, Ruby, and C#.

The Eclipse platform is provided, thanks to the Eclipse Consortium, as precompiled executables for Windows, Linux, Solaris, HP-UX, AIX, QNX, and Mac OS X. also the "rich" APIs (Application Programming Interface) supplied with the Plug-in Development Environment for the Eclipse extension Adding support for a new type of editor, viewer (panel), or programming language is outrageously easy, thanks to the well-designed APIs and building blocks that Eclipse provides .

With about a hundred plug-in development projects, resources provided by industry giants such as IBM, HP and Rational (which was recently bought by IBM), and design by Erich Gamma, which helps to quickly understand the development process - the future of Eclipse will be very bright, interesting and promising.

Installation

I bet that you are now only thinking about where to get a copy of this very Eclipse for your platform and how to install it? :) The first thing you need to take care of is to make sure you have a suitable, working JRE (Java Runtime Evironment). Although Eclipse was designed to be able to compile code for both JVM (Java Virtual Machine) version 1.3 and version 1.4, current versions of Eclipse have been designed to run on JVM version 1.3. If you are not sure where you can get a "virtual" Java machine (JVM) for your platform, you can find detailed instructions and Additional information about it on the site

Once you've verified that you have the JVM, or installed the correct version of it, you're ready to install Eclipse. To do this, visit the download section of the Eclipse project website (http://www.eclipse.org/downloads/) and download the latest release built specifically for your platform. All distributions are .zip archives. Unpack the downloaded archive into a suitable directory and spend some time looking through all the files contained in the readme directory.

Believe it or not, but this installation is complete. If you installed the JVM correctly and unpacked the archive with Eclipse correctly, you can start the process of launching this IDE for the first time. All distributions that contain a compiled version of the platform provide programs to run, which are located in the main directory: eclipse. The name of this launcher varies depending on the platform you downloaded the distribution for: eclipse.exe on Windows, eclipse on Solaris, and so on. When you first run the Eclipse application, it will perform some remaining installation tasks (such as creating a workspace directory to store project files) before the application is finally ready to go.

Interface

So now that you have Eclipse installed and running, it's time to start using it. After you start Eclipse, you should see something like this:

Picture 1

As you can see, the Eclipse IDE has pretty standard menu content:

Figure 2

In addition to the menu, the similarity of the toolbar and bookmarking system with those in other application development environments is clearly visible here.

Sample Application

Panels File Navigator, Code Outline and Task List displayed, but this moment do not contain any data. To continue our introduction to Eclipse, we'll create a simple Swing calculator application. Let's write down the steps:

1. Select a menu item File->New->Project..., to start building your first Java project. In the wizard window, select Java among the proposed project types from the left list and Java Project in the right list, then click the button Next.


Figure 3

2. Enter Calculator as the project name and continue creating the project by clicking the button Next.


Figure 4

3. And finally, at the final stage, the "wizard" for creating a new project gives you the opportunity to define directories where source code files and class files will be stored, define subprojects that can be used by the current project we are creating, as well as any libraries, which we intend to use in our application. Set the switch to value Use source folder contained in the project, then press the button Create New Folder.... Enter src as the name of the new source directory. Click Yes, when Eclipse asks you if you want to change the build directory to Calculator/bin.


Figure 5

4. Press the button Finish to let Eclipse finish creating the new project.

As soon as you have created a new project, you may notice that the appearance of Eclipse has changed somewhat (as expected): outline moved to another part of the window, panel Navigator panel has been replaced package explorer etc.

Here's what the Eclipse window looked like after we created the new project:


Figure 6

This layout is called Java Perspective. A "view", in Eclipse's terms, defines any stored arrangement of any number of different editor and viewer panels. Eclipse ships with a number of default "views" ( resource, Java, Debug and others), which can be modified to suit your needs, or you can create your own views. Views are controlled using menu items Window or a special toolbar, which is usually located along the left border of the Eclipse window.

Figure 7

The next step in creating our Java project is to create directories that will contain all of our source code. To do this, switch to the view resource using the menu item Window->Open Perspective->Resource. In panel Navigator expand the folder tree nodes so that you can see the src folder node. Select this node, and then execute the menu item File->New->Folder. In the dialog box that appears, make sure that the src directory is selected and then enter as the name of the new one, in the field folder name, name com.

Create a large number of folders using a dialog New Folder it would not be very convenient and tiring. Luckily, Eclipse can give you the ability to create your own directories using your favorite file manager: command line, Windows Explorer, and more. Using one of the suggested methods, create in the folder com folder devilish, and in it a folder calculator. Once you have created these folders, select any node folder in the Navigator panel and, using the menu item File->Refresh, refresh the contents of this panel. So Eclipse will render file system and update the project panel with the changes you made (created new directories). At this point, your Eclipse window should look something like this:


Figure 8

One more note about creating files: in the early stages of creating a project, you will most likely launch your applications quite often, create new files and folders, add new code, compile, and test your code again. It's important to remember that the location of menus in Eclipse depends on the angle you're using. So, if you switch to the angle resource to create a new file or folder in the panel Navigator, you will find that the menu Run, for example, is fundamentally different from the menu Run in perspective Java. One solution to this common problem is to use the menu Windows->Show View to display the panel Navigator in perspective Java. If you are completely satisfied with the received view, then using the menu item Window->Save Perspective As..., you can save your changes in a new view, or overwrite an existing view Java.

Adding code

Now that we have our directory structure set up, we can start adding source code to our project. We will divide our calculator program into three classes (files): CalcModel.java, CalcPanel.jav a, and Calculator.java. Download the .zip archive with the source code for this program from http://www.onjava.com/onjava/2002/12/11/examples/calculator.zip . After that, unpack this archive and place the three files mentioned above in the directory com/devious/calculator. Let's use the menu item again File->Refresh to update the contents of the Project Manager panel. Here's what you should see after doing these steps:


Figure 9

CalcPanel.java represents the basis of our calculator's user interface. Calculator.java performs preparatory initialization functions and starts the GUI (graphical user interface). The most important part of our program is in the file CalcModel.java, which deals directly with the implementation of the actual mathematics of our calculator: responding to events, performing mathematical calculations, updating displayed information, etc. The easiest way to view the source code is to switch from view Java in Java Browsing. To do this, use open perspective from the menu Window or click on the button open, which is located on the toolbar for working with views.

While you are navigating through the source code on the panel package explorer, you can see that the panel outline becomes unnecessary to you at this stage. It can be temporarily removed from the screen by clicking on the cross in the right corner of this panel. When you need it, you can use the menu item Window->Show View->Outline to display it again.


Figure 10

Running and debugging code

So, you have downloaded and installed Eclipse, created a new Java project, and added the necessary files and folders for your simple application. It's time to put this application to the test by running it. To do this, you need to set the angle Java to complete the steps that are required to run the application:

1. From the main menu Run select item Run...

2. In the launch wizard dialog that appears, select "Java Application" from the list Launch Configurations and press the button New


Figure 11

3. For the name of the new configuration, enter calculator

4. Press the button Search... and select the class as the main class calculator in field main class, or just enter the full name of the class in the input field: com.devious.calculator.Calculator.


Figure 12


Figure 13

Once you have created your application's launch configuration, you can launch it again using the menu Run->Run History or buttons Run on the toolbar. If you spend enough time "playing" with this calculator, you'll find that it works mostly right, with only one "but": it doesn't want to do the subtraction operation right! Time to use the Eclipse source debugger and find this unfortunate bug. If you followed all the instructions above in this article, then you can run this application with a debugger with the same configuration that we defined for normal launch. To do this, select the menu item Run->Debug History->Calculator.

When you run your application along with the debugger, Eclipse will automatically switch to the Debug:


Figure 14

Since the problem we found is centered around the subtraction function, we will set a breakpoint in the event handler for the "-" and "=" buttons. First, we need to switch to the class editor tab CalcPanel. (If you don't have a bookmark with the source code for this class, you need to open a file named CalcPanel.java, after switching to the angle Java or resource and then go back to perspective Debug).

Use the panel outline to locate the method actionPerformed. Move a little lower until you find the expression case for the "-" sign (line 126). If you double-click on the left border of this line, Eclipse will automatically set a breakpoint there. Move down a bit and set another breakpoint on the method call model.calculate() in the "=" button event handler (line 138).


Figure 15

Now switch to the calculator window and click a few buttons. For example, "2", "4", "6" and "-". As soon as the debugger hits a breakpoint, you can see the buttons appear on the toolbar Debug, which serve to step through the source code, and you can take steps through the code and, without going inside the methods, execute them automatically, or, going inside, go through their source code.

Figure 16

If we go inside the method setOperation(), it becomes clear that they perform a rather trivial function: they store the operation code in the field pendingOp. Now press the button Summary on the toolbar Debug to continue running the program.

Note: A major mistake new Eclipse users make is that they sometimes click Debug or Run on the main toolbar (causing another copy of the application to launch) instead of clicking Summary.

Now press a couple more buttons (for example, "1", "2", "3") and after that the "=" button. Thus, we find ourselves inside the method calculate(), the problem turned out to be obvious: someone copied the code from the OP_ADD variant, but forgot to replace the + sign with -. Problem solved! :)

Fixing a bug with the HotSwap method

If you used JVM version 1.4 to run the application, then we have only one final step to fix this error in our example. Instead of exiting the calculator program, making changes to the source code, recompiling the entire project, and only then starting a new debugger session, we can change everything on the fly. While the debugger is still running, change the line in your source code from:

SetDisplay(previousValue + currentValue); // to: setDisplay(previousValue - currentValue);

Save this file and then click the button Summary to "let go" of the application and continue working with it. Using button C to reset it and repeat the steps we did earlier. Now everything works as it should!

What we have now demonstrated is Eclipse's support for a new feature (called HotSwap) of the JVM version 1.4. The Java Platform Debugger Architecture (JPDA) now supports the ability to replace the source code of a running application. This is especially useful when running an application or finding places where it "collapses" takes a lot of time.

Interesting features in upcoming versions of Eclipse

One very interesting feature Eclipse is about the speed with which bugs are caught and with which developers respond to the various needs and wishes of users. The Eclipse Consortium monthly releases the latest releases, which include stable versions of various features that users are interested in (such releases contain identifiers M1, M2, M3, etc.) Among the features included in release 2.1 M3 are the following, most significant:

  • - Customizable shortcut key bindings, including a set of bindings similar to those found in Emacs;
  • - possibility of automatic insertion TODO, FIXME and other tag comments in Java code, in various elements and task lists;
  • - improved CVS support, including the ability to define "working sets" that limit the number of projects displayed on the panel CVS Repositories;
  • - new drafts in the Java editor that can be used to display source code, Javadoc, detailed error messages for each line of code or expression in a "drop-down" (tooltip) window;
  • - support for several new refactorings;
  • - new panel Threads and Monitors in the debugger, which allow you to determine which of the "threads" (threads) are blocking resources, which of them are waiting, and other useful information for debugging multi-threaded applications;
  • - tighter integration with Jakarta Ant build tool;

This last feature is what makes Eclipse a well-constructed environment for developing Java applications and, in particular, developing Web applications. Eclipse combines all the tools that a developer needs to successfully develop Web applications: an extensible IDE, a standard compiler, remote debugging, Ant support, JUnit testing, plug-ins for interacting with almost all application servers, as well as the EJB container.

Resources

  • eclipse.org (http://www.eclipse.org/)
  • Eclipse Project FAQ (http://www.eclipse.org/eclipse/faq/eclipse-faq.html)
  • Eclipse Platform Technical Overview (

New on site

>

Most popular