< Day Day Up > |
1.3 Understanding EclipseSo 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 Eclipse—it'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 see—all 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.
1.3.1 The Eclipse PlatformThe 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 architecture1.3.2 The Platform KernelThe 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 WorkbenchThe Eclipse workbench is what you saw back in Figure 1-1—it'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 itself—that is to say, Eclipse's graphical user interface—is 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 WorkspaceThe workspace manages all your resources for you—that 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 be—you 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.
1.3.5 The Team ComponentThe 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 ComponentThe 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. |
< Day Day Up > |