Eclipse: Building Commercial-Quality Plug-Ins
  • Alternative view 1 of Eclipse: Building Commercial-Quality Plug-Ins
  • Alternative view 2 of Eclipse: Building Commercial-Quality Plug-Ins

Eclipse: Building Commercial-Quality Plug-Ins

4.8 5
by Eric Clayberg, Simon Archer, Skip McGaughey, Dan Rubel
     
 

ISBN-10: 0321228472

ISBN-13: 9780321228475

Pub. Date: 06/02/2004

Publisher: Addison-Wesley

Intended for Java tool developers who may or may not be familiar with Eclipse, this guide introduces the Eclipse development environment, outlines the process of building a simple plug-in, and describes the standard widget toolkit and JFace. It then shows how to use actions, views, editors, change tracking, perspectives, dialogs, wizards, preference pages, properties,

Overview

Intended for Java tool developers who may or may not be familiar with Eclipse, this guide introduces the Eclipse development environment, outlines the process of building a simple plug-in, and describes the standard widget toolkit and JFace. It then shows how to use actions, views, editors, change tracking, perspectives, dialogs, wizards, preference pages, properties, builders, markers, natures, and extension points in an example "favorites" plug-in. Annotation ©2004 Book News, Inc., Portland, OR

Product Details

ISBN-13:
9780321228475
Publisher:
Addison-Wesley
Publication date:
06/02/2004
Series:
Eclipse Series
Pages:
821
Product dimensions:
6.90(w) x 9.10(h) x 1.00(d)

Related Subjects

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

Customer Reviews

Average Review:

Write a Review

and post it to your social network

     

Most Helpful Customer Reviews

See all customer reviews >

Eclipse: Building Commercial-Quality Plug-Ins 4.8 out of 5 based on 0 ratings. 5 reviews.
Guest More than 1 year ago
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.

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.

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.

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.

This book goes well beyond Actions, Views, and Editors, and I think everyone will benefit from the authors' experience. I certainly have :-)

Guest More than 1 year ago
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.
Guest More than 1 year ago
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.
Guest More than 1 year ago
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.
Guest More than 1 year ago
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.