1.3 Understanding Eclipse


So what is Eclipse itself? Most people think of Eclipse as a Java IDE, and when you download Eclipse, you get the Java IDE (this is the Java Development Toolkit , the JDT) and the Plug-in Development Environment (the PDE) with it. If you only want to develop Java, it's easy to think of Eclipse as a Java IDE because that's the main tool you'll be using.

Eclipse itself, however, is a universal tool platform . The JDT is really an addition to Eclipseit's a plug-in, in fact. Eclipse itself is really the Eclipse platform , which provides support for tools beyond just the Java set you get on download. These tools are implemented as plug-ins, so the platform itself only needs to be a relatively small software package.

The platform provides the support the plug-ins need to run; if you want to develop Java, you use the JDT plug-in that comes with Eclipse; if you want to develop in other languages, you'll need to get other plug-ins, such as the CDT, which lets you develop C/C++ code. Installing a plug-in is easy, as we're going to seeall you have to do is drop it into the Eclipse plugins directory and restart Eclipse. Eclipse does some checking on each plug-in when it starts, but the plug-ins are not loaded until they're needed in order to save processing time and memory space.

It's also important to realize that although Eclipse is written in Java, it's intended to be language-neutral. To develop in any programming language, all you need is the corresponding plug-in. In fact, Eclipse is also intended to be spoken-language neutral, tooyou can easily change the language that Eclipse uses. To change languages, you can use the same plug-in mechanism that supports plug-ins, except that languages are supported with what are called plug-in fragments . OTI has a language pack available that supports a number of languagesJapanese, Korean, German, French, Italian, Portuguese, Spanish, even traditional and simplified Chinese.

1.3.1 The Eclipse Platform

The Eclipse platform is made up of several components : the platform kernel, the workbench, the workspace, the team component, and the help component. You can see an overview of the platform in Figure 1-3.

Figure 1-3. The Eclipse architecture

1.3.2 The Platform Kernel

The kernel's task is to get everything started and to load needed plug-ins. When you start Eclipse, this is the component that runs first, and it loads the other plug-ins that you normally think of as Eclipse itself, such as the workbench.

1.3.3 The Eclipse Workbench

The Eclipse workbench is what you saw back in Figure 1-1it's the basic graphical interface you work with when you use Eclipse. It's got all kinds of toolbars and menus for you to use, and its job is to present those items and the internal windows you saw in Figure 1-1.

Next to the platform kernel, the workbench is Eclipse at its most basic. When you start Eclipse, before working with any specific IDE like the JDT, the workbench displays a Welcome message. When you open another tool like the JDT, that tool takes over.

The workbench looks like a native application, targeted to the operating system you run it on, which is both a feature and a controversial point of Eclipse. The workbench itselfthat is to say, Eclipse's graphical user interfaceis built using Eclipse's own Standard Widget Toolkit (SWT) and JFace (which is built on top of SWT). The SWT uses the operating system's native graphics support to give the look-and-feel of a native application for the operating system. This is quite different from how most Java applications have worked historically, even those that use Swing.

SWT has to be ported to each operating system that supports Eclipse, and that's been the source of some contention in the Eclipse community, with many people saying that Eclipse, like Java, should be completely operating system-independent. However, that's the way that Eclipse has decided to go, and it's already been ported to most major operating systems, including Windows, Solaris, Mac OS X, Linux/Motif, Linux/GTK2, HP-UX, and a number of others.

In fact, we're going to see how to use SWT and JFace in this book to create Java applications with a totally native look-and-feel. SWT provides some basic graphics and control support, which JFace extends considerably. Eclipse is not only built using SWT and JFace, but it lets you use them as well.

1.3.4 The Eclipse Workspace

The workspace manages all your resources for youthat is, everything you store on disk or connect to on other machines. When you write code in Eclipse, you work with Eclipse projects . Each project is given its own folder in Eclipse's workspace directory, which makes it easy to keep track of them. Each project itself can contain many subfolders. Usually, all of a project's folders are subfolders of the main project folder, but they don't have to beyou can include folders anywhere in your machine in a project, and you can include networked folders in a project as well.

When working with code, the workspace component is responsible for managing all the resources connected to a project, which includes all the files in the project. It saves the low-level changes to those resources as well, storing the history of each resource's changes and letting you undo those changes as needed. The workspace informs the plug-ins of those changes.

The fact that all your Eclipse projects are stored in the same directory has its advantages. For example, if you install a new version of Eclipse, you can often simply copy the workspace directory from the old version directly to the new workspace directory. (Check the new version's release notes to make sure there is no specific problem doing things this wayfor example, you can't import Eclipse 1.0 projects into Eclipse 2.0 or later workspaces. If there is a problem, you can always simply delete the new installation and reinstall Eclipse by unzipping or untarring it.)

1.3.5 The Team Component

The team component is the plug-in that supports version control in Eclipse. In version control, program code is checked in to or out of a repository as needed so that the changes to that software can be tracked. This is also done so team members don't overlap or obliterate changes made by other team members as they work on different versions of the code at the same time.

This component acts like a Concurrent Versions System (CVS) client that interacts with a CVS server. If you're not familiar with CVS, don't worry; we'll take a look at using CVS to support version control in Chapter 4. Using the team component, you'll be able to maintain version control over your software, which is a very useful feature when working in teams .

1.3.6 The Help Component

The help component, as you can gather from its name , provides help to the user. It's actually an extensible documentation system for providing Help; plug-ins can provide HTML documentation with XML-formatted data to indicate how that help documentation should be navigated.

That covers the main components of Eclipse in overview. To actually use Eclipse, you have to know about a few more concepts: views and perspectives.

ISBN: 0596006411
EAN: 2147483647
Year: 2006
Pages: 114
Authors: Steve Holzner

Similar book on Amazon

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net