Manning Logo
Home | Ordering Info | Shopping Cart | Manage My Account | Login
Attention customers: online shopping is now available exclusively through our main website: http://www.manning.com. Thank you.
Eclipse in Action

Inside the book

From the Back Cover Sample Chapters Table of Contents Foreword Index Book Reviews Source Code Author Online

Manning Blog

Why small is sweet?

Author Blogs

Dave Crane more...

Author Calendar

Upcoming Events

Catalog

Java .NET Perl XML All by Subject All by Title

About...

Manning Contact Us Ordering FAQs ebooks Covers Sandbox Forums Distributors Manning Early Access Program (MEAP) Affiliate Program Academia/Publicity User Group Program Press Releases Jobs

Manning Publications Co.
209 Bruce Park Avenue
Greenwich, CT 06830

Eclipse in Action
A Guide for Java Developers
David Gallardo, Ed Burnette and Robert McGovern

2003 | 416 pages
ISBN: 1930110960
$44.95 Softbound print book  
$22.50 PDF ebook  

Table of Contents


foreword xvii
preface xxi
acknowledgments xxiii
about this book xxv
about the title xxix
about the cover illustration xxx

Part 1 Using Eclipse 1

1  Overview   3
1.1 Where Eclipse came from 4
A bit of background 5
The Eclipse organization 5
Open source software 6
1.2 What is Eclipse? 7
The Eclipse architecture 8
Language and platform neutrality 10
1.3 Whatís next 11
1.4 Summary 11

2  Getting started with the Eclipse Workbench   13
2.1 Obtaining Eclipse 14
2.2 Eclipse overview 15
Projects and folders 15
The Eclipse Workbench 16
2.3 The Java quick tour 20
Creating a Java project 20
Creating a Java class 22
Running the Java program 25
Debugging the Java program 27
Java scrapbook pages 30
2.4 Preferences and other settings 31
Javadoc comments 32
Format style 33
Code generation templates 33
Classpaths and classpath variables 35
Exporting and importing preferences 36
2.5 Summary 37

3  The Java development cycle: test, code, repeat   39
3.1 Java development tools methodology 40
Testing is job 1 41
A sample application and working sets 41
3.2 The JUnit unit testing framework 43
Method stubs and unit tests 44
Creating test cases 49
How much testing is enough? 54
Implementing the public methods 58
3.3 Further adventures in debugging 62
Setting breakpoint properties 64
Finding and fixing a bug 66
3.4 Logging with log4j 68
Loggers, appenders, and pattern layouts 69
Configuring log4j 73
Using log4j with Eclipse 75
3.5 Summary 77

4  Working with source code in Eclipse   79
4.1 Importing an external project 80
4.2 Extending the persistence component 83
Creating a factory method 84
Creating the unit test class 84
Working with the astronomy classes 85
The Star test case 88
Creating a test suite 89
Implementing the ObjectManager class 90
4.3 Refactoring 95
Renaming a class 96
Extracting an interface 99
Future refactoring 101
4.4 Summary 102

5  Building with Ant 103
5.1 The need for an official build process 104
Creating the build directory structure 105
5.2 Make: A retrospective 109
5.3 The new Java standard: Ant 112
A very brief introduction to XML 113
A simple Ant example 115
Projects 118
Targets 119
Tasks 119
Properties 126
File sets and path structures 128
Additional Ant capabilities 131
5.4 A sample Ant build 131
Creating the build file, build.xml 132
Performing a build 136
Debugging the build 138
5.5 Summary 140

6  Source control with CVS   143
6.1 The need for source control 144
6.2 Using CVS with Eclipse 146
Sharing a project with CVS 146
Working with CVS 153
Versions and branches 170
6.3 Summary 174

7  Web development tools   177
7.1 Developing for the Web 178
The web, HTML, servlets, and JSP 178
JSP overview 179
Servlet overview 181
7.2 Tomcat and the Sysdeo Tomcat plug-in 181
Installing and testing Tomcat 182
Installing and setting up the Sysdeo Tomcat plug-in 183
Creating and testing a JSP using Eclipse 185
Creating and testing a servlet in Eclipse 187
Placing a Tomcat project under CVS control 190
7.3 Building a web application 191
The web application directory structure 191
Web application design and testing 192
Programming with servlets and JSPs 197
7.4 Wrapping up the sample application 210
7.5 Summary 215


Part 2  Extending Eclipse   217

8  Introduction to Eclipse plug-ins   219
8.1 Plug-ins and extension points 220
Anatomy of a plug-in 220
The plug-in lifecycle 221
Creating a simple plug-in by hand 222
8.2 The Plug-in Development Environment (PDE) 223
Preparing your Workbench 224
Importing the SDK plug-ins 224
Using the Plug-in Project Wizard 226
8.3 The ìHello, Worldî plug-in example 228
The Plug-in Manifest Editor 230
The Run-time Workbench 231
Plug-in class (AbstractUIPlugin) 233
Actions, menus, and toolbars (IWorkbenchWindowActionDelegate) 237
Plug-ins and classpaths 241
8.4 The log4j library plug-in example 242
Attaching source 244
Including the source zip in the plug-in package 244
8.5 Deploying a plug-in 246
8.6 Summary 247

9  Working with plug-ins in Eclipse   249
9.1 The log4j integration plug-in example 250
Project overview 252
Preparing the project 253
9.2 Editors (TextEditor) 254
Preparing the editor class 255
Defining the editor extension 255
Adding an icon 259
Adding color 261
Token manager 268
Content assist (IContentAssistProcessor) 271
Putting it all together 275
9.3 Views (ViewPart) 279
Adding the view 280
Modifying perspective defaults 281
View class 282
Table framework 289
Label providers (LabelProvider) 296
Models 298
Receiver thread 300
9.4 Preferences (FieldEditorPreferencePage) 301
Main preference page 302
Editor preference page 303
9.5 Plugin class 304
9.6 Summary 305

A  Java perspective menu reference   307

B  CVS installation procedures   323
B.1 Installing CVS on UNIX and Linux 324
Creating the CVS repository 325
Setting up SSH remote access 326
Setting up pserver remote access 327
B.2 Installing CVS on Mac OS X 328
B.3 Installing CVSNT on Windows 329
B.4 Installing Cygwin CVS and SSH on Windows 330
B.5 Troubleshooting the CVS installation 332
B.6 Backing up the CVS repository 332

C  Plug-in extension points   333

D  Introduction to SWT   343
D.1 What is the Standard Widget Toolkit? 344
D.2 SWT architecture 345
Widget creation 346
Resource disposal 346
D.3 SWT and events 347
D.4 SWT and threads 348
D.5 Building and running SWT programs 350
D.6 Using SWT 353
The BasicFramework class 353
The MainApp class 356
Trying the example 359

E  Introduction to JFace   361
E.1 Architecture 362
E.2 Building a JFace application 363
JFaceExample class 364
ExitAction class 366

index 369

DESCRIPTION

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

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.

This book 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.

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.

Home | Catalog | Privacy Policy | About Manning

© 2003-2006 Manning Publications Co.