Hardware and software setup

Getting started with the Eclipse platform. Will Eclipse be ported to other platforms? Fixing a bug with the HotSwap method

Introduction

have become popular at the moment information technology that are rapidly evolving every second of our lives. Technological as well as informational progress, especially in recent years, has taken a huge step forward. Modern humanity is rapidly becoming Information society, and in particular this happens in rapidly developing countries, which place great emphasis on the development of technology and information technology.

Many people have computers, be it desktops. personal computers, laptops or pocket PCs, as well as access to worldwide network Internet with a huge number of entertaining and interesting resources, either in local network, which is filled with various entertainment services. Accordingly, people get to know each other and it becomes possible to communicate at a distance, in order to facilitate this task, in our time there are a lot of solutions, this diploma was devoted to the development of a means of communication between people in real time at a distance.

Modern applications must be secure, high-performance, distributed, and architecture-neutral. All these factors have led to the need for a new look at the very process of creating and distributing applications on multiple machines. different architecture. Portability requirements forced us to abandon the traditional way of creating and delivering binaries containing native code and, therefore, tied to a specific platform.

Java is an object-oriented language, convenient and reliable in operation due to its advantages such as multitasking, support for Internet protocols and multiplatform. Java is an interpreted language and every Java program is compiled for a hypothetical machine called Virtual machine Java. The result of such compilation is Java bytecode, which in turn can be executed on any operating system, provided there is a Java runtime system that interprets the bytecode into the actual machine code of a particular system.

tasks term paper is the study of an object-oriented language Java programming and creation of program code on Java language.

Description of the development environment

Eclipse Integrated Development Environment

Description of the Eclipse development environment

For Java development, there is a large number of integrated development environments. An example are:

3. IntelliJ IDEA.

The Eclipse integrated development environment was chosen for the development of the course work.

Eclipse is one of best tools Java created in recent years. The Eclipse SDK is an open source Integrated Development Environment (IDE). The Eclipse development environment is a modular development environment based on the software core and interfaces for writing and connecting additional modules (plugins, plugin). Thus, the Eclipse environment can be used not only for writing applications in the Java language, but also for other purposes, depending on the installed plugins.

The main Eclipse Java tools include: a source code editor (creating and editing source code for programs), debugging tools, and integration with Ant.

When first introduced to the Eclipse IDE, it can seem a little daunting to the untrained user. In order to understand the basics of working with the system, you need to understand the basic concepts of the environment: working space, tools, layouts, editors, and views.

In the simplest case workspace (workspace) - this is the user's project directory where the project files are located. Everything inside this directory is considered part of the workspace.

The Eclipse tools are available as soon as the application is launched. It is essentially the platform itself with a set of different functionality the main menu, where a set of project management operations is highlighted first of all. The actual processing is usually done by add-ons (plugins), for example, editing and viewing project files is done by JDT, etc.

The tools (workbench) include a set of corresponding editors and representations placed in the Eclipse workspace (Figure 6). For a specific task, a specific set of editors and views is called perspective or layout.

Layout ( perspective) is a set of views and editors in the order you want them to be. Each layout has its own set of tools, some layouts may have common sets tools. Only one layout can be active at a time. Switching between different layouts is done by pressing the "Ctrl+F8" keys.

Using layouts, you can customize your workspace for the specific type of task you're doing. The tutorial will use layouts related mainly to Java programming, such as: Debug, Java Browsing, Java.

Eclipse also has the ability to create custom layouts.

You can open the layout with the Window / Open Perspective command.

Editors are software tools that allow you to perform operations with files (create, open, edit, save, etc.).

language programming server user

Representation are essentially additions to the editors, which display information of an accompanying or additional nature, as a rule, about the file located in the editor. Views can be opened with the Window / Show View command.

Project ( project) is a collection of application files and related add-ons. When working with Java, mainly files with the following extensions are used: . java. jsp. xml.

Addition ( plug-in) refers to an application that can optionally be installed in Eclipse. An example of an add-on would be JDT.

Master - it software tool, which helps the user in setting up and performing a complex operation. Eclipse has many different wizards that make the user's work in the system convenient and efficient, taking over some of the routine operations. An example of a wizard can be a wizard for creating a new class, which helps the user in such operations as creating a new file in the desired directory, creating the initial class code, automatically placing modifiers, etc.

System requirements

Eclipse is designed for a wide range of operating systems such as Linux, Microsoft Windows and MacOS. It requires a JVM (Java Virtual machine) is a Java virtual machine, as well as JDK (Java Development Kit) - a set for Java development.

Table 1 - System requirements to the Eclipse development environment

Installing the Eclipse Development Environment

The first step is to install desired version Java support libraries. It can be found on eclipse.org.

After installing Java VM, proceed to install Eclipse. We go to the page for downloading Eclipse files (http://www.eclipse.org/downloads/), then select the latest ready (release) version for our platform.

Since Eclipse is built on Java, software requires the Java Development Kit (JDK) to run, a free Java application development kit distributed by Oracle Corporation (formerly Sun Microsystems) that includes the Java compiler (javac), standard libraries Java classes, examples, documentation, various utilities and executive Java system(JRE). The JDK does not include a Java IDE, so a JDK-only developer must use an external text editor and compile your programs using utilities command line.

Figure 1 - JDK installation window

When the Eclipse bootloader is launched for the first time, a series of final setup steps are performed before the environment itself appears (for example, creating a workspace directory to store project files).


Figure 1.2 - Eclipse launch window

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 source 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. The transfer of rights to them as open source is not required, as well as the publication of source codes.

And while many won't use Eclipse to create their own developments, the availability of the platform's source code is important not only because there is no charge, but also because it encourages innovation and encourages programmers to contribute their own product as a contribution to the common cause. The main reason for this is that 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 Suppliers tools, 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, click 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 this 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.

Java is a high-level programming language that was developed by Sun Microsystems back in 1995. To date, the development of this technology is engaged in the company JCP (Java Community Process). One of the main features of the language is compilation, which is performed directly when the program is assembled.

The code is turned into bytecode and then executed in the Java virtual machine. The JVM acts as a translator that connects a programming language with the necessary components of a computer. This principle allows programs to work on any systems where a virtual machine is installed.

Features of the programming language

The object-oriented and typed Java language has many features that are useful to developers. Among them are the following:

  • Ease of learning. Basic knowledge of object-oriented programming will be enough for a comfortable mastering of the language.
  • Object-oriented methodology. Programs are made up of objects that can be easily extended and adapted to meet your goals.
  • Safety. Public key encryption provides the best authentication methods.
  • Platform independence. Programs written in the language are compiled into bytecode that can run on absolutely any platform of modern operating systems.
  • Portability. A programming language does not depend in any way on the implementation aspects of specifications.
  • Strength. The Java machine is able to cope with many errors due to the developer's focus and emphasis on constant checking and reducing compilation time.

In addition, this language is very common, as it is characterized as multi-threaded, high-performance, interpreted and dynamic.

Features of Java programming platforms

There are several implementations of this platform, among which Eclipse occupies a special place. The development environment for modular cross-platform applications has a number of mandatory features that are also present in other similar products. Among them are:

  • Common technologies for deploying programs in a user environment.
  • Tools for creating graphical interfaces of any complexity.
  • Libraries for remote control of objects and programmatic access to data.
  • Tools for launching, debugging, compiling, monitoring and other actions with applications.

What is Eclipse?

Eclipse is a development environment currently controlled by the Eclipse Foundation. It provides open source code, which provides new opportunities for developers. It is written in Java and is intended to improve the process of creating software.

This project is an infrastructure that provides basic services that are important for developers. The available tools allow you to create new technologies in Eclipse. The development environment is not just a collection of APIs - it can handle full-fledged tasks.

A huge number of open source plugins gives unlimited possibilities for toolkit developers. Any additions can be added to the program, which ultimately will allow you to customize and adapt it to any task.

Platform Features

The programming environment has the following features:

  • A wide API assembly for adding new modules, as well as a framework for programming any extensions.
  • Support for all popular operating systems.
  • Programming in most known languages ​​allows exactly Eclipse - development environment. C Sharp (C#), Java, PHP, C, Python, C++ and many other languages ​​are supported by this program.
  • RCP technology is available, the capabilities of which will be enough to develop client software of any complexity and scale.
  • The modularity of the program provides incredible convenience and flexibility in work.

The Eclipse project continues to evolve in many directions. The program is constantly improving, expanding its functionality by adding new plugins.

Platform architecture

The programming environment consists of several basic elements. Firstly, this is the Eclipse Runtime, which is responsible for the operation of modules and plugins. This runtime includes basic functionality. This includes managing updates, interacting with the system, configuring plugins, maintaining the health of the help section.

Secondly, this is the IDE itself, responsible for managing projects, the leading elements of the program, as well as debugging, team development and searching among files.

Plugins such as PDE and Java Development Tools are also included with Eclipse. The development environment for Java programs and new add-ons becomes much more functional with the use of these plug-ins.

Examples of other specialized builds

The above Eclipse SDK is one of the platform versions. Several more builds of the IDE are available with unique features, namely:

  • For Java EE Developers. The version is intended for programming corporate or web applications using Java EE.
  • For JavaScript Web Developers. A build for building web products using CSS, XML, HTML, and JavaScript.
  • For Java Developers. Version for programming in Java.
  • For C/C++ Developers. Assembly for programming in C++ and C.

Each version has unique features, but the basic functionality for beginners is fully provided by the standard Eclipse (development environment). Lessons on it are available for free on the net, which will greatly simplify the study of the program.

Competing Products

This development environment has many competitors, but it is impossible to finally choose the best representative. Eclipse can be confidently considered the most popular. Almost all developers used it, thanks to a number of undeniable advantages.

When developing mobile applications, Eclipse (development environment) is often used. The Android platform is rapidly evolving, and the IDE's Java language support is attracting developers. However, it is worth noting that its capabilities are much greater.

The main competitor of the program in question is the NetBeans product, and it is completely free. You will have to pay for the Eclipse license, and this scares some people away. Other competing products include IntelliJ IDEA, JDeveloper, Android Studio, DrJava, and MyEclipse. But many consider Eclipse to be the best. The development environment has been pleasing users for many years and does not stop doing it!

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 running compilers, linkers, loaders, and debuggers in sequence using a command line interface. In the 1980s, along with personal computers, a market for a new class of software products appeared - 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 included step-by-step compilers, browsers for a more logical presentation of programs, automatic code generation tools, and visual editors for creating 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 tool vendors and users, 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. The basic principles that 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 from 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 of 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 perspectives mechanism allows you to select and organize the desired editors and views that will 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 manages 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 subject to 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 in current platform versions. 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.

The participation of commercial companies in the Eclipse project is of key importance for the development of the development software market. 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 migrate all of its application lifecycle support to Eclipse. 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, the target audience of which is telecom operators. Nokia has announced support for Eclipse as a mobile application development platform. 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 there are not many development environment-specific elements in the Eclipse Platform technology solution. 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 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 architecture of the Eclipse Platform, clearly describing it, communicating it 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.



If you've ever been a close follower of what's going on in the open-source or Java worlds, then you just can't help but hear 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) - Provides 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).

Despite a large number of standard 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 programming languages: 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 first is to make sure you have a suitable, working JRE (Java Runtime Evironment). Although Eclipse was designed 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 more 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 are displayed, but do not currently 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.

Once you have created new project, you can see that appearance Eclipse has changed a bit (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 others. 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

And one more note about file creation: 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 view you're using. So, if you switch to the angle resource, to create new file or a 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 executes preparatory initialization functions and starts the GUI ( GUI user). 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 v 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 the angle 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, 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 releases the latest monthly releases, which include stable versions various features that users are interested in (such releases contain the identifiers M1, M2, M3, etc. in the name). Among the features included in release 2.1 M3, the following most significant ones can be distinguished:

  • - 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 multithreaded applications;
  • - tighter integration with the Jakarta Ant build tool;

This last feature is what makes Eclipse a well-composed 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 (
Liked the article? Share with friends!
Was this article helpful?
Yes
Not
Thanks for your feedback!
Something went wrong and your vote was not counted.
Thank you. Your message has been sent
Did you find an error in the text?
Select it, click Ctrl+Enter and we'll fix it!