You are previewing Contributing to Eclipse: Principles, Patterns, and Plug-Ins.
O'Reilly logo
Contributing to Eclipse: Principles, Patterns, and Plug-Ins

Book Description

"Even long-time Eclipse committers will be surprised by the breadth and depth of this book. A must-read for every new Eclipse extender."

--Andre Weinand, Eclipse Committer

Contributing to Eclipse offers

  • A quick step-by-step tutorial. Have your first plug-in running in less than an hour.

  • An introduction to test-driven plug-in development. Confidently create higher quality plug-ins.

  • The Rules of Eclipse. Seamlessly integrate your contributions with the rest of Eclipse.

  • A design pattern tour of Eclipse. A cook's tour of Eclipse with patterns.

  • A comprehensive tutorial. See all the techniques necessary to write production-quality contributions.

Erich Gamma and Kent Beck introduce you quickly, yet thoroughly, to Eclipse, the emerging environment for software development. Instead of simply walking you through the actions you should take, Contributing to Eclipse, with its many sidebars, essays, and forward pointers, guides you through Eclipse. You will not just do. You will also understand.

Whether you need to get up to speed immediately or want to better understand the design rationale behind Eclipse, Contributing to Eclipse is the Eclipse resource for you.



0321205758B10142003

Table of Contents

  1. Copyright
    1. Dedication
  2. The Eclipse Series
  3. Foreword
  4. Preface
    1. Conventions Used in This Book
    2. Online Examples
    3. Acknowledgments
  5. 1. The Big Picture
    1. 1.1. Book Goals
    2. 1.2. Plug-In
    3. 1.3. Eclipse in a Nutshell
  6. I. Circle Zero: Hello World
    1. 2. Setting Up Eclipse for Plug-In Development
      1. 2.1. Setting Up a Workspace
      2. 2.2. Browsing and Searching Source
      3. 2.3. Forward Pointers
    2. 3. Hello World
      1. 3.1. Declaration/Implementation Split
      2. 3.2. Hello Button
      3. 3.3. Saying “Hello”
        1. 3.3.1. HelloAction.java
        2. 3.3.2. plugin.xml
      4. 3.4. Forward Pointers
  7. II. Circle One: Basic Plug-In
    1. 4. Der Plan
      1. 4.1. JUnit by Example
      2. 4.2. JUnit Integration
    2. 5. Contributing a Menu Item to Run Tests
      1. 5.1. Forward Pointers
    3. 6. Implementing the Menu Item Behavior
      1. 6.1. Forward Pointers
    4. 7. Displaying the Results
      1. 7.1. Forward Pointers
    5. 8. Defining an Extension Point
      1. 8.1. Forward Pointers
    6. 9. Notifying Extensions
    7. 10. Publishing
      1. 10.1. Package the Plug-In
      2. 10.2. Bundling the Plug-In into a Feature
      3. 10.3. Contributing
      4. 10.4. Forward Pointers
    8. 11. Closing Circle One
    9. 12. Interlude: Test-Driven Plug-In Development
      1. 12.1. PDE JUnit
      2. 12.2. A Test Project Fixture
      3. 12.3. Testing the Contributed JUnit Plug-In
      4. 12.4. And Now…
  8. III. Circle Two: The Rest of the Plug-In
    1. 13. Viewing Results
      1. 13.1. Contributing a View
      2. 13.2. Listening to Testing Progress
      3. 13.3. Changing Colors
    2. 14. Menu Contributions
      1. 14.1. Creating Context Menus
      2. 14.2. Contributing Menu Items
      3. 14.3. Forward Pointers
    3. 15. Failed Tests Are Compile Errors
    4. 16. Test Failures as Markers
      1. 16.1. Test for a Marker
      2. 16.2. Passing the Project
      3. 16.3. Creating Markers
      4. 16.4. Deleting Markers
      5. 16.5. Marker Images
      6. 16.6. Marker Resolution
    5. 17. Finding Tests
    6. 18. Builders and Natures
      1. 18.1. Resource Listeners Versus Builders
      2. 18.2. Using Natures to Configure Builders
      3. 18.3. Forward Pointers
    7. 19. Auto-Test Property
      1. 19.1. Forward Pointers
    8. 20. Exception Handling
      1. 20.1. IStatus, CoreException
      2. 20.2. Presenting Exceptions in an Error Dialog
      3. 20.3. Logging Errors
    9. 21. Tracing — Instrumenting a Plug-In
      1. 21.1. Forward Pointers
    10. 22. Marker Resolution — Invoking a Long-Running Operation
      1. 22.1. Testing Marker Resolution
      2. 22.2. Build and Rerun
      3. 22.3. Showing Progress
      4. 22.4. Rerunning the Test
      5. 22.5. Forward Pointers
    11. 23. Test Report View — Using JFace
      1. 23.1. TestResult
      2. 23.2. The Test
      3. 23.3. The View
      4. 23.4. TestReportLabelProvider
      5. 23.5. TestReportContentProvider
      6. 23.6. Handling Events
      7. 23.7. Forward Pointers
    12. 24. A Simple Editor to Exclude Tests
      1. 24.1. Contributing an Editor
      2. 24.2. Contributing a Contributor
      3. 24.3. Forward Pointers
    13. 25. ResultView Revisited — Observing Changes
      1. 25.1. Testing Color
      2. 25.2. Observing Changes
      3. 25.3. Reacting to Changes
      4. 25.4. Forward Pointers
    14. 26. Perspectives
      1. 26.1. Views in Perspective
      2. 26.2. Show View Menu
      3. 26.3. Forward Pointers
    15. 27. Help
      1. 27.1. Top-Level Help
      2. 27.2. Integrated Help
      3. 27.3. Context-Sensitive Help
      4. 27.4. Forward Pointers
    16. 28. Internationalization and Accessibility
      1. 28.1. Externalizing Strings from the Manifest Files
      2. 28.2. Externalizing Strings from Code
      3. 28.3. Accessibility
      4. 28.4. Forward Pointers
    17. 29. Publishing a Plug-In for Other Programmers
      1. 29.1. Defining the API
      2. 29.2. Exporting Classes
      3. 29.3. Separating Published from Internal Packages
      4. 29.4. Separating Core from UI
      5. 29.5. Publishing an Extension Point—Extension Point Schemas
      6. 29.6. Forward Pointers
    18. 30. Closing Circle Two
      1. 30.1. Contributing
      2. 30.2. Redeploying the Plug-In
      3. 30.3. Where to Go Next?
  9. IV. Circle Three: Pattern Stories
    1. 31. Core Runtime — IAdaptable
      1. 31.1. Extension Object/Extension Interface
      2. 31.2. Surfacing Interfaces Using IAdaptable
      3. 31.3. AdapterFactories—Adding Interfaces to Existing Types
    2. 32. Core Workspace — Resources
      1. 32.1. Accessing File-System Resources—Proxy and Bridge
      2. 32.2. The Workspace—Composite
      3. 32.3. Traversing the Resource Tree—Visitor
      4. 32.4. Tracking Resource Changes—Observer
      5. 32.5. Batching Changes—Execute Around Method
    3. 33. Java Core
      1. 33.1. From Resources to Java Elements—Adapter
      2. 33.2. Java Elements—(Virtual) Proxy
      3. 33.3. The Java Element Tree—Composite
      4. 33.4. Type Hierarchies—Objectifying an Association
      5. 33.5. Traversing the Java Model
      6. 33.6. Tracking Java Element Changes—Observer
      7. 33.7. Collecting Results—Builder
      8. 33.8. Abstract Syntax Tree Analysis—Visitor
    4. 34. Standard Widget Toolkit — SWT
      1. 34.1. Composing Widgets—Composite
      2. 34.2. Defining the Layout—Strategy
      3. 34.3. Responding to Events—Observer
    5. 35. JFace — User Interface Frameworks
      1. 35.1. Viewers: Connecting a Widget to a Model—Pluggable Adapter
      2. 35.2. Viewers: Customizing a Viewer without Subclassing—Strategy
      3. 35.3. Actions—Command
    6. 36. UI Workbench
      1. 36.1. Implementing the Lazy Loading Rule—Virtual Proxies
      2. 36.2. Persisting UI State—Memento
        1. 36.2.1. Memento
        2. 36.2.2. Restoring Many Open Views and Editors
      3. 36.3. Workbench Services—IAdaptable
        1. 36.3.1. IWorkbenchAdapter
        2. 36.3.2. IResource Adapter
        3. 36.3.3. Object Contributions
        4. 36.3.4. Overview of Workbench-Provided Adapters
    7. 37. Closing Circle Three
      1. 37.1. Final Forward Pointers
        1. 37.1.1. Additional Eclipse Components Overview
        2. 37.1.2. Example Plug-Ins and Sample Code
        3. 37.1.3. Eclipse Articles
      2. 37.2. An Invitation to Contribute
  10. V. Appendices
    1. A. TestRunner Details
      1. A.1. TestRunner
      2. A.2. SocketTestRunner
    2. B. The TestProject Fixture
    3. C. AutoTestBuilder with Exclusion Support
  11. References