The Eclipse IDE – A Brief Overview

Before you start the Eclipse IDE (Workbench) for the first time and work with it in a practical way, it may be helpful for you to become familiar with some of its basic terms and concepts. First we will deal with the main workspace concept and comment on some of its special features. It is important for you to understand this concept when you begin your practical work with the Eclipse IDE.

 

The next section answers these questions, among others:

·         What is the workspace?

·         How is the workspace folder structured?

·         How does Eclipse manage project data?

·         What components form the user interface of the Eclipse IDE (Workbench)?

·         How does the Workbench support me when I create and modify Java code?

·         How is the Workbench integrated in the overall Eclipse architecture?

·         How can Eclipse be enhanced with other functions?

 

 

Resource management and the workspace

The central concept used when discussing storage of resources in the Eclipse IDE is the workspace. In general, you can regard the workspace as the central storage location for all Eclipse IDE metadata. Thus it contains all the project information and user-specific settings. Moreover all imported plug-ins, are registered in the workspace and information about them is stored there.

One of the consequences of this concept is that you can only open one instance of Eclipse in each workspace. You can only launch a second instance of Eclipse for a different workspace (the multi-workspace concept). The new instance does not share any IDE settings or project information with the first one.

To find out how to launch Eclipse for different workspaces, refer to  Launching Eclipse.

 

The Eclipse IDE organizes its metadata in a workspace folder, which is created when the IDE is launched for the first time.

Before you launch Eclipse you can decide which of the following you want to use:

·         The default workspace

·         A workspace outside the Eclipse installation folder

If you do not specify your own workspace when launching Eclipse, the system uses the default workspace. It then creates a workspace folder in the Eclipse installation folder. (See the following graphic.)

You can use the –data <MyWorkspace> line command to move the workspace folder from the Eclipse installation folder to another location on your computer. The benefit of doing this is that you do not need to remember to move your workspace when updating Eclipse.

If you do not move your workspace out of the installation folder, it will be deleted when the installation folder is deleted. Proceed with caution.

If the default workspace is set up in Eclipse, the structure of the Eclipse folder is as follows:

Note that you can store the workspace anywhere you want – the workspace folder need not be stored in the Eclipse installation folder. However, regardless of where it is stored physically, this folder will always have the same structure (shown within the dotted box above).

Separation of the workspace and resource storage

Since all metadata for all resources (project data) assigned to the workspace is always available to it, we can physically separate the workspace (as a metadata repository) and these resources. Of course you can also store resources in the workspace folder. In practice, however, separating the workspace and the physical representation of the resources has proved effective. See also Creating a Project.

 

Projects

The following three types of resources are important for your work:

·         Projects

Just as in other IDEs, projects can contain any number of files and directories, and are used as containers for administering resources for a specific area of responsibility in the IDE. Projects cannot contain other projects themselves. Unlike in JBuilder however, you can create references to other projects. This means that you can use both .JAR files and individual projects when specifying project dependencies.

In general, each workspace can hold any number of projects.

The resources of the workspace are organized hierarchically in a tree structure and displayed in the Eclipse IDE Navigator.

 

 

Note that the user can open several projects at once to navigate to or to manipulate its resources.

 

 

 

Perspectives and Views

Users can see the following components of the Eclipse IDE:

·         The editors

The visual components of the Eclipse IDE are presented in one Workbench window, which offers several specific views or perspectives. Initially, the IDE displays the Resource perspective. Other commonly used perspectives are the Java and Debug perspectives.

A perspective displays a task-specific view in the IDE and consists of the appropriate menu and application toolbars, along with a set of views and editors.

The appropriate editor for the type of file chosen is displayed in the editor area of the screen. Changes made in this editor follow the normal Open ®Save ®Close cycle.

Typically, views are used to navigate within a hierarchy (such as the resource tree) or to support the editors – for example, by launching an editor or displaying certain properties of the active editor. Any changes made in a view are saved immediately.

 

 

The Java Editor

The Java Editor has a wide range of functions and supports you efficiently when you edit or modify Java code.

Its main functions include:

Pretty Printer

·         Syntax highlighting

·         Code formatting

Code completion and code templates

·         Editing your own code templates

·         Exporting and Importing templates

Search functions

·         Search help

·         Full-text search

·         Finding references or declaring Java elements (package, class, method, type, and so on)

·         Navigating to the element once it has been found

Support for refactoring

·         Renaming packages, classes, methods, method parameters, and so on

·         Extracting methods

 

See also: Working with the Java Editor - Tips and Tricks

 

Eclipse architecture and plug-ins

Eclipse provides a platform with open architecture for developing your own tools. You make new functions (tools) available using the platform plug-ins. Plug-ins are used to enhance the platform and provide it with specific functions.

Eclipse uses the extension points concept for its enhancements. These are a set of well-defined entry points to the platform that allow the new plug-ins to use the available platform functions. New plug-ins can also define their own extension for other enhancements.

The platform itself is made up of several subsystems, which in turn are implemented in one or more plug-ins. Some basis plug-ins – such as the Resource Management System or the Workbench itself – provide the IDE’s elementary infrastructure.

The architecture of Eclipse can be depicted in a simplified form as follows:

 

 

As well as the basis platform, the Eclipse SDK includes two standard tools, which will help you develop Java programs, especially plug-ins.

These two tools are implemented as plug-ins and connected to the Basis platform using extension points. The Java Development Tooling (JDT) plug-ins provides the functions of a full Java IDE and allows you to edit, test, and debug Java programs. 

The Plug-in Developer Environment (PDE) supplies the development environment with specific functions and utilities that support you efficiently when you develop your own platform plug-ins in the Workbench.

You can integrate new tools (that is, plug-ins) using Basis platform extension points, or the PDE or JDT.

For more information, refer to the Eclipse software home page: http://www.eclipse.org.