Home > Store

Eclipse Plug-ins, 3rd Edition

Register your product to gain access to bonus material or receive a coupon.

Eclipse Plug-ins, 3rd Edition


  • Sorry, this book is no longer in print.
Not for Sale

eBook (Watermarked)

  • Your Price: $38.39
  • List Price: $47.99
  • Includes EPUB and PDF
  • About eBook Formats
  • This eBook includes the following formats, accessible from your Account page after purchase:

    ePub EPUB The open industry format known for its reflowable content and usability on supported mobile devices.

    Adobe Reader PDF The popular standard, used most often with the free Adobe® Reader® software.

    This eBook requires no passwords or activation to read. We customize your eBook by discreetly watermarking it with your name, making it uniquely yours.


  • Copyright 2009
  • Dimensions: 7" x 9-1/4"
  • Edition: 3rd
  • Book
  • ISBN-10: 0-321-55346-2
  • ISBN-13: 978-0-321-55346-1

Producing a commercial-quality plug-in means going above and beyond the minimal requirements needed to integrate with Eclipse. It means attending to all those details that contribute to the “fit and polish” of a commercial offering. This comprehensive guide covers the entire process of plug-in development, including all the extra steps needed to achieve the highest quality results.

Building on two internationally best-selling previous editions, Eclipse Plug-ins, Third Edition, has been fully revised to reflect the powerful new capabilities of Eclipse 3.4. Leading Eclipse experts Eric Clayberg and Dan Rubel present detailed, practical coverage of every aspect of plug-in development, as well as specific, proven solutions for the challenges developers are most likely to encounter.

All code examples, relevant API listings, diagrams, and screen captures have been thoroughly updated to reflect both the Eclipse 3.4 API and the latest Java syntax. In addition, Clayberg and Rubel have completely revamped their popular Favorites View case study, reworking much of its content and recreating its code from scratch. The authors carefully cover new functionality added to existing Eclipse features, such as views and editors, and fully explain brand-new features such as Commands, GEF, and PDE Build.

This extensively revised edition

  • Thoroughly covers Eclipse’s new preferences
  • Illuminates the powerful new Eclipse Command Framework, which replaces Eclipse’s older Action Framework
  • Presents extensive new discussions of using commands with views and editors
  • Introduces Mylyn, the new task-focused interface that reduces information overload and simplifies multi-tasking
  • Contains an all-new chapter on using the Graphical Editing Framework (GEF) to build dynamic, interactive graphical user interface elements
  • Walks you step by step through the entire PDE Build process
  • Shows how to create update sites with p2, which replaces Eclipse’s old Update Manager
This book is designed for every experienced developer interested in extending the Eclipse platform, the Rational Software Development Platform, or any other platform that supports Eclipse plug-ins.

Sample Content

Online Sample Chapter

A Simple Eclipse Plug-in Example

Sample Pages

Download the sample pages (includes Chapter 2 and Index)

Table of Contents

Foreword by Skip McGaughey     xxxiii
Foreword by Simon Archer      xxxv
Preface      xxxvii

Chapter 1: Using Eclipse Tools      1
1.1 Getting Started    1
1.2 The Eclipse Workbench    3
1.3 Setting Up Your Environment    14
1.4 Creating a Project     19
1.5 Navigating     26
1.6 Searching     28
1.7 Writing Code     35
1.8 Team Development Using CVS     49
1.9 Running Applications     55
1.10 Introduction to Debugging     59
1.11 Introduction to Testing     63
1.12 Introduction to Mylyn     65
1.13 Summary     69

Chapter 2: A Simple Plug-in Example      71
2.1 The Favorites Plug-in     71
2.2 Creating a Plug-in Project     72
2.3 Reviewing the Generated Code     77
2.4 Building a Product     86
2.5 Installing and Running the Product     92
2.6 Debugging the Product    94
2.7 PDE Views     96
2.8 Writing Plug-in Tests     99
2.9 Book Samples     105
2.10 Summary     106

Chapter 3: Eclipse Infrastructure     107
3.1 Structural Overview    107
3.2 Plug-in Directory or JAR file    110
3.3 Plug-in Manifest     113
3.4 Activator or Plug-in Class     120
3.5 Plug-in Model     126
3.6 Logging    128
3.7 Eclipse Plug-ins     132
3.8 Summary     133

Chapter 4: The Standard Widget Toolkit      135
4.1 SWT History and Goals    135
4.2 SWT Widgets    138
4.3 Layout Management     178
4.4 Resource Management     188
4.5 GUI Builders     190
4.6 Summary     191

Chapter 5: JFace Viewers     193
5.1 List-Oriented Viewers     193
5.2 Text Viewers     211
5.3 Summary     214

Chapter 6: Commands and Actions     215
6.1 Commands     216
6.2 Menu and Toolbar Contributions     220
6.3 Handlers    236
6.4 Key Bindings     238
6.5 IAction versus IActionDelegate     240
6.6 Workbench Window Actions    242
6.7 Object Actions     257
6.8 View Actions     270
6.9 Editor Actions     277
6.10 Actions and Key Bindings     284
6.11 RFRS Considerations     286
6.12 Summary     287

Chapter 7: Views      289
7.1 View Declaration     291
7.2 View Part     293
7.3 View Commands     313
7.4 Linking the View     336
7.5 Saving View State    340
7.6 Testing     345
7.7 Image Caching     346
7.8 Auto-sizing Table Columns     348
7.9 RFRS Considerations     348
7.10 Summary     352

Chapter 8: Editors      353
8.1 Editor Declaration     354
8.2 Editor Part     358
8.3 Editing     372
8.4 Editor Lifecycle     378
8.5 Editor Commands     381
8.6 Linking the Editor     400
8.7 RFRS Considerations     401
8.8 Summary     405

Chapter 9: Resource Change Tracking      407
9.1 IResourceChangeListener     407
9.2 Processing Change Events     411
9.3 Batching Change Events     414
9.4 Progress Monitor     415
9.5 Delayed Changed Events    420
9.6 Summary     421

Chapter 10: Perspectives     423
10.1 Creating a Perspective     423
10.2 Enhancing an Existing Perspective     430
10.3 RFRS Considerations    438
10.4 Summary     439

Chapter 11: Dialogs and Wizards      441
11.1 Dialogs     441
11.2 Wizards     464
11.3 RFRS Considerations     482
11.4 Summary     484

Chapter 12: Preference Pages     485
12.1 Creating a Preference Page     485
12.2 Preference Page APIs     487
12.3 Preference APIs     501
12.4 RFRS Considerations     508
12.5 Summary     509

Chapter 13: Properties      511
13.1 Creating Properties     511
13.2 Displaying Properties in the Properties Dialog     515
13.3 Displaying Properties in the Properties View     524
13.4 Property Pages Reused as Preference Pages    529
13.5 RFRS Considerations   530
13.6 Summary     531

Chapter 14: Builders, Markers, and Natures      533
14.1 Builders     535
14.2 Markers     548
14.3 Natures     561
14.4 RFRS Considerations     572
14.5 Summary     575

Chapter 15: Implementing Help      577
15.1 Using Help    577
15.2 Implementing Help     580
15.3 Context-Sensitive Help (F1)     591
15.4 Accessing Help Programmatically     599
15.5 Cheat Sheets     601
15.6 RFRS Considerations     611
15.7 Summary     614

Chapter 16: Internationalization     617
16.1 Externalizing the Plug-in Manifest     618
16.2 Externalizing Plug-in Strings     620
16.3 Using Fragments     629
16.4 Manual Testing     636
16.5 Summary     636

Chapter 17: Creating New Extension Points      637
17.1 The Extension Point Mechanism      637
17.2 Defining an Extension Point     639
17.3 Code Behind an Extension Point    649
17.4 Extension Point Documentation    656
17.5 Using the Extension Point    657
17.6 RFRS Considerations    659
17.7 Summary     660

Chapter 18: Features, Branding, and Updates     661
18.1 Feature Projects     662
18.2 Branding     673
18.3 Update Sites     679
18.4 RFRS Considerations     689
18.5 Summary     691

Chapter 19: Building a Product      693
19.1 A Brief Introduction to Ant      693
19.2 Building with PDE      711
19.3 Debugging the PDE Build process     726
19.4 Summary     729

Chapter 20: GEF: Graphical Editing Framework      731
20.1 GEF Architecture     731
20.2 GEF Model     732
20.3 GEF Controller     733
20.4 GEF Figures     743
20.5 GEF in an Eclipse View    754
20.6 GEF in an Eclipse Editor     758
20.7 Palette     775
20.8 Summary     778

Chapter 21: Advanced Topics     779
21.1 Advanced Search—Reference Projects     780
21.2 Accessing Internal Code     781
21.3 Adapters     784
21.4 Opening a Browser or Creating an Email     788
21.5 Types Specified in an Extension Point     793
21.6 Modifying Eclipse to Find Part Identifiers     797
21.7 Label Decorators     802
21.8 Background Tasks—Jobs API     808
21.9 Plug-in ClassLoaders     811
21.10 Early Startup     816
21.11 Rich Client Platform     817
21.12 Conclusion     818

Appendix A: Eclipse Plug-ins and Resources     819
A.1 Plug-ins      819

Appendix B:  Ready for Rational Software    831

Index 833


Submit Errata

More Information

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.


Pearson Education, Inc., 221 River Street, Hoboken, New Jersey 07030, (Pearson) presents this site to provide information about products and services that can be purchased through this site.

This privacy notice provides an overview of our commitment to privacy and describes how we collect, protect, use and share personal information collected through this site. Please note that other Pearson websites and online products and services have their own separate privacy policies.

Collection and Use of Information

To conduct business and deliver products and services, Pearson collects and uses personal information in several ways in connection with this site, including:

Questions and Inquiries

For inquiries and questions, we collect the inquiry or question, together with name, contact details (email address, phone number and mailing address) and any other additional information voluntarily submitted to us through a Contact Us form or an email. We use this information to address the inquiry and respond to the question.

Online Store

For orders and purchases placed through our online store on this site, we collect order details, name, institution name and address (if applicable), email address, phone number, shipping and billing addresses, credit/debit card information, shipping options and any instructions. We use this information to complete transactions, fulfill orders, communicate with individuals placing orders or visiting the online store, and for related purposes.


Pearson may offer opportunities to provide feedback or participate in surveys, including surveys evaluating Pearson products, services or sites. Participation is voluntary. Pearson collects information requested in the survey questions and uses the information to evaluate, support, maintain and improve products, services or sites, develop new products and services, conduct educational research and for other purposes specified in the survey.

Contests and Drawings

Occasionally, we may sponsor a contest or drawing. Participation is optional. Pearson collects name, contact information and other information specified on the entry form for the contest or drawing to conduct the contest or drawing. Pearson may collect additional personal information from the winners of a contest or drawing in order to award the prize and for tax reporting purposes, as required by law.


If you have elected to receive email newsletters or promotional mailings and special offers but want to unsubscribe, simply email information@informit.com.

Service Announcements

On rare occasions it is necessary to send out a strictly service related announcement. For instance, if our service is temporarily suspended for maintenance we might send users an email. Generally, users may not opt-out of these communications, though they can deactivate their account information. However, these communications are not promotional in nature.

Customer Service

We communicate with users on a regular basis to provide requested services and in regard to issues relating to their account we reply via email or phone in accordance with the users' wishes when a user submits their information through our Contact Us form.

Other Collection and Use of Information

Application and System Logs

Pearson automatically collects log data to help ensure the delivery, availability and security of this site. Log data may include technical information about how a user or visitor connected to this site, such as browser type, type of computer/device, operating system, internet service provider and IP address. We use this information for support purposes and to monitor the health of the site, identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents and appropriately scale computing resources.

Web Analytics

Pearson may use third party web trend analytical services, including Google Analytics, to collect visitor information, such as IP addresses, browser types, referring pages, pages visited and time spent on a particular site. While these analytical services collect and report information on an anonymous basis, they may use cookies to gather web trend information. The information gathered may enable Pearson (but not the third party web trend services) to link information with application and system log data. Pearson uses this information for system administration and to identify problems, improve service, detect unauthorized access and fraudulent activity, prevent and respond to security incidents, appropriately scale computing resources and otherwise support and deliver this site and its services.

Cookies and Related Technologies

This site uses cookies and similar technologies to personalize content, measure traffic patterns, control security, track use and access of information on this site, and provide interest-based messages and advertising. Users can manage and block the use of cookies through their browser. Disabling or blocking certain cookies may limit the functionality of this site.

Do Not Track

This site currently does not respond to Do Not Track signals.


Pearson uses appropriate physical, administrative and technical security measures to protect personal information from unauthorized access, use and disclosure.


This site is not directed to children under the age of 13.


Pearson may send or direct marketing communications to users, provided that

  • Pearson will not use personal information collected or processed as a K-12 school service provider for the purpose of directed or targeted advertising.
  • Such marketing is consistent with applicable law and Pearson's legal obligations.
  • Pearson will not knowingly direct or send marketing communications to an individual who has expressed a preference not to receive marketing.
  • Where required by applicable law, express or implied consent to marketing exists and has not been withdrawn.

Pearson may provide personal information to a third party service provider on a restricted basis to provide marketing solely on behalf of Pearson or an affiliate or customer for whom Pearson is a service provider. Marketing preferences may be changed at any time.

Correcting/Updating Personal Information

If a user's personally identifiable information changes (such as your postal address or email address), we provide a way to correct or update that user's personal data provided to us. This can be done on the Account page. If a user no longer desires our service and desires to delete his or her account, please contact us at customer-service@informit.com and we will process the deletion of a user's account.


Users can always make an informed choice as to whether they should proceed with certain services offered by InformIT. If you choose to remove yourself from our mailing list(s) simply visit the following page and uncheck any communication you no longer want to receive: www.informit.com/u.aspx.

Sale of Personal Information

Pearson does not rent or sell personal information in exchange for any payment of money.

While Pearson does not sell personal information, as defined in Nevada law, Nevada residents may email a request for no sale of their personal information to NevadaDesignatedRequest@pearson.com.

Supplemental Privacy Statement for California Residents

California residents should read our Supplemental privacy statement for California residents in conjunction with this Privacy Notice. The Supplemental privacy statement for California residents explains Pearson's commitment to comply with California law and applies to personal information of California residents collected in connection with this site and the Services.

Sharing and Disclosure

Pearson may disclose personal information, as follows:

  • As required by law.
  • With the consent of the individual (or their parent, if the individual is a minor)
  • In response to a subpoena, court order or legal process, to the extent permitted or required by law
  • To protect the security and safety of individuals, data, assets and systems, consistent with applicable law
  • In connection the sale, joint venture or other transfer of some or all of its company or assets, subject to the provisions of this Privacy Notice
  • To investigate or address actual or suspected fraud or other illegal activities
  • To exercise its legal rights, including enforcement of the Terms of Use for this site or another contract
  • To affiliated Pearson companies and other companies and organizations who perform work for Pearson and are obligated to protect the privacy of personal information consistent with this Privacy Notice
  • To a school, organization, company or government agency, where Pearson collects or processes the personal information in a school setting or on behalf of such organization, company or government agency.


This web site contains links to other sites. Please be aware that we are not responsible for the privacy practices of such other sites. We encourage our users to be aware when they leave our site and to read the privacy statements of each and every web site that collects Personal Information. This privacy statement applies solely to information collected by this web site.

Requests and Contact

Please contact us about this Privacy Notice or if you have any requests or questions relating to the privacy of your personal information.

Changes to this Privacy Notice

We may revise this Privacy Notice through an updated posting. We will identify the effective date of the revision in the posting. Often, updates are made to provide greater clarity or to comply with changes in regulatory requirements. If the updates involve material changes to the collection, protection, use or disclosure of Personal Information, Pearson will provide notice of the change through a conspicuous notice on this site or other appropriate way. Continued use of the site after the effective date of a posted revision evidences acceptance. Please contact us if you have questions or concerns about the Privacy Notice or any objection to any revisions.

Last Update: November 17, 2020