Eclipse in Action
A Guide for Java Developers
David Gallardo, Ed Burnette and Robert McGovern
  • May 2003
  • ISBN 9781930110960
  • 416 pages

Eclipse in Action provides a thorough guide to using Eclipse features and plugins effectively in the context of real-world Java development. Realistic examples demonstrate how to use Eclipse effectively to build, test and debug applications using the tools provided by Eclipse and other third-party open source plugins. The reader will learn how to use plugin tools for using Eclipse in a team environment, including using Ant for more sophisticated build processes and CVS for source control. Plugin-ins for building web applications, using J2EE technologies, such as JSP/Servlets and EJB, are also discussed.

Complementing this coverage of Eclipse in the context of development is a reference providing a comprehensive guide to Eclipse. Because Eclipse and its plugins provide a remarkable array of features, it is often hard to learn what features are available and how they can be invoked. This reference lays things out clearly: feature-by-feature, menu-by-menu.

Table of Contents show full




about this book

about the title

about the cover illustration

Part 1 Using Eclipse

1. Overview

1.1. Where Eclipse came from

1.1.1. A bit of background

1.1.2. The Eclipse organization

1.1.3. Open source software

1.2. What is Eclipse?

1.2.1. The Eclipse architecture

1.2.2. Language and platform neutrality

1.3. What’s next

1.4. Summary

2. Getting started with the Eclipse Workbench

2.1. Obtaining Eclipse

2.2. Eclipse overview

2.2.1. Projects and folders

2.2.2. The Eclipse Workbench

2.3. The Java quick tour

2.3.1. Creating a Java project

2.3.2. Creating a Java class

2.3.3. Running the Java program

2.3.4. Debugging the Java program

2.3.5. Java scrapbook pages

2.4. Preferences and other settings

2.4.1. Javadoc comments

2.4.2. Format style

2.4.3. Code generation templates

2.4.4. Classpaths and classpath variables

2.4.5. Exporting and importing preferences

2.5. Summary

3. The Java development cycle: test, code, repeat

3.1. Java development tools methodology

3.1.1. Testing is job 1

3.1.2. A sample application and working sets

3.2. The JUnit unit testing framework

3.2.1. Method stubs and unit tests

3.2.2. Creating test cases

3.2.3. How much testing is enough?

3.2.4. Implementing the public methods

3.3. Further adventures in debugging

3.3.1. Setting breakpoint properties

3.3.2. Finding and fixing a bug

3.4. Logging with log4j

3.4.1. Loggers, appenders, and pattern layouts

3.4.2. Configuring log4j

3.4.3. Using log4j with Eclipse

3.5. Summary

4. Working with source code in Eclipse

4.1. Importing an external project

4.2. Extending the persistence component

4.2.1. Creating a factory method

4.2.2. Creating the unit test class

4.2.3. Working with the astronomy classes

4.2.4. The Star test case

4.2.5. Creating a test suite

4.2.6. Implementing the ObjectManager class

4.3. Refactoring

4.3.1. Renaming a class

4.3.2. Extracting an interface

4.3.3. Future refactoring

4.4. Summary

5. Building with Ant

5.1. The need for an official build process

5.1.1. Creating the build directory structure

5.2. Make: A retrospective

5.3. The new Java standard: Ant

5.3.1. A very brief introduction to XML

5.3.2. A simple Ant example

5.3.3. Projects

5.3.4. Targets

5.3.5. Tasks

5.3.6. Properties

5.3.7. File sets and path structures

5.3.8. Additional Ant capabilities

5.4. A sample Ant build

5.4.1. Creating the build file, build.xml

5.4.2. Performing a build

5.4.3. Debugging the build

5.5. Summary

6. Source control with CVS

6.1. The need for source control

6.2. Using CVS with Eclipse

6.2.1. Sharing a project with CVS

6.2.2. Working with CVS

6.2.3. Versions and branches

6.3. Summary

7. Web development tools

7.1. Developing for the Web

7.1.1. The web, HTML, servlets, and JSP

7.1.2. JSP overview

7.1.3. Servlet overview

7.2. Tomcat and the Sysdeo Tomcat plug-in

7.2.1. Installing and testing Tomcat

7.2.2. Installing and setting up the Sysdeo Tomcat plug-in

7.2.3. Creating and testing a JSP using Eclipse

7.2.4. Creating and testing a servlet in Eclipse

7.2.5. Placing a Tomcat project under CVS control

7.3. Building a web application

7.3.1. The web application directory structure

7.3.2. Web application design and testing

7.3.3. Programming with servlets and JSPs

7.4. Wrapping up the sample application

7.5. Summary

Part 2 Extending Eclipse

8. Introduction to Eclipse plug-ins

8.1. Plug-ins and extension points

8.1.1. Anatomy of a plug-in

8.1.2. The plug-in lifecycle

8.1.3. Creating a simple plug-in by hand

8.2. The Plug-in Development Environment (PDE)

8.2.1. Preparing your Workbench

8.2.2. Importing the SDK plug-ins

8.2.3. Using the Plug-in Project Wizard

8.3. The 'Hello, World' plug-in example

8.3.1. The Plug-in Manifest Editor

8.3.2. The Run-time Workbench

8.3.3. Plug-in class (AbstractUIPlugin)

8.3.4. Actions, menus, and toolbars (IWorkbenchWindowActionDelegate)

8.3.5. Plug-ins and classpaths

8.4. The log4j library plug-in example

8.4.1. Attaching source

8.4.2. Including the source zip in the plug-in package

8.5. Deploying a plug-in

8.6. Summary

9. Working with plug-ins in Eclipse

9.1. The log4j integration plug-in example

9.1.1. Project overview

9.1.2. Preparing the project

9.2. Editors (TextEditor)

9.2.1. Preparing the editor class

9.2.2. Defining the editor extension

9.2.3. Adding an icon

9.2.4. Adding color

9.2.5. Token manager

9.2.6. Content assist (IContentAssistProcessor)

9.2.7. Putting it all together

9.3. Views (ViewPart)

9.3.1. Adding the view

9.3.2. Modifying perspective defaults

9.3.3. View class

9.3.4. Table framework

9.3.5. Label providers (LabelProvider)

9.3.6. Models

9.3.7. Receiver thread

9.4. Preferences (FieldEditorPreferencePage)

9.4.1. Main preference page

9.4.2. Editor preference page

9.5. Plugin class

9.6. Summary

Appendix A: Java perspective menu reference

Appendix B: CVS installation procedures

B.1. Installing CVS on UNIX and Linux

B.1.1. Creating the CVS repository

B.1.2. Setting up SSH remote access

B.1.3. Setting up pserver remote access

B.2. Installing CVS on Mac OS X

B.3. Installing CVSNT on Windows

B.4. Installing Cygwin CVS and SSH on Windows

B.5. Troubleshooting the CVS installation

B.6. Backing up the CVS repository

Appendix C: Plug-in extension points

Appendix D: Introduction to SWT

D.1. What is the Standard Widget Toolkit?

D.2. SWT architecture

D.2.1. Widget creation

D.2.2. Resource disposal

D.3. SWT and events

D.4. SWT and threads

D.5. Building and running SWT programs

D.6. Using SWT

D.6.1. The BasicFramework class

D.6.2. The MainApp class

D.6.3. Trying the example

Appendix E: Introduction to JFace

E.1. Architecture

E.2. Building a JFace application

E.2.1. JFaceExample class

E.2.2. ExitAction class


About the Technology

Eclipse is a new open-source, Java-based, extensible development platform designed for nothing in particular but everything in general. Because of its roots, it is currently most popular as a Java integrated development environment (IDE). Eclipse ships with plugins for writing and debugging Java code. Additional plugins for more advanced Java development, such as JSP/servlets, are available from third parties.

About the book

Covers Eclipse 2.1 Features:

  • Hyperlinked Java code
  • Flexible project layout with linking
  • Better ant support
  • Improved watchpoints and breakpoints
  • Stack trace hyperlinks
  • New refactorings
  • Customizable code generation (templates)
  • Better Junit integration
  • Dynamically computed PDE build classpath
  • Plugin export wizard

What's inside

  • Getting started with the Eclipse Workbench: Perspectives, views and editors
  • Working effectively with the Eclipse JDT
  • Adding unit tests with JUnit, logging with log4j
  • Team development with Ant and CVS
  • Plugins for J2EE including the Sysdeo Tomcat plugin
  • Developing Eclipse plugins
  • Comprehensive Eclipse reference

About the authors

David Gallardo is an independent software consultant and author specializing in software internationalization, Java web applications, and database development. He has been a professional software engineer for over fifteen years and has experience with many operating systems, programming languages, and network protocols. He is also the author of Java Oracle Database Development. He lives in El Paso, Texas.

Ed Burnette is a Principal Systems Developer at SAS, where he has worked on such diverse projects as compilers, debuggers, device drivers, performance tuning, and UNIX ports. He also helped write several commercial computer games. Currently, Ed uses Eclipse in the development of OLAP servers, mid-tier providers, and clients written in a mixture of C, Java, and C#. He lives near Research Triangle Park, North Carolina.

Robert McGovern is a software developer for an international high voltage power supply company doing embedded development. He has a degree in Artificial Intelligence and is a member of the IEEE and the ACM. His personal interest is in Java & Ruby and he has been involved in computers and programming since the days of the Sinclair ZX Spectrum. Robert lives in West Sussex, England.

combo $44.95 pBook + PDF
eBook $35.99 PDF only

FREE domestic shipping on three or more pBooks