Eclipse: Building Commercial-Quality Plug-ins [NOOK Book]

Overview

"I'm often asked, 'What are the best books about Eclipse?' Number one on my list, every time, is Eclipse: Building Commercial-Quality Plug-ins. I find it to be the clearest and most relevant book about Eclipse for the real-world software developer. Other Eclipse books focus on the internal Eclipse architecture or on repeating the Eclipse documentation, whereas this book is laser focused on the issues and concepts that matter when you're trying to build a product."
-- Bjorn ...

See more details below
Eclipse: Building Commercial-Quality Plug-ins

Available on NOOK devices and apps  
  • NOOK Devices
  • NOOK HD/HD+ Tablet
  • NOOK
  • NOOK Color
  • NOOK Tablet
  • Tablet/Phone
  • NOOK for Windows 8 Tablet
  • NOOK for iOS
  • NOOK for Android
  • NOOK Kids for iPad
  • PC/Mac
  • NOOK for Windows 8
  • NOOK for PC
  • NOOK for Mac
  • NOOK Study

Want a NOOK? Explore Now

NOOK Book (eBook)
$27.49
BN.com price
(Save 42%)$47.99 List Price

Overview

"I'm often asked, 'What are the best books about Eclipse?' Number one on my list, every time, is Eclipse: Building Commercial-Quality Plug-ins. I find it to be the clearest and most relevant book about Eclipse for the real-world software developer. Other Eclipse books focus on the internal Eclipse architecture or on repeating the Eclipse documentation, whereas this book is laser focused on the issues and concepts that matter when you're trying to build a product."
-- Bjorn Freeman-Benson Director, Open Source Process, Eclipse Foundation

"As the title suggests, this massive tome is intended as a guide to best practices for writing Eclipse plug-ins. I think in that respect it succeeds handily. Before you even think about distributing a plug-in you've written, read this book."
-- Ernest Friedman-Hill Sheriff, JavaRanch.com

"Eclipse: Building Commercial-Quality Plug-ins was an invaluable training aid for all of our team members. In fact, training our team without the use of this book as a base would have been virtually impossible. It is now required reading for all our developers and helped us deliver a brand-new, very complex product on time and on budget thanks to the great job this book does of explaining the process of building plug-ins for Eclipse."
-- Bruce Gruenbaum

"This is easily one of the most useful books I own. If you are new to developing Eclipse plug-ins, it is a 'must-have' that will save you lots of time and effort. You will find lots of good advice in here, especially things that will help add a whole layer of professionalism and completeness to any plug-in. The book is very focused, well-structured, thorough, clearly written, and doesn't contain a single page of 'waffly page filler.' The diagrams explaining the relationships between the different components and manifest sections are excellent and aid in understanding how everything fits together. This book goes well beyond Actions, Views, and Editors, and I think everyone will benefit from the authors' experience. I certainly have."
-- Tony Saveski

"The authors of this seminal book have decades of proven experience with the most productive and robust software engineering technologies ever developed. Their experiences have now been well applied to the use of Eclipse for more effective Java development. A must-have for any serious software engineering professional!"
-- Ed Klimas

"Just wanted to also let you know this is an excellent book! Thanks for putting forth the effort to create a book that is easy to read and technical at the same time!"
-- Brooke Hedrick

"The key to developing great plug-ins for Eclipse is understanding where and how to extend the IDE, and that's what this book gives you. It is a must for serious plug-in developers, especially those building commercial applications. I wouldn't be without it."
-- Brian Wilkerson

"If you're looking for just one Eclipse plug-in development book that will be your guide, this is the one. While there are other books available on Eclipse, few dive as deep as Eclipse: Building Commercial-Quality Plug-ins."
-- Simon Archer

Eclipse has established itself as a dominant force in the application-development space. Key to the success of Eclipse is the ability of developers to extend its functionality using plug-ins.

This new edition of Eclipse: Building Commercial-Quality Plug-ins is the definitive, start-to-finish guide to building commercial-quality Eclipse plug-ins, with an emphasis on adding the sophistication and polish that paying customers demand. The book provides both a quick introduction to using Eclipse for new users and a reference for experienced Eclipse users wishing to expand their knowledge and improve the quality of their Eclipse-based products.

Revised to take advantage of pure Eclipse 3.1 and 3.2 APIs, this widely praised bestseller presents detailed, practical coverage of every aspect of plug-in development and specific solutions for the challenges developers are most likely to encounter. All code examples, relevant API listings, diagrams, and screen captures have been updated.

Some Eclipse concepts--such as actions, views, and editors--have not changed radically, but now have additional functionality and capabilities. Other areas, such as the Eclipse plug-in infrastructure, have changed drastically due to the Eclipse shift towards an OSGi-based infrastructure. This edition is fully updated to address these new advances for Eclipse developers.

  • Includes a quick introduction to Eclipse for experienced Java programmers
  • Serves as a systematic reference for experienced Eclipse users
  • Introduces all the tools you need to build Eclipse and Rational plug-ins
  • Explains the Eclipse architecture and the structure of plug-ins and extension points
  • Offers practical guidance on building Eclipse user interfaces with SWT and JFace
  • Shows how to use change tracking, perspectives, builders, markers, natures, and more
  • Covers internationalization, help systems, features, and branding

This book is designed for anyone who wants a deep understanding of Eclipse, and every experienced developer interested in extending Eclipse or the Rational Software Development Platform.

Read More Show Less

Editorial Reviews

From Barnes & Noble
The Barnes & Noble Review
Some folks use Eclipse as a great Java development IDE and leave it at that. But Eclipse is far more: It’s a platform that can be extended in virtually any direction, supporting an extraordinary range of new products. Of course, if you want to build extensions someone will actually pay for, you’d better pay attention to the details. Not just integration: user interfaces, change tracking, feature planning, product build, packaging, help systems, internationalization, maybe even branding. If you want to master everything that’s involved in building commercial-grade Eclipse extensions, Eric Clayberg and Dan Rubel are here to help.

You can start from scratch with this book. The authors carefully introduce the Eclipse development environment, architecture, and the structure of plug-ins and extension points. You’ll walk step-by-step through building your first plug-in: one that you’ll use throughout the book for experimentation. There’s also a detailed introduction to user interface construction with SWT and JFace. But, unlike some books, the advanced stuff's here, too. Clayberg and Rubel make all of it easier with plenty of sample code, diagrams, screen shots, and so forth.

Compatibility certifications simplify life for anyone who wants to market products based on a new platform. There’s no formal Eclipse certification. But there is “Ready for WebSphere Studio,” which promises that your software will integrate with IBM’s Eclipse-based web development tools. This book’s authors wrote the very first commercial add-on for WebSphere Studio Application Developer v4.0. When they discuss certification -- or anything else related to Eclipse, for that matter -- they speak with singular authority. Bill Camarda

Bill Camarda is a consultant, writer, and web/multimedia content developer. His 15 books include Special Edition Using Word 2003 and Upgrading & Fixing Networks for Dummies, Second Edition.

Read More Show Less

Product Details

  • ISBN-13: 9780132702201
  • Publisher: Pearson Education
  • Publication date: 4/5/2006
  • Sold by: Barnes & Noble
  • Format: eBook
  • Edition number: 2
  • Pages: 864
  • Sales rank: 1,185,967
  • File size: 45 MB
  • Note: This product may take a few minutes to download.

Meet the Author

Eric Clayberg is Senior Vice President for Product Development for Instantiations, Inc. Eric is a easoned software technologist, product developer, entrepreneur, and manager. He has a B.S. from MIT, an MBA from Harvard, and has cofounded two successful software companies, ObjectShare and Instantiations.

Dan Rubel is Chief Technology Officer for Instantiations, Inc. He is an entrepreneur and an expert in the design and application of OO technologies. Dan is the primary architect and product manager for several successful commercial products. He has a B.S. from Bucknell and is a cofounder of Instantiations.

Read More Show Less

Table of Contents

Foreword by Skip McGaughey xxxi Foreword by Simon Archer xxxiii Preface xxxv 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 34
1.8 Team Development Using CVS 48
1.9 Running Applications 54
1.10 Introduction to Debugging 58
1.11 Introduction to Testing 61
1.12 Summary 63

Chapter 2: A Simple Plug-in Example 65

2.1 The Favorites Plug-in 65
2.2 Creating a Plug-in Project 66
2.3 Reviewing the Generated Code 71
2.4 Building a Product 81
2.5 Installing and Running the Product 86
2.6 Debugging the Product 88
2.7 PDE Views 90
2.8 Writing Plug-in Tests 92
2.9 Summary 98

Chapter 3: Eclipse Infrastructure 101

3.1 Structural Overview 101
3.2 Plug-in Directory or JAR file 104
3.3 Plug-in Manifest 107
3.4 Plug-in Class 114
3.5 Plug-in Model 119
3.6 Logging 122
3.7 Eclipse Plug-ins 124
3.8 Summary 125

Chapter 4: The Standard Widget Toolkit 127

4.1 SWT History and Goals 127
4.2 SWT Widgets 130
4.3 Layout Management 170
4.4 Resource Management 180
4.5 Summary 181

Chapter 5: JFace Viewers 185

5.1 List-Oriented Viewers 185
5.2 Text Viewers 203
5.3 Summary 206

Chapter 6: Actions 207

6.1 IAction versus IActionDelegate 207
6.2 Workbench Window Actions 209
6.3 Object Actions 224
6.4 View Actions 237
6.5 Editor Actions 244
6.6 Key Bindings 251
6.7 RFRS Considerations 256
6.8 Summary 257

Chapter 7: Views 259

7.1 View Declaration 261
7.2 View Part 263
7.3 View Actions 283
7.4 Linking the View 305
7.5 Saving View State 308
7.6 Testing 314
7.7 Image Caching 315
7.8 Auto-sizing Table Columns 316
7.9 RFRS Considerations 319
7.10 Summary 323

Chapter 8: Editors 325

8.1 Editor Declaration 326
8.2 Editor Part 330
8.3 Editing 344
8.4 Editor Lifecycle 350
8.5 Editor Actions 354
8.6 Linking the Editor 369
8.7 RFRS Considerations 369
8.8 Summary 374

Chapter 9: Resource Change Tracking 375

9.1 IResourceChangeListener 375
9.2 Processing Change Events 379
9.3 Batching Change Events 382
9.4 Progress Monitor 383
9.5 Delayed Changed Events 387
9.6 Summary 388

Chapter 10: Perspectives 389

10.1 Creating a Perspective 389
10.2 Enhancing an Existing Perspective 396
10.3 RFRS Considerations 403
10.4 Summary 404

Chapter 11: Dialogs and Wizards 40511.1 Dialogs 405
11.2 Wizards 430
11.3 RFRS Considerations 449
11.4 Summary 450Chapter 12: Preference Pages 451

12.1 Creating a Preference Page 451
12.2 Preference Page APIs 453
12.3 Preference APIs 467
12.4 RFRS Considerations 474
12.5 Summary 475

Chapter 13: Properties 477

13.1 Creating Properties 477
13.2 Displaying Properties in the Properties Dialog 481
13.3 Displaying Properties in the Properties View 489
13.4 Property Pages Reused as Preference Pages 493
13.5 RFRS Considerations 495
13.6 Summary 495

Chapter 14: Builders, Markers, and Natures 497

14.1 Builders 499
14.2 Markers 512
14.3 Natures 525
14.4 RFRS Considerations 535
14.5 Summary 537

Chapter 15: Implementing Help 539

15.1 Using Help 539
15.2 Implementing Help 542
15.3 Context-Sensitive Help (F1) 552
15.4 Accessing Help Programmatically 560
15.5 Cheat Sheets 563
15.6 RFRS Considerations 570
15.7 Summary 574

Chapter 16: Internationalization 575

16.1 Externalizing the Plug-in Manifest 576
16.2 Externalizing Plug-in Strings 578
16.3 Using Fragments 587
16.4 Summary 594

Chapter 17: Creating New Extension Points 595

17.1 The Extension Point Mechanism 595
17.2 Defining an Extension Point 597
17.3 Code Behind an Extension Point 607
17.4 Extension Point Documentation 614
17.5 Using the Extension Point 615
17.6 RFRS Considerations 617
17.7 Summary 618

Chapter 18: Features, Branding, and Updates 619

18.1 Feature Projects 620
18.2 Branding 631
18.3 Update Sites 637
18.4 RFRS Considerations 647
18.5 Summary 648

Chapter 19: Building a Product 651

19.1 A Brief Introduction to Ant 651
19.2 Building the Favorites Product 671
19.3 Summary 707

Chapter 20: Advanced Topics 709

20.1 Advanced Search--Reference Projects 710
20.2 Accessing Internal Code 711
20.3 Adapters 714
20.4 Opening a Browser or Creating an Email 718
20.5 Types Specified in an Extension Point 723
20.6 Modifying Eclipse to Find Part Identifiers 727
20.7 Label Decorators 732
20.8 Background Tasks--Jobs API 739
20.9 Plug-in ClassLoaders 742
20.10 Early Startup 747
20.11 Rich Client Platform 748
20.12 Conclusion 749

Appendix A: Eclipse Plug-ins and Resources 751

A.1 Plug-ins 751
A.2 Resources 760

Appendix B: Ready for Rational Software 765 Index 767

Read More Show Less

Preface

When we were first exposed to Eclipse back in late 1999, we were struck by the magnitude of the problem IBM was trying to solve. IBM wanted to unify all its development environments on a single code base. At the time, the company was using a mix of technology composed of a hodgepodge of C/C++, Java, and Smalltalk.

Many of IBM's most important tools, including the award-winning Visual-Age for Java IDE, were actually written in Smalltalk--a wonderful language for building sophisticated tools, but one that was rapidly losing market share to languages like Java. While IBM had one of the world's largest collections of Smalltalk developers, there wasn't a great deal of industry support for it outside of IBM, and there were very few independent software vendors (ISVs) qualified to create Smalltalk-based add-ons.

Meanwhile, Java was winning the hearts and minds of developers world-wide with its promise of easy portability across a wide range of platforms, while providing the rich application programming interface (API) needed to build the latest generation of Web-based business applications. More important, Java was an object-oriented (OO) language, which meant that IBM could leverage the large body of highly skilled object-oriented developers it had built up over the years of creating Smalltalk-based tools. In fact, IBM took its premiere Object Technology International (OTI) group, which had been responsible for creating IBM's VisualAge Smalltalk and VisualAge Java environments (VisualAge Smalltalk was the first of the VisualAge brand family and VisualAge Java was built using it), and tasked the group with creating a highly extensible integrated development environment (IDE)construction set based in Java. Eclipse was the happy result.

OTI was able to apply its highly evolved OO skills to produce an IDE unmatched in power, flexibility, and extensibility. The group was able to replicate most of the features that had made Smalltalk-based IDEs so popular the decade before, while simultaneously pushing the state of the art in IDE development ahead by an order of magnitude.

The Java world had never seen anything as powerful or as compelling as Eclipse, and it now stands, with Microsoft's .NET, as one of the world's premier development environments. That alone makes Eclipse a perfect platform for developers wishing to get their tools out to as wide an audience as possible. The fact that Eclipse is completely free and open source is icing on the cake. An open, extensible IDE base that is available for free to anyone with a computer is a powerful motivator to the prospective tool developer.

It certainly was to us. At Instantiations and earlier at ObjectShare, we had spent the better part of a decade as entrepreneurs focused on building add-on tools for various IDEs. We had started with building add-ons for Digitalk's Smalltalk/V, migrated to developing tools for IBM's VisualAge Smalltalk, and eventually ended up creating tools for IBM's VisualAge Java (including our award-winning VA Assist product and our jFactor product, one of the world's first Java refactoring tools). Every one of these environments provided a means to extend the IDE, but they were generally not well-documented and certainly not standardized in any way. Small market shares (relative to tools such as VisualBasic) and an eclectic user base also afflicted these environments and, by extension, us.

As an Advanced IBM Business Partner, we were fortunate to have built a long and trusted relationship with the folks at IBM responsible for the creation of Eclipse. That relationship meant that we were in a unique position to be briefed on the technology and to start using it on a daily basis nearly a year and half before the rest of the world even heard about it. When IBM finally announced Eclipse to the world in mid-2001, our team at Instantiations had built some of the first demo applications IBM had to show. Later that year when IBM released its first Eclipse-based commercial tool, WebSphere Studio Application Developer v4.0 (v4.0 so that it synchronized with its then current VisualAge for Java v4.0), our CodePro product became the very first commercial add-on available for it (and for Eclipse in general) on the same day.

Currently, the CodePro product adds hundreds of enhancements to Eclipse and any Eclipse-based IDE. Developing CodePro over the last several years has provided us with an opportunity to learn the details of Eclipse development at a level matched by very few others (with the obvious exception of the IBM and OTI developers, who eat, sleep, and breathe this stuff on a daily basis). CodePro has also served as a testbed for many of the ideas and techniques presented in this book, providing us with a unique perspective from which to write.Goals of the Book

This book provides an in-depth description of the process involved in building commercial-quality extensions for the Eclipse and the IBM Software Development Platform (SDP)--IBM's commercial version of Eclipse--development environments. To us, "commercial-quality" is synonymous with "commercial-grade" or "high-quality." 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.

In the world of Eclipse plug-ins, very few people take the time to really go the extra mile, and most plug-ins fall into the open source, amateur category. For folks interested in producing high-quality plug-ins (which would certainly be the case for any software company wanting to develop Eclipse-based products), there are many details to consider. Our book is meant to encompass the entire process of plug-in development, including all the extra things that need to be done to achieve high-quality results. This book has several complementary goals:

  • Provide a quick introduction to using Eclipse for new users
  • Provide a reference for experienced Eclipse users wishing to expand their knowledge and improve the quality of their Eclipse-based products
  • Provide a detailed tutorial on creating sophisticated Eclipse plug-ins suitable for new and experienced users

The first three chapters introduce the Eclipse development environment and outline the process of building a simple plug-in. The intention of these chapters is to help developers new to Eclipse quickly pull together a plug-in they can use to experiment with.

The first chapter, in particular, introduces the reader to the minimum set of Eclipse tools that he or she will need to build plug-ins. It is a fairly quick overview of the Eclipse IDE and relevant tools (one could write an entire book on that topic alone), and we would expect expert Eclipse users to skip that chapter entirely.

The second chapter introduces the example that we will use throughout most of the book and provides a very quick introduction to building a working plug-in from start to finish. The third chapter presents a high-level overview of the Eclipse architecture and the structure of plug-ins and extension points.The fourth and fifth chapters cover the Standard Widget Toolkit (SWT) and JFace, which are the building blocks for all Eclipse user interfaces (UIs). These chapters can act as a stand-alone reference; they are intended to provide just enough detail to get you going. Both of these topics are rich enough to warrant entire books and several are currently available.

The subsequent chapters, comprising the bulk of this book, focus on describing each of the various aspects of plug-in development and providing the reader with in-depth knowledge of how to solve the various challenges involved. Each chapter focuses on a different aspect of the problem, and includes an overview, a detailed description, a discussion of challenges and solutions, diagrams, screenshots, cookbook-style code examples, relevant API listings, and a summary.

We have structured the book so that the most important material required for every plug-in project appears in the first half of it. Some of the packaging- and building-oriented material is placed at the end (for example, features and product builds). This organizational scheme left several topics that, while not critical to every plug-in, were important to the creation of commercial-quality plug-ins. These topics have been placed in the second half of the book in an order based on the importance of each and how it related to earlier material. Internationalization, for example, is one of those topics. It isn't critical, and it isn't even all that complicated when you get right down to it. It is, however, important to the book's premise, so we felt it was a topic we needed to include. Since we aren't assuming that the reader is an Eclipse expert (or even a plug-in developer), we have tried to take the reader through each of the important steps in as much detail as possible. While it is true that this is somewhat introductory, it is also an area that most plug-in developers totally ignore and have little or no experience with.

Sometimes a developer needs a quick solution, while at other times that same developer needs to gain in-depth knowledge about a particular aspect of development. The intent is to provide several different ways for the reader to absorb and use the information so that both needs can be addressed. Relevant APIs are included in several of the chapters so that the book can be used as a stand-alone reference during development without requiring the reader to look up those APIs in the IDE. Most API descriptions are copied or paraphrased from the Eclipse platform Javadoc.

As the originators of Eclipse and a major consumer of Eclipse-based technology, IBM is justifiably concerned that new plug-ins meet the same high-quality standards that IBM adheres to. To that end, IBM has established a rigorous Ready for Rational Software (RFRS) certification program meant to ensure the availability of high-quality add-ons to Eclipse and the IBM Software Development Platform. RFRS certification should be one of the ultimate goals for anyone wishing to build and market Eclipse plug-ins. Every chapter covers any relevant RFRS certification criteria and strategies.

The examples provided as part of the chapters describe building various aspects of a concrete Eclipse plug-in that you will see evolve over the course of the book. When used as a reference rather than read cover-to-cover, you will typically start to look in one chapter for issues that are covered in another. To facilitate this type of searching, every chapter contains numerous forward and backward references to related material that appears in other chapters.Intended Audience

The audience for this book includes Java tool developers wishing to build products that integrate with Eclipse and other Eclipse-based products, relatively advanced Eclipse users wishing to customize their environments, or anyone who is curious about what makes Eclipse tick. You do not need to be an expert Eclipse user to make use of this book because we introduce most of what you need to know to use Eclipse in Chapter 1, Using Eclipse Tools. While we don't assume any preexisting Eclipse knowledge, we do anticipate that the reader is a fairly seasoned developer with a good grasp of Java and at least a cursory knowledge of extensible markup language (XML).Conventions Used in This Book

The following formatting conventions are used throughout the book.

Bold -- the names of UI elements such as menus, buttons, field labels, tabs, and window titles
Italic -- emphasize new terms and Web site addresses
Courier -- code examples, references to class and method names, and filenames
Courier Bold -- emphasize code fragments
"Quoted text" -- quotation marks surrounding text indicates words to be entered by the userWhat's New in the Second Edition

In this edition, we use the same Favorites view example as in the first edition, but have recreated the code from scratch to take advantage of pure Eclipse 3.1 and 3.2 APIs. All the screenshots are new and much of the text has been reworked. Some Eclipse concepts, such as actions, views, and editors are similar but with additional functionality and capabilities; other areas, such as the Eclipse plug-in infrastructure, have changed drastically due to the Eclipse shift toward an OSGi-based infrastructure. While all the chapters have been updated, the following is a sample of some of the sections that are new or have changed significantly in this second edition:

  • Section 2.3, Reviewing the Generated Code, on page 71
  • Section 2.4, Building a Product, on page 81
  • Section 3.1, Structural Overview, on page 101
  • Section 3.2, Plug-in Directory or JAR file, on page 104
  • Section 3.3, Plug-in Manifest, on page 107
  • Section 3.4, Plug-in Class, on page 114
  • Section 3.5, Plug-in Model, on page 119
  • Section 6.3, Object Actions, on page 224
  • Section 6.6, Key Bindings, on page 251
  • Section 7.3, View Actions, on page 283
  • Section 7.4, Linking the View, on page 305
  • Section 8.1, Editor Declaration, on page 326
  • Section 8.5, Editor Actions, on page 354
  • Section 9.4, Progress Monitor, on page 383
  • Section 11.1, Dialogs, on page 405
  • Section 11.2, Wizards, on page 430
  • Section 12.3, Preference APIs, on page 467
  • Section 13.3, Displaying Properties in the Properties View, on page 489
  • Section 14.1, Builders, on page 499
  • Section 15.5, Cheat Sheets, on page 563
  • Section 16.2, Externalizing Plug-in Strings, on page 578
  • Section 18.2, Branding, on page 631
  • Section 18.3, Update Sites, on page 637
  • Section 19.2, Building the Favorites Product, on page 671
  • Section 20.2, Accessing Internal Code, on page 711
  • Section 20.4, Opening a Browser or Creating an Email, on page 718
  • Section 20.7, Label Decorators, on page 732


Read More Show Less

Introduction

Preface

When we were first exposed to Eclipse back in late 1999, we were struck by the magnitude of the problem IBM was trying to solve. IBM wanted to unify all of its development environments on a single code base. At the time, the company was using a mix of technology composed of a hodgepodge of C/C++, Java, and Smalltalk.

Many of IBM's most important tools, including the award-winning Visual-Age for Java IDE, were actually written in Smalltalk—a wonderful language for building sophisticated tools, but one that was rapidly losing market share to languages like Java. While IBM had one of the world's largest collections of Smalltalk developers, there wasn't a great deal of industry support for it outside of IBM, and there were very few independent software vendors (ISVs) qualified to create Smalltalk-based add-ons.

Meanwhile, Java was winning the hearts and minds of developers worldwide with its promise of easy portability across a wide range of platforms, while providing the rich application programming interface (API) needed to build the latest generation of Web-based business applications. More importantly, Java was an object-oriented (OO) language, which meant that IBM could leverage the large body of highly skilled object-oriented developers it had built up over the years of creating Smalltalk-based tools. In fact, IBM took its premiere Object Technology International (OTI) group, which had been responsible for creating IBM's VisualAge Smalltalk and VisualAge Java environments (VisualAge Smalltalk was the first of the VisualAge brand family and VisualAge Java was built using it), and tasked it with creating a highly extensibleintegrated development environment (IDE) construction set based in Java. Eclipse was the happy result.

OTI was able to apply its highly evolved OO skills to produce an IDE unmatched in power, flexibility, and extensibility. The group was able to replicate most of the features that had made Smalltalk-based IDEs so popular the decade before, while simultaneously pushing the state-of-the-art in IDE development ahead by an order of magnitude.

The Java world had never seen anything as powerful or as compelling as Eclipse, and it now stands, with Microsoft's .NET, as one of the world's premier development environments. That alone makes Eclipse a perfect platform for developers wishing to get their tools out to as wide an audience as possible. The fact that Eclipse is completely free and open source is icing on the cake. An open, extensible IDE base that is available for free to anyone with a computer is a powerful motivator to the prospective tool developer.

It certainly was to us. At Instantiations and earlier at ObjectShare, we had spent the better part of a decade as entrepreneurs focused on building add-on tools for various IDEs. We had started with building add-ons to Digitalk's Smalltalk/V, migrated to developing tools for IBM's VisualAge Smalltalk, and eventually ended up creating tools for IBM's VisualAge Java (including our award-winning VA Assist product and our jFactor product, one of the world's first Java refactoring tools). Every one of these environments provided a means to extend the IDE, but they were generally not well-documented and certainly not standardized in any way. Small market shares (relative to tools such as VisualBasic) and an eclectic user base also afflicted these environments and, by extension, us.

As an Advanced IBM Business Partner, we were fortunate to have built a long and trusted relationship with the folks at IBM responsible for the creation of Eclipse. That relationship meant that we were in a unique position to be briefed on the technology and start using it on a daily basis nearly a year and half before the rest of the world even heard about it. When IBM finally announced Eclipse to the world in mid-2001, our team at Instantiations had built some of the first demo applications IBM had to show. Later that year when IBM released its first Eclipse-based commercial tool, WebSphere Studio Application Developer v4.0 (v4.0 so that it synchronized with its then current VisualAge for Java v4.0), our CodePro Studio product became the very first commercial add-on available for it (and for Eclipse in general) on the same day.

Our CodePro product currently adds hundreds of enhancements to Eclipse and any Eclipse-based IDE. Developing CodePro over the last several years has provided us with an opportunity to learn the details of Eclipse development at a level matched by very few others (with the obvious exception of the developers at IBM and OTI, who eat, sleep, and breathe this stuff on a daily basis). CodePro has also served as a testbed for many of the ideas and techniques presented in this book, providing us with a unique perspective from which to write.

Goals of the Book

This book provides an in-depth description of the process involved in building commercial-quality extensions for the Eclipse and WebSphere Studio Workbench (IBM's commercial version of Eclipse) development environments. To us, "commercial-quality" is synonymous with "commercial-grade" or "high– quality." Producing a "commercial-quality" plug-in means going above and beyond the minimal requirements needed to integrate with Eclipse. It means attending to all of those details contributing to the "fit and polish" of a commercial offering.

In the world of Eclipse plug-ins, very few people take the time to really go the extra mile, and most plug-ins fall into the open source, amateur category. For folks interested in producing high-quality plug-ins (which would certainly be the case for any software company wanting to develop Eclipse-based products), there are many additional steps to follow. Our book is meant to encompass the entire process of plug-in development, including all the extra things that need to be done to achieve high-quality results.

This book has several complementary goals:

  • Provide a quick introduction to using Eclipse for new users

  • Provide a reference for experienced Eclipse users wishing to expand their knowledge and improve the quality of their Eclipse-based products

  • Provide a detailed tutorial on creating sophisticated Eclipse plug-ins suitable for new and experienced users alike

The first three chapters introduce the Eclipse development environment and outline the process of building a simple plug-in. The intention of these chapters is to help developers new to Eclipse quickly pull together a plug-in they can use to experiment with.

The first chapter, in particular, introduces the reader to the minimum set of Eclipse tools that he or she will need to build plug-ins. It is a fairly quick overview of the Eclipse IDE and relevant tools (one could write an entire book on that topic alone), and we would expect expert Eclipse users to skip that chapter entirely.

The second chapter introduces the example that we will use throughout most of the book and provides a very quick introduction to building a working plug-in from start to finish. The third chapter presents a high-level overview of the Eclipse architecture and the structure of plug-ins and extension points.

The fourth and fifth chapters of the book cover the Standard Widget Toolkit (SWT) and JFace, which are the building blocks for all Eclipse user interfaces (UIs). These chapters can act as a standalone reference; they are intended to provide just enough detail to get you going. Both of these topics are rich enough to warrant entire books and many no doubt are in the works.

The subsequent chapters, comprising the bulk of the book, are focused on describing each of the various aspects of plug-in development and providing the reader with in-depth knowledge of how to solve the various challenges involved. Each chapter focuses on a different aspect of the problem, and include an overview, a detailed description, a discussion of challenges and solutions, diagrams, screen shots, cookbook-style code examples, relevant API listings, and a summary.

We have structured the book so that the most important material required for every plug-in project appears in the first half of the book. Some of the packaging- and building-oriented material is placed at the end (like features and product build). This organizational scheme left several topics that, while not critical to every plug-in, were important to the creation of "commercialquality" plug-ins. These topics were then placed in the second half of the book in an order based on the importance of the topic and how it related to earlier material. Internationalization, for example, is one of those topics. It isn't critical, and it isn't even all that complicated when you get right down to it. It is important to the premise of this book, so we felt it was a topic we needed to include. Since we aren't assuming that the reader is an Eclipse expert (or even a plug-in developer), we tried to take the reader through each of the important steps in as much detail as possible. While it is true that this is somewhat introductory, it is also an area that most plug-in developers totally ignore and have little or no experience with.

Sometimes a developer needs a quick solution, while at other times that same developer needs to gain in-depth knowledge on a particular aspect of development. The intent is to provide several different ways for the reader to absorb and use the information so that both needs can be addressed. Relevant APIs are included in several of the chapters so that the book may be used as a standalone reference during development without requiring the reader to look up those APIs in the IDE. Most API descriptions are copied or paraphrased from the Eclipse platform Javadoc.

As the originators of Eclipse and a major consumer of Eclipse-based technology, IBM is justifiably concerned that new plug-ins meet the same high-quality standards that IBM adheres to. To that end, IBM has established a rigorous "Ready for WebSphere Studio" (RFWS) certification program meant to insure the availability of high-quality add-ons to Eclipse and WebSphere Studio Workbench (WSW). RFWS certification should be one of the ultimate goals for anyone wishing to build and market Eclipse plug-ins. In each chapter, we will cover any relevant RFWS certification criteria and strategies.

The examples provided as part of each chapter describe building various aspects of a concrete Eclipse plug-in that you will see evolve over the course of the book. When this book is used as a reference rather than read cover-to-cover, you will typically start to look in one chapter for issues that are covered in another. To facilitate this type of searching, each chapter will contain numerous forward and backward references to related material that appears in other chapters.Intended Audience

The audience for this book includes Java tool developers wishing to build products that integrate with Eclipse and other Eclipse-based products, relatively advanced Eclipse users wishing to customize their environments, or anyone who is curious about what makes Eclipse tick. You do not need to be an expert Eclipse user to make use of this book, as we introduce most of what you need to know to use Eclipse in Chapter 1, "Using Eclipse Tools." While we don't assume any preexisting Eclipse knowledge, we do expect the reader to be a fairly seasoned developer with a good grasp of Java and at least a cursory knowledge of extensible markup language (XML).

Conventions Used in this Book

The following formatting conventions are used throughout the book:

Bold—Used for the names of UI elements such as menus, buttons, field labels, tabs, and window titles.

Italic—Used for emphasizing new terms.

Courier—Used for code examples, references to class and method names, and filenames.

Courier Bold—Used to emphasize code elements.

"Quoted text"—Used for text to be entered by the user.

Acknowledgements

The authors would like to thank all of those who had a hand in putting this book together or who gave us their support and encouragement through the many months it took to create.

To our comrades at Instantiations, who gave us the time and encouragement to work on the book: Brent Caldwell, Paul Curtis, Mark Johnson, Warren Martin, Steve Messick, Tim O'Conner, Chuck Shawan, Julie Taylor, Mike Taylor, and Brian Wilkerson.

To our agent, Laura Lewin, and the staff at Studio B, who encouraged us from day one and worked tirelessly on our behalf.

To our editor, John Neidhart, our production editor, Kathleen Caren, our copy editor, Camie Goffi, and the staff at Pearson, for their encouragement and tremendous efforts in preparing this book for production.

To Simon Archer, who contributed an unparalleled number of changes and suggestions and helped us improve the book in almost every dimension.

To our technical reviewers, who helped us enhance the book in many ways: Joe Bowbeer, Brian Wilkerson, Joe Winchester, David Whiteman, Boris Pruesmann, and Raphael Enns.

To the series editors, Erich Gamma, Lee Nackman and John Weigand, for their thoughtful comments and for their on-going efforts to make Eclipse the best development environment in the world.

We would also like to thank our wives, Karen and Kathy, for their endless patience, and our children, Beth, Lauren, Lee, and David, for their endless inspiration.

How To Contact Us

While we have made every effort to make sure that the material in this book is timely and accurate, Eclipse is a rapidly moving target and it is quite possible that you may encounter differences between what we present in this book and what you experience using Eclipse. The Eclipse UI has evolved considerably over the years, and the latest 3.0 release is no exception. While we have targeted this book at Eclipse 3.0 and used it for all of our examples, this book was completed before Eclipse 3.0 was finally locked down. That means that you may encounter various views, dialogs, and wizards that are subtly different from the screen shots in the book.

Read More Show Less

Customer Reviews

Average Rating 4.5
( 8 )
Rating Distribution

5 Star

(6)

4 Star

(1)

3 Star

(0)

2 Star

(0)

1 Star

(1)

Your Rating:

Your Name: Create a Pen Name or

Barnes & Noble.com Review Rules

Our reader reviews allow you to share your comments on titles you liked, or didn't, with others. By submitting an online review, you are representing to Barnes & Noble.com that all information contained in your review is original and accurate in all respects, and that the submission of such content by you and the posting of such content by Barnes & Noble.com does not and will not violate the rights of any third party. Please follow the rules below to help ensure that your review can be posted.

Reviews by Our Customers Under the Age of 13

We highly value and respect everyone's opinion concerning the titles we offer. However, we cannot allow persons under the age of 13 to have accounts at BN.com or to post customer reviews. Please see our Terms of Use for more details.

What to exclude from your review:

Please do not write about reviews, commentary, or information posted on the product page. If you see any errors in the information on the product page, please send us an email.

Reviews should not contain any of the following:

  • - HTML tags, profanity, obscenities, vulgarities, or comments that defame anyone
  • - Time-sensitive information such as tour dates, signings, lectures, etc.
  • - Single-word reviews. Other people will read your review to discover why you liked or didn't like the title. Be descriptive.
  • - Comments focusing on the author or that may ruin the ending for others
  • - Phone numbers, addresses, URLs
  • - Pricing and availability information or alternative ordering information
  • - Advertisements or commercial solicitation

Reminder:

  • - By submitting a review, you grant to Barnes & Noble.com and its sublicensees the royalty-free, perpetual, irrevocable right and license to use the review in accordance with the Barnes & Noble.com Terms of Use.
  • - Barnes & Noble.com reserves the right not to post any review -- particularly those that do not follow the terms and conditions of these Rules. Barnes & Noble.com also reserves the right to remove any review at any time without notice.
  • - See Terms of Use for other conditions and disclaimers.
Search for Products You'd Like to Recommend

Recommend other products that relate to your review. Just search for them below and share!

Create a Pen Name

Your Pen Name is your unique identity on BN.com. It will appear on the reviews you write and other website activities. Your Pen Name cannot be edited, changed or deleted once submitted.

 
Your Pen Name can be any combination of alphanumeric characters (plus - and _), and must be at least two characters long.

Continue Anonymously
Sort by: Showing all of 8 Customer Reviews
  • Anonymous

    Posted August 7, 2012

    Wizard bakery

    We bake here.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 26, 2012

    Celia

    Yum!!! I want a chocolate cake with chocolate frosting and chocolate chips inside it!!!

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted January 19, 2012

    Omg

    Such a waste oof money! Dont read this book its a rip off! Unless u r stupid and rich that u do not care, dont say i didnt warn ya.XD

    0 out of 1 people found this review helpful.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted August 4, 2004

    This is a great book!

    This is easily one of the most useful books I own. If you are new to developing Eclipse plugins, it is a 'Must Have' that will save you LOTS of time and effort. If you have already read everything available at eclipse.org and IBM develperworks, you will still find lots of new topics and good advice in here, especially things that will help add a whole layer of professionalism and completeness to any plugin. <p> The book is very focused, well structured, thorough, clearly written, and doesn't contain a single page of 'waffly page filler'. Granted, as one reviewer says, some of the code and screenshots are a little out of date, however I've found it very easy to get everything to work as I've gone through the examples. The 'Errata' page at qualityeclipse.com is also a useful resource and seems to be actively maintained. <p> The style of the book is very tutorial and 'doing' focused, but there are very good descriptions of why everything is the way it is...not just empty instructions to 'click here' and 'type this' like some other books I've come across. They also cover alternative ways to achieving something (not just explanations, but code too) and explain which would be more useful in different situations. <p> As someone else mentioned, the diagrams explaining the relationships between the different components and manifest sections are excellent, and aid in understanding how everything fits together. It really helps to be able to look at a diagram with all the pieces connected by relationships while designing and coding. I haven't seen anything like this in any of the material found online. <p> This book goes well beyond Actions, Views, and Editors, and I think everyone will benefit from the authors' experience. I certainly have :-)

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 31, 2004

    Try out the SWT/JFace

    The latest in a series of books on the highly acclaimed and well received Eclipse open source development framework for Java. It also talks about the IBM WebSphere Studio Workbench. This is IBM's commercial version of Eclipse. For both Eclipse and Workbench, the authors give detailed explanations of how to construct realistic, commercial quality plugins. Within the framework of the latest major version of Eclipse, 3.0. From the text, you should be able to see why Eclipse is now considered to rank with .NET as a fully integrated development environment. As vital parts of Eclipse, you are shown how to use SWT and JFace. These can provide nice UI widgets; better than the default Swing that comes with Java. While the Swing functionality is excellent, its look and feel often leaves much to be desired. SWT makes up for this deficit. The book can be used by someone totally new to Eclipse. Though you would need to be already facile in Java. The book starts from the ground up with bringing up Eclipse. But there is little preamble. The authors dive straight into serious code discussions. Which may actually appeal to experienced Java developers.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 31, 2004

    An indispensable tool for plug-in developers

    If you are relatively new to plug-in development, this book is a must. It covers the most important topics in plug-in development in an easy to follow style. Each topic begins with a description of the basics, then progresses into more complex issues, making it possible to get started quickly, then come back and expand your knowledge as needed. The book as a whole follows the same approach, beginning with an introduction to Eclipse and the plug-in architecture and progressing into individual topics. If you are an experienced plug-in developer, this book is not only an excellent source of reference material, it also covers many of the issues critical to turning an ordinary plug-in into a first-class plug-in. Discussions range from how to seamlessly integrate with Eclipse to how to make your plug-in extensible and how the Ready for WebSphere requirements impact your design and implementation. It is a must for serious plug-in developers, especially those building commercial applications.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 30, 2004

    An excellent book with lots of tips and detailed diagrams

    I bought this book at Java One a few weeks ago and have been very happy with it. It is well organized and very easy to read. I have dabbled in writing Eclipse plugins in the past, but never felt like I had a really good grasp of the entire process. This book presents a very clear and concise road map for how to build and package a complete plugin. The book is full of useful tips and words of wisdom that obviously come from years of experience. The authors have also put together some incredibly useful diagrams illustrating how various elements fit together that I had never seen presented anywhere else. While the authors state up front that the book was completed before Eclipse 3.0 was finalized, I found only a couple of places where the material presented was out of sync with the final Eclipse 3.0 release. The main point of this book is to teach you how to write high-quality, 'commercial grade' plugins. In detail, here is what I liked about some of the chapters: [Chapter 1] This is a very nice intro to using the Eclipse 3.0 tool set for anyone new to Eclipse. Some nice tips are provided for how to make Eclipse run faster and better configure it for use in Java development. As a former VisualAge Java user, I appreciated the authors¿ tips on how to set up Eclipse to replicate some of my favorite VA Java features. [Chapter 2] This is a very quick, short tutorial on how to get a quick plugin up and running. Here the authors introduce the 'Favorites' example that they enhance through out the book. It is a well chosen example that, while simple on the surface, provides a great deal of opportunity later in the book for deeper enhancements. [Chapter 4 & 5] These are excellent overviews of the Eclipse SWT and JFace libraries and provide just enough info to get you started building a plugin. I found the section on the history of SWT to be fascinating given all of the Swing vs. SWT discussions in the press over the last couple of years. [Chapter 6, 7 & 8] These chapters cover Eclipse Actions, Views and Editors in great detail and helped solve several difficult problems I had with a plugin I am working on. These chapters also included numerous tips and several excellent diagrams showing how the various plugin.xml entries relate to what you see in the workbench. [Chapter 19] What can I say? I *loved* this chapter the most. I had been struggling horribly with the problem of how to get my plugin working under both Eclipse 2.1 and 3.0. This chapter provides some very easy and elegant solutions to problem of how to build and deploy a plugin on multiple versions of Eclipse from a single source base.

    Was this review helpful? Yes  No   Report this review
  • Anonymous

    Posted July 3, 2004

    great book for serious Eclipse developers

    This is a great book for serious Eclipse developers. I saw these guys speak at an Eclipse gathering in Portland last November, and when I heard they were writing a book I immediately lobbied to be an official reviewer. (I wanted to know what they knew as fast as possible...) The online resource for this book at qualityeclipse.com is also a useful source for Eclipse tools and information.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing all of 8 Customer Reviews

If you find inappropriate content, please report it to Barnes & Noble
Why is this product inappropriate?
Comments (optional)