The Java™ Developer's Guide to Eclipse
Addison-Wesley Educational Publishers Inc
978-0-321-15964-9 (ISBN)
- Titel erscheint in neuer Auflage
- Artikel merken
Eclipse is a world-class Java IDE, a platform for building and integrating application development tools, and an open source project and community. Written by members of the IBM Eclipse Jumpstart team, The Java™ Developer's Guide to Eclipse is the definitive Eclipse companion. Drawing on their considerable experience teaching Eclipse and mentoring developers, the authors provide guidance on how to customize Eclipse for increased productivity and efficiency and how to avoid common pitfalls. The accompanying CD-ROM contains Eclipse SDK Version 2.0, as well as exercise solutions and many code examples for easier learning.
Sherry Shavor is a Senior Software Engineer with IBM in Research Triangle Park, North Carolina. Sherry most recently managed the Eclipse Jumpstart team providing Eclipse education to the IBM development community and business partners. Sherry has taught Java technology to customers in the United States, Canada, and China. She has also taught at North Carolina State University. Since joining IBM, Sherry has a held a variety of positions in product development, presented at numerous conferences, and published articles in the Java Developer's Journal and IBM Systems Journal. She received a B.S. in Computer Science from the State University of New York at Stony Brook. Jim D’Anjou is a senior software engineer and a certified IT Specialist located at the IBM Silicon Valley Lab in San Jose, California. He has a degree in computer science from the University of California at Berkeley. Jim has more than twenty-five years of industry experience at IBM and elsewhere. He has held a variety of technical and management positions developing products for relational databases, database tools, application repositories, and application development tools. He holds two U.S. patents for work in software process automation. In March 2001, he joined the Eclipse Jumpstart team and serves as an instructor and industry consultant. Scott Fairbrother is an advisory software engineer at IBM in Research Triangle Park, North Carolina. Scott is a software developer with more than twenty years of experience. He has developed object-oriented application frameworks for business process management. He has written specifications for IBM middleware on Windows 2000 and has also written about Microsoft Visual Studio .NET. Most recently, Scott has worked on the Eclipse Jumpstart team, helping IBM and partners create commercial offerings based on Eclipse. He received a B.S. in marine biology from the University of North Carolina at Wilmington. Dan Kehn is a senior software engineer at IBM in Research Triangle Park, North Carolina. His interest in object-oriented programming goes back to 1985, long before it enjoyed the acceptance it has today. He has a broad range of software experience, having worked on development tools like VisualAge for Smalltalk, operating system performance and memory analysis, and user interface design. Dan worked as a consultant for object-oriented development projects throughout the United States, as well as for four years in Europe. His recent interests include object-oriented analysis/design, application development tools, and Web programming with the WebSphere Application Server. He is currently concentrating on performance analysis and tuning of IBM Eclipse-based projects. John Kellerman joined IBM in 1984 with a computer science degree from Purdue University. He has since completed graduate degrees in computer engineering at North Carolina State and business administration at the University of North Carolina at Chapel Hill. He has spent the majority of his twenty years at IBM in the development and management of application development tool products, including ISPF/PDF, VisualAge Smalltalk, VisualAge Generator, and Eclipse. John was a founding member of the Eclipse Project, which got under way in late 1999. He is currently IBM Product Manager of Eclipse. His responsibilities include working closely on behalf of IBM with eclipse.org, the Eclipse Foundation, and the member companies to help grow the Eclipse community of contributors and commercial offerings. Pat McCarthy, a senior software engineer at IBM, is a specialist in the use and management of development technologies on a variety of runtime platforms. Pat’s IBM career has included hands-on development of business application systems in Poughkeepsie, New York, and 12 years of project management for the development of IBM Redbooks and education offerings in San Jose, California. He has spent the last several years in Raleigh, North Carolina, focused on supporting the use of Eclipse technology in IBM application development products. Pat has a B.S. from Indiana University of Pennsylvania, an M.S. from Marist College. He is the coauthor of more than twenty IBM Redbooks.
Foreword.
Preface.
Origin of the Book.
Goals.
Intended Audience and Prerequisites.
How the Book Is Organized.
Coding Conventions.
CD-ROM.
Acknowledgments.
About the Authors.
I. RUNNING ECLIPSE.
1. Getting Started.
Software Challenge and Eclipse.
What Is Eclipse?
Java Development Environment.
Tool Integration Platform.
Open Source Community.
What Is the Common Public License?
Getting and Installing Eclipse.
The Eclipse Look: Editors, Views, and Perspectives.
Working in Eclipse.
A Word to IBM VisualAge Users.
Chapter Summary.
References.
2. Using Eclipse.
Getting Started.
Oops!
Creating Your First Project.
Overview of the User Interface.
Introducing Preferences.
Manipulating the User Interface.
Fundamental Eclipse Use.
Working with Tasks.
Working with Bookmarks.
Getting Help.
Resource Management.
Your Workspace.
More on Projects.
Importing and Exporting Resources.
Moving Resources.
Text Editor.
Printing.
Customizing Eclipse.
Perspectives.
Running Multiple Eclipse Windows.
Customizing Your JRE.
Using Other Computer Programs with Eclipse.
Help System.
Performance.
More on Preferences.
Workbench.
External Tools.
Exercise Summary.
Chapter Summary.
3. Using Java Development Tools.
Getting Started.
Overview of the JDT User Interface.
The Fundamentals.
Searching.
Writing Java Code.
Content Assist.
Code Generation.
Navigating Java Errors and Warnings.
Fixing Java Errors with Quick Fix.
Refactoring.
Browsing Javadoc.
Using Code Templates.
Externalizing Strings.
Generating Javadoc.
Writing Java for Nondefault JREs.
Running Java Code.
Using the Run Action.
Managing Launch Configurations.
Evaluating Expressions in Scrapbook Pages.
Working with Java Elements.
More on Java Projects.
Creating Java Projects.
Creating Folders.
Creating Classes and Interfaces.
Importing Java Elements.
Local History for Java Elements.
Tuning the Performance of JDT.
More on JDT Views and Perspectives.
Filtering View Contents.
Package Explorer View.
Hierarchy View.
Tasks View.
Search View.
Java Type Hierarchy Perspective.
Java Browsing Perspective.
Exercise Summary.
Chapter Summary.
4. Debugging Java.
Overview.
The Fundamentals.
Setting a Breakpoint.
Starting a Debugging Session.
Controlling Program Execution.
Examining an Executing Program.
Additional Debugging Capabilities.
Evaluating Expressions.
Changing Variable and Field Values.
Debugging with the Java Editor.
Manipulating the Programs You're Debugging.
More on Breakpoints.
Java Exception Breakpoints.
Method Breakpoints.
Watchpoints.
Program Output in the Console View.
Debug Launch Configurations.
Associating a Source with Your Programs.
Hot Code Replace.
Remote Debugging.
Exercise Summary.
Chapter Summary.
5. Teaming Up with Eclipse.
Eclipse Support for CVS.
General Team Support by Eclipse.
Common Principles of Eclipse Team Support.
Configuring Team Support.
An Overview of CVS for the Novice.
Some Key CVS Design Principles.
Revisions: Nothing Ever Goes Away.
Updating: Keeping Up with the Team.
Committing: Your Turn to Share.
Versioning: Capturing the Moment.
Branching and Merging: Support for Parallel Development.
What Happens to Revision Numbers During Branching and Merging.
Managing Binary Files Using CVS.
The CVS User Interface in Eclipse.
CVS Repository Exploring Perspective: Your Repository Home Page.
The CVS Repositories View.
The CVS Resource History View.
The CVS Console View.
How CVS Managed Projects Appear in Your Workspace.
CVS Actions Available from the Team Menu.
The Very Important CVS Synchronize View.
Handling Concurrent Updates to the Same File.
Special Situations and How to Handle Them.
Renaming, Moving, and Deleting Project Resources.
Backing Out a Change: Using Replace and Compare.
Setting up Branches for Maintenance and New Release Development.
Additional Features.
Patches: Sharing Changes Quickly and Easily.
Project Sets: Getting That New Workspace Up to Speed.
Disconnecting or Reassigning a CVS Project.
Exercise Summary.
Chapter Summary.
References.
6. Eclipse Configuration Management.
Structure of an Eclipse Installation.
Eclipse Directory Content.
The Role of Plug-ins.
The Role of Features.
Update Manager.
Identifying Features in the Run-Time Platform.
Update Manager-An Introduction.
The Configuration, Install Sites, and Update Sites.
Viewing Your Configuration.
Install Configuration View.
Preview View.
Feature Updates View.
Managing Configuration Processing.
Eclipse Startup-the First Time.
Beyond the First Time-Subsequent Platform Launches.
Establishing a Default Configuration.
Preloading Features on a Default Configuration.
Sharing the Platform with Others-Multi-User Install.
Exercise Summary.
Chapter Summary.
II. EXTENDING ECLIPSE.
7. Overview of the Eclipse Architecture.
Extensibility.
The Eclipse Platform.
User Interface Frameworks.
Standard Widget Toolkit.
JFace UI.
Workbench UI.
Resources and Workspace API.
Chapter Summary.
References.
8. Getting Started: Plug-in Development.
Getting Started with Plug-ins.
Integration Scenarios.
Distributing Your Eclipse-Based Tool.
Getting Started with Extensions and Extension Points.
Basic Steps of Implementing a Plug-in.
Declaring Your Plug-in Manifest.
Defining Your Plug-in Class 216Installing Your Plug-in.
Using the Plug-in Development Environment.
PDE Views and Editors.
Managing the Run-Time and Development Environment.
Creating and Running a Plug-in.
Developing Eclipse with Eclipse: Standalone Versus Distributed Self-Hosting.
Exercise Summary.
Chapter Summary.
References.
9. Action Contributions: The Integration Fast Track.
Action Contribution Extension Points.
The Fundamentals of Action Contributions.
The Contribution Action API.
Specifying Contributions in the Plug-in Manifest File.
Specifying Actions in Menus and Toolbars.
Using Filters to Refine Where Your Actions Appear.
The Class Selection Filter.
Creating Elaborate Filters Using Action Expressions.
Contributing to the Workbench Menu Bar and Toolbar.
Defining Menu and Toolbar Actions Independent of Perspectives.
Contributing to the View's Menu and Toolbar.
Contributing to an Editor's Menu and Toolbar.
Contributing Context Menus to Views and Editors.
Contributing a Context Menu to a View.
Contributing a Context Menu to an Editor.
Contributing a Context Menu to an Object in a View.
Chapter Summary.
References.
10. The Standard Widget Toolkit: A Lean, Mean Widget Machine.
The Basic Structure of an SWT Application.
Common SWT Widgets.
Refining a Widget's Appearance Using Style Bits.
Responding to Widget Events.
How to Arrange SWT Widgets Using Layout Managers.
Fill Layout.
Row Layout.
Grid Layout.
Form Layout.
Error Handling.
Widgets Have Special Disposal Requirements.
Using Threads to Separate UI and non-UI Activities.
An Overview of SWT Packages.
Exercise Summary.
Chapter Summary.
References.
11. Dialogs and Wizards.
Dialogs-You Can Find Them Everywhere.
Point of Reference-The UI Framework.
Workbench Extension Points for Dialogs and Wizards.
Common Reusable Dialogs.
Extending the Preferences Dialog to Add Your Own Tool Options.
Defining a Preference Page Extension.
Implementing a Preference Page.
Defining the Preference Page User Interface.
Preference Management in a Plug-in.
Establishing Default Preference Setting Values.
Adding Preference Value Logic to Preference Page.
Reacting to Preference Setting Changes.
Building a Field Editor Preference Page.
Using Property Pages to Remember Something Special About a Resource.
Defining a Property Page Extension.
Implementing a Property Page.
Defining the Property Page User Interface.
Adding Resource Property Access Logic.
Resource Generic Memories-Using the Inherited Preferences Implementation.
Implementing Your Own Properties Dialog.
Using Wizards to Extend Workbench Resource Creation and Import/Export Support.
Adding Wizards to the Workbench User Interface by Extension.
Implementing a Wizard.
Implementing a Wizard Page.
Customizing the Wizard.
Controlling Wizard Page Progression.
Reusable Specialized Wizard Pages.
Directly Opening a Wizard Dialog.
Using a Dialog Setting.
Exercise Summary.
Chapter Summary.
References.
12. Views.
View Behavior and Architecture.
Basic Implementation Steps.
Designing the Look of the View.
Declaring the View Extension.
Creating the View Class.
Creating the Content Provider.
Creating the Label Provider.
Associating the Viewer and the Model.
Synchronizing the Model and View.
Handling User Selections.
Filtering the View.
Sorting the View.
Adding View Actions.
Supporting Global Actions in Views.
Adding Label Decorations on Objects in a View.
Interacting with Other Views.
Properties View.
Exercise Summary.
Chapter Summary.
References.
13. Editors.
Editor Behavior and Architecture.
Basic Implementation Steps.
Designing the Look of the Editor.
Creating a New Wizard for the Editor Input (Optional).
Declaring the Editor Extension Point.
Creating the Editor Class.
Instantiating the Model Using the Editor Input.
Creating the Content Provider.
Creating the Label Provider.
Handling User Modifications of the Editor Input.
Handling the Saving of the Editor Input.
Associating the Viewer and the Model.
Synchronizing the Model and the Editor.
Handling User Selections.
Adding Editor Actions.
Linking an Editor and the Outline View.
Exercise Summary.
Chapter Summary.
References.
14. Perspectives.
Perspectives.
Creating a Perspective.
Using the perspective extensions Extension Point.
Exercise Summary.
Chapter Summary.
References.
15. Workspace Resource Programming.
Resource Concepts.
Physical View.
Logical View.
Resource Model and File System Interaction.
Workspace API.
Workspace and Workspace Root-Entry Point for Services and Resources.
Resource Containers.
Workspace Resource Handles-Understanding What You Get When You Ask.
Working with Projects.
Working with Resources.
Working with Paths.
Working with Folders and Files.
Processing the Resource Tree.
Resource Properties.
Session Properties.
Persistent Properties.
Processing Workspace Change Events.
Tracking Changes Using the Workspace API.
Adding Resource Change Listeners.
Visiting the Resource Delta.
Resource Delta Content.
Resource Modification Event Management.
Using Workspace Save Events to Save Critical Data.
Save Events-What and When.
Save Participant API.
Exercise Summary.
Chapter Summary.
References.
16. Managing Resources with Natures and Builders.
Customizing Project Processing.
Extending the Workspace Resource Processing Framework.
Projects and Project Descriptions.
Defining and Implementing Natures.
Creating Natures to Support Project Configuration.
Adding a Nature to a Project.
Managing Nature-Builder Relationships.
Using a Custom Image to Identify Your Project Nature.
Implementing a Custom Builder.
Builder Concepts-The How and When of Build Processing.
Builder Requirements-Why You Should, or Should Not, Create a Builder.
Defining Builders for Incremental Resource Transformation.
Exercise Summary.
Chapter Summary.
References.
17. Resource Tagging Using Markers.
Marker Concepts.
Creating Markers for Customized Resource Tagging.
Creating New Marker Types.
Extending Markers with Help and Resolution Support.
Exercise Summary.
Chapter Summary.
References.
18. Contributions Revisited.
Sample Contributions.
A Few More Contribution Nuggets.
Chapter Summary.
19. Advanced Plug-in Development.
Plug-in Class Loader.
Run-Time Discovery and Delayed Loading.
Plug-in Granularity.
Plug-in Fragments.
Fragments as Language Packs.
Fragments as Platform-Specific Content.
Chapter Summary.
References.
20. Creating New Extension Points: How Others Can Extend Your Plug-ins.
Overview of the Eclipse Architecture, Revisited.
Relationship Between Extension Points and Extensions.
Plug-in Registry: The Official List of Enabled Plug-ins, Extensions, and Extension Points.
How to Define New Extension Points.
Choosing the Existing Code You Want to Enable Others to Extend or Configure.
Declaring the Existence of the New Extension Point.
Defining an Interface for Expected Behavior.
Processing the Plug-in Registry Entries for Your Extension Points.
Invoking the Appropriate Methods Per the Previously Defined Interface Contract.
How to Enable the Schema-Based New Extension Wizard.
Why Define a Schema?
Schema Editor.
Exercise Summary.
Chapter Summary.
References.
21. Serviceability.
Plug-in Diagnostics: System and Configuration Information.
Workbench Status Objects: A Status Collector.
MultiStatus Example.
Exception Handling: Error Detection.
Error Dialogs: Providing Detailed Status in Error Messages.
Error Dialog Example.
Run-Time Tracing: A Run-Time Diagnostic Tool.
Tracing Example.
Using Tracing in a Production Environment.
Diagnostics: A Comprehensive Error Log.
Error Logging: Writing to the Workbench Error Log.
Adding Error Logging.
Exercise Summary.
Chapter Summary.
22. Developing Features.
All About Features.
Types of Features.
Creating Structure with Features.
Feature Definition.
Feature Manifest.
Identifying Prerequisites, Included Features, and Plug-ins.
Prerequisite Version-Matching Rules.
Servicing Your Features.
Feature Branding.
Branding Content in a Feature and Plug-in.
Identifying the Primary Feature.
Product and Feature Branding in the User Interface.
Building on Eclipse.
Creating an Installable Feature.
Building Your Own Product on the Eclipse Platform.
Building Extensions to Other Products.
Delivering Features for Installation Using Update Manager.
Using the PDE for Feature Development and Deployment.
Exercise Summary.
Chapter Summary.
References.
23. Providing Help.
Integrating Your Online Documentation.
Creating Help Content as HTML Content.
Declaring the Help Extension.
Creating Table of Contents Files.
Eclipse Online Documentation.
Creating Context-Sensitive Help.
Declaring the Help Context Extension.
Defining the Contents of the Infopop.
Associating the Infopop with the UI Context.
Running Nonintegrated Help.
Customizing Your Help System.
Exercise Summary.
Chapter Summary.
References.
24. OLE and ActiveX Interoperability.
COM Support in Eclipse.
In-Place OLE Documents.
In-Place ActiveX Controls.
COM Container Support.
Creating an OleFrame Object.
Creating an OleClientSite Object.
Activating an OLE Object.
Deactivating an OLE Object.
Eclipse OLE Editor Support.
Creating an OleControlSite Object.
Activating the OleControlSite Object.
OLE Automation-Accessing Extended Behavior.
OLE exec Command.
IDispatch Interface.
Methods.
Invocation Without Parameters.
Variant Types.
Invocation with Parameters.
Properties.
Events and Property Listeners.
Exercise Summary.
Chapter Summary.
References.
25. Swing Interoperability.
Background on Integration of Swing and SWT.
Launch and Edit Integration.
Modes of Invocation.
Improving the End User Experience.
ABCEditor Example-In-Process Invocation.
Implementation Details-In-Process Invocation.
Exercise Summary.
Chapter Summary.
References.
26. Extending the Java Development Tools.
What Is the JDT and What Does It Do?
Java Model.
Accessing Reusable JDT Functionality.
JavaCore Class.
JavaUI Class.
ToolFactory Class.
Compiling Java Source Code.
Analyzing Java Source Code.
JDT Abstract Syntax Tree.
Finer-Grain Parsing of Java Source Code.
Manipulating Java Source Code.
Simple Java Element Source Code Manipulations.
More Complex Source Code Manipulations.
Where the JDT Extends Eclipse.
Extending the JDT User Interface.
Contributing View Actions.
Contributing Editor Actions.
Contributing to Java Element Context Menus.
Contributing to Specific View or Editor Context Menus.
Contributing to Global Actions.
Reusing Common JDT Selection Dialogs.
Exercise Summary.
Chapter Summary.
References.
27. Building a Custom Text Editor with JFace Text.
Standard Text Editor Functions.
Text Editing and Viewing.
Standard Menus and Toolbar Items.
Standard Marker Representation.
Editor Configuration: Customization Points.
What Is Content Assist?
What Is Syntax Highlighting?
What Is Content Formatting?
Miscellaneous Customizations.
Under the Covers of the Text Editor.
AbstractTextEditor Class.
TextViewer Class.
AbstractTextEditor Class Relationships.
Document Class.
DocumentProvider Class.
Model-View-Controller Relationship.
DocumentPartitioner Class.
SourceViewerConfiguration Class.
How to Create a Basic Source Editor.
Phase 1: Creating a Basic Editor.
Phase 2: Adding Content Assist to Your Basic Editor.
Phase 3: Adding Syntax-Based Color Highlighting.
Phase 4: Defining Content Formatting.
Exercise Summary.
Chapter Summary.
References.
III. EXERCISES.
28. Exercise 1: Using Eclipse.
Section 1: Your First Eclipse Project.
Section 2: Editors and Views.
Section 3: Working with Resources.
Section 4: Perspectives.
Section 5: Using Multiple Eclipse Windows.
Section 6: Getting Help.
29. Exercise 2: Using the Java Development Tools.
Section 1: Hello World.
Section 2: Quick Fix.
Section 3: Code Generation.
Section 4: Refactoring.
Section 5: Launch Configurations.
Section 6: JRE 1.4 Code.
30. Exercise 3: Debugging Java.
Section 1: Debugging.
Section 2: Debugging Threads.
Section 3: Remote Debugging.
31. Exercise 4: Using CVS with Eclipse.
Exercise Setup.
Creating Your Workspace Project.
Section 1: Getting Started.
Setting Your Team and CVS Preferences.
Defining a CVS Repository Location.
Putting the Project Under CVS Control.
Storing the Project Contents in CVS.
Versioning the Project.
Section 2: Updating, Committing, and Resolving Conflicts.
Modifying the Code in Your Project.
Storing Your Changes in CVS.
Making Additional Changes in Your Project.
Resolving Conflicts with CVS.
Section 3: Branching and Merging.
Branch and Merge Process Using Eclipse.
Updating Your Project and Storing the Changes in a CVS Branch.
Merging Your Project Changes from the Branch Back to CVS HEAD.
Exercise Activity Review.
32. Exercise 5: Modifying Your Configuration with Update Manager.
Section 1: Installing New Features.
Section 2: Disabling Features.
Section 3: Pending Changes-Discovering Direct Configuration Modification.
Section 4: Searching for New or Updated Features.
33. Exercise 6: Using the Plug-in Development Environment.
Exercise Setup.
Exercise Instructions.
Section 1: "Hello, World" in Five Minutes or Less.
Section 2: "Hello, World" with Detailed Step-by-Step Instructions.
Section 3: Testing with the Run-Time Workbench.
Section 4: Debugging with the Run-Time Workbench.
Section 5: Exploring (and Sometimes Correcting) the Eclipse Platform Code.
Section 6: Correcting Common Problems.
Exercise Activity Review.
34. Exercise 7: Feature Development and Deployment.
Exercise Concepts.
Exercise Setup.
Exercise Instructions.
Section 1: Tasks of an Eclipse Feature Developer.
Generating JAR Files for Selected Plug-ins.
Packaging the Function Provided by Your Plug-ins as a Feature.
Adding Product and Feature Branding to the Feature.
Repackaging the Feature.
Extracting an Installable Feature from Workspace and Implementing an Update Site.
Section 2: Tasks of an Eclipse User.
Installing a New Feature as an Extension to an Existing Product.
Adding a Feature to an Existing Product Configuration from an Update Site.
Section 3: Tasks of a Product Developer.
Implementing a Branded Product.
Launching and Reviewing a Branded Product Installation.
Exercise Activity Review.
Index. 0321159640T05052003
Erscheint lt. Verlag | 5.6.2003 |
---|---|
Verlagsort | New Jersey |
Sprache | englisch |
Gewicht | 1374 g |
Themenwelt | Informatik ► Programmiersprachen / -werkzeuge ► Java |
Mathematik / Informatik ► Informatik ► Web / Internet | |
ISBN-10 | 0-321-15964-0 / 0321159640 |
ISBN-13 | 978-0-321-15964-9 / 9780321159649 |
Zustand | Neuware |
Haben Sie eine Frage zum Produkt? |
aus dem Bereich