Official Eclipse 3.0 FAQS

Multimedia Set (Print)
Used and New from Other Sellers
Used and New from Other Sellers
from $1.99
Usually ships in 1-2 business days
(Save 95%)
Other sellers (Multimedia Set)
  • All (10) from $1.99   
  • New (5) from $25.72   
  • Used (5) from $1.99   
Close
Sort by
Page 1 of 1
Showing All
Note: Marketplace items are not eligible for any BN.com coupons and promotions
$25.72
Seller since 2008

Feedback rating:

(17465)

Condition:

New — never opened or used in original packaging.

Like New — packaging may have been opened. A "Like New" item is suitable to give as a gift.

Very Good — may have minor signs of wear on packaging but item works perfectly and has no damage.

Good — item is in good condition but packaging may have signs of shelf wear/aging or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Acceptable — item is in working order but may show signs of wear such as scratches or torn packaging. All specific defects should be noted in the Comments section associated with each item.

Used — An item that has been opened and may show signs of wear. All specific defects should be noted in the Comments section associated with each item.

Refurbished — A used item that has been renewed or updated and verified to be in proper working condition. Not necessarily completed by the original manufacturer.

New
Brand New, Perfect Condition, Please allow 4-14 business days for delivery. 100% Money Back Guarantee, Over 1,000,000 customers served.

Ships from: Westminster, MD

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$25.73
Seller since 2007

Feedback rating:

(23298)

Condition: New
BRAND NEW

Ships from: Avenel, NJ

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
$26.50
Seller since 2005

Feedback rating:

(27)

Condition: New
2004 Trade paperback New. No dust jacket as issued. New book. No damage noted. CD intact at rear. Eclipse (Addison-Wesley). Audience: General/trade.

Ships from: Vancouver, Canada

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$48.65
Seller since 2013

Feedback rating:

(2)

Condition: New
New

Ships from: San Diego, CA

Usually ships in 1-2 business days

  • Canadian
  • International
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
$50.00
Seller since 2010

Feedback rating:

(7)

Condition: New
6-28-04 other 1 BRAND NEW! ONLY Expedited orders are shipped with tracking number! *WE DO NOT SHIP TO PO BOX* Please allow up to 14 days delivery for order with standard ... shipping. SHIPPED FROM MULTIPLE LOCATIONS. Read more Show Less

Ships from: San Jose, CA

Usually ships in 1-2 business days

  • Canadian
  • Standard, 48 States
  • Standard (AK, HI)
  • Express, 48 States
  • Express (AK, HI)
Page 1 of 1
Showing All
Close
Sort by

Overview

"I had a question about how to use a new Eclipse 3.0 feature, job scheduling, so I thought I would try out this book. I immediately found the answer with a concise explanation. Cool!"

--Erich Gamma

Official Eclipse 3.0 FAQs is the convenient source for answers to your most crucial questions about writing Eclipse plug-ins. Whether you're creating simple extensions for personal use or commercial Eclipse-based applications, you'll find hundreds of concise solutions here--including many that aren't answered anywhere else.

John Arthorne and Chris Laffra have worked with Eclipse technology since the very beginning; both are active members of the Eclipse development community and frequently answer questions on Eclipse newsgroups and mailing lists. Here, they cover an extraordinary range of topics, from workspace management to documentation, SWT to JFace, JDT to natural language support. Many FAQs include code samples and references to other information, making the book an invaluable desk reference for anyone working with Eclipse.

Just a few of the 350+ questions answered here...

  • How do I upgrade Eclipse? Page 29
  • What is new in Eclipse 3.0? Page 34
  • How can I add my views and actions to an existing perspective? Page 187
  • How do I set up a Java project to share in a repository? Page 58
  • How do I declare my own extension point? Page 74
  • How do I display a Web page in SWT? Page 141
  • How do I support multiple natural languages in my plug-in messages? Page 253
  • How do I save settings for a dialog or wizard? Page 166
  • How do I provide syntax coloring in an editor? Page 269
  • How do I hook into global actions, such as Copy and Delete? Page 225
  • How do I create a Rich Client application? Page 241
  • What is the purpose of activities? Page 229
  • How do I create and examine an AST? Page 369
Read More Show Less

Product Details

  • ISBN-13: 9780321268389
  • Publisher: Addison-Wesley
  • Publication date: 7/2/2004
  • Series: Eclipse Series
  • Pages: 386
  • Product dimensions: 7.00 (w) x 9.00 (h) x 1.50 (d)

Meet the Author

John Arthorne has been a committer on the Eclipse project since its inception, and has worked on Eclipse's underlying technology since 1998. Before joining IBM Ottawa Lab in Ottawa, Canada, he worked for IBM subsidiary Object Technology International, developing Eclipse's precursor, VisualAge Micro Edition Java IDE.

Chris Laffra works with the J9 virtual machine team at IBM Ottawa Lab. He focuses on improving Eclipse's overall performance, and his hobby is visualization of Eclipse's execution to improve its transparency. Chris previously worked for IBM T.J. Watson Research Center and OTI in Amsterdam.

Read More Show Less

Read an Excerpt

Most of the numerous Eclipse books published over the course of 2003 and 2004 cater directly to novel users and/or starting contributors to the platform. Other books have a particular focus on a specific vertical domain, such as modeling, or on a special niche, such as the underlying design principles of the platform.

This book has been carefully sculpted to fit a particular niche market of its own: Eclipse enhancers with at least some experience in writing Eclipse plug-ins. Our goal was to make this book the definitive guide to the wealth of other relevant Eclipse books, online articles, newsgroups with thousands of messages, mailing lists, and other random sources of Eclipse information, such as wikis and online FAQ lists. A Brief Exploration of FAQs

An FAQ is a Frequently Asked Question. We pronounce the acronym FAQ as it is spelled: FAQ. On the Web, FAQ lists are ubiquitous. A Google search on "FAQ" results in 60 million pages, with FAQs topic ranging from early music to Esperanto to fly-fishing to Perl to the X Files to

In the more modest context of this book, an FAQ is a question that is frequently asked by Eclipse developers; hence the title of this book. Of course, we mean developers who extend the Eclipse Platform by writing new plug-ins. Developers who write random Java programs and happen to use Eclipse as an integrated development environment will find less guidance.

Naturally, even when considering that "wisdom lies in the question," a long list simply of questions would be rather depressing; most readers will not instantly know the answers to the majority of the questions. Therefore, this book also includes answers andguides you to even more sources of more detailed information. The Target Audience for This Book

Official Eclipse 3.0 FAQs is targeted primarily at software developers interested in writing their own plug-ins to the Eclipse Platform, either for personal use or as part of a professional product. This audience consists of all the categories including and below Configurers (Figure P.1) in the Eclipse contribution pyramid described by Gamma and Beck (2004).

Everyone below the level of Users in this pyramid is somehow involved in creating and using plug-ins to customize their Eclipse environment, or publishing plug-ins for use by the greater community. This book targets all these groups of Eclipse plug-in writers. Rather than focusing on end-user questions, we discuss how Eclipse has been implemented, what techniques are being used, what extension points are published, and what application programming interfaces (API) are available. The goal is to provide an authoritative reference for all plug-in writers: from those writing simple extensions to their environment to those writing complete Eclipse-based applications of their own.

If you are interested only in using Eclipse-based applications as an end-user, an introductory Eclipse book might be more appropriate. No effort is made here to provide an exhaustive reference for Eclipse end-users. We intentionally keep answers brief and as concise as possible. Where appropriate, the included references are intended to provide more explanation when our quick answer is too terse or cryptic. Many projects are supported by the Eclipse Foundation, but this book focuses almost exclusively on the core Eclipse Platform. If you are interested in some of the other projects under the Eclipse umbrella, we highly recommend perusing the other titles in the Addison-Wesley Eclipse Series.

If you have been using Eclipse for a while and have written your first plug-in(s), you might be ready to better integrate them into the platform and iron out the wrinkles and erase the rough edges. In that case, this book will prove an indispensable guide. The questions answered here have been harvested from people who have been asking the very same questions you are facing now. Some of the questions are tough to answer, as we have discovered over the past year of writing.

This book refers to many online Eclipse articles and books and the overwhelmingly large platform documentation. By reading this FAQ book first, we believe that you will save yourself a lot of time in finding the information you are looking for. The Eclipse Versions These FAQs Cover

Eclipse is a fast-moving target. Every six weeks, a stable build is released with significant new functionality, making it extremely difficult to write a book with the potential to remain relevant for a long time. In this FAQ list, we have chosen version 3.0 of the Eclipse Platform as our primary target. However, our focus is on core concepts and principles that are relevant to most, if not all, versions of the platform. In some cases, a redesign of architecture or API warrants specific answers for different versions of the platform. Major discrepancies between 2.1 and 3.0 are pointed out, and we sometimes give different answers for 2.1 versus 3.0. We generally do not delve into topics that are relevant only to versions of the platform prior to Eclipse 2.1.

However, all the example snippets were tested primarily on the latest 3.0 builds, and you may need to reverse engineer those examples for older versions of the platform. Of course, for some functionality that is new in Eclipse 3.0, no pre3.0 answer can be given.

A final caveat: This book went into production just after the 3.0M9 milestone build. This build represents a nearly feature-complete preview of what the final Eclipse 3.0 will be. We have covered only material that we are confident will remain correct when the final release goes out the door. With that said, there could be minor discrepancies between the information in this book and the final 3.0 release. We will try to maintain corrections and clarifications on the book's Web site (http://eclipsefaq.org). How to Read This Book This book consists of 20 chapters in three parts. Each chapter contains a number of FAQs, consisting of


  • A question in the form an Eclipse developer would pose it
  • A concise, to-the-point answer
  • References to other FAQs, articles, and books

One way to read this FAQ book is to glance over the table of contents, look at a few random FAQs, and use the book primarily as a desk reference. In that case, the included index at the end of the book or an online search engine will be invaluable.

Another way is to read this book from front to back. The chapters have been carefully written so that the next question is closely related to the current one or directly elaborates on a common theme. If you take this route, keep in mind that we have made the somewhat arbitrary distinction between "user questions" (Part I) and "developer questions" (Parts II and III). Of course, every developer is also a user, so we often had difficultly deciding exactly where a question should lie. Does it make sense to explain how a user builds a plug-in before describing exactly what a plug-in is? Novice users may find it necessary to flip back and forth between Part I and the remainder of this book as they grow into the simultaneous roles of "user" and "developer" of the platform. Online Updates to This FAQ

This FAQ list is found online at this book's Web site (http://eclipsefaq.org). At that site, you can search and browse FAQs and propose new categories and questions for which the editors of the FAQ list may post answers.

Furthermore, from that Web site, FAQs can be downloaded as an Eclipse plug-in, in the form of Hypertext Markup Language (HTML) files. The plug-in allows for searching with the common Eclipse Help search (through Help > Help Contents...) to efficiently find your way through this FAQ list. Any reference made in an FAQ to other FAQs, documentation, or articles is done through HTML hyperlinks. How This Book Was Written "Eat your own dog food" is one of the most important guiding principles the Eclipse development team follows. As soon as possible, Eclipse was used to develop Eclipse itself. It is the most secure way to iron out bugs in the system. If you force yourself to use your own product, you are bound to make sure that it works well. Naturally, we adopted the same style while writing this book. To write this book in the true Eclipse spirit, we developed a plug-in that extends the following extension point:



The

toc.

file provides a topical ordering over the large collection of FAQ files. We realized early that we would go through quite a few editing steps before finalizing our ordering. We envisioned changing question titles, ordering in a given section, creating new FAQs, and discarding some others. Moreover, we also wanted to have a lot of FAQ cross-references. Finally, we wanted to offer readers both a softcopy version of the FAQ and a hardcopy printed version. Being good computer scientists, we decided that we had to build some of our own tooling to ease our work. Of course, we downloaded available open source technology when and where appropriate.

In writing the documentation for Eclipse 2.1, the Eclipse team devoted a lot of energy to managing the integrity of the documentation. Changing a section topic could result in changing a name in various unrelated locations. We decided to write an explorer for the

toc.

file to automate file editing, ordering, renaming, and cross-linking. Figure P.2 shows a screen dump of our Toc.

A second problem we faced was our wish for one master source for both the plug-in and book incarnations of the FAQ list. We decided to edit and maintain only the plug-in version and to generate the book from the plug-in with an automated script. For this conversion, we used HTMLDOC, a great tool for generating a Portable Document Format (PDF) version of a book from a set of input HTML files. This results in the best control over the printed end result. We also developed some rudimentary Eclipse support for HTMLDOC to allow automatic generation of camera-ready manuscripts from any plug-in containing a

toc.

file.

While we were at it, we also wrote an Eclipse HTML editor with basic code assist and syntax highlighting. Finally, we wrote a number of sample Eclipse plug-ins that are available from the book's Web site and on the book's CD-ROM. Spider Diagrams

To generate diagrams of relevant Eclipse object structures, we used enhanced Spider diagrams. Spider diagrams were introduced by Erich Gamma and Kent Beck to illustrate complex object relationships. The Spider plug-in is a graphical object explorer. It shows objects as nodes in a graph. References between objects appear as arcs. The Spider plug-in is licensed under the Common Public License (CPL) and can be downloaded from the Spider Web site (http://www.javaspider.org).

For this book, we downloaded Spider and enhanced it only slightly to improve its visual appearance for printed matter and added support for exporting a graph to a bitmap image on the file system.

Figure P.3 shows a sample Spider graph containing an instance of class

WelcomeEditor. When the method called

getTitle() is invoked on it, the string "Welcome" is returned. The

getItems() method returns an array with six

WelcomeItems. Of the six, items 0, 2, and 5 are shown in Figure P.3. When

getEditorSite is called on the

WelcomeEditor object, an instance of

EditorSite is returned. One of its methods,

getActionBars(), returns an instance of

EditorActionBars. Two of its fields—active and

enabledAllowed—have a value equal to true and the

refCount field has a value of 3.

Unlike Unified Modeling Language (UML) diagrams, Spider diagrams show a reference graph of live objects and their values. Spider diagrams are derived from the actual object model of a live, running Eclipse instance. Java reflection is used to inspect objects and obtain symbolic information.

Conventions Used in This Book

Throughout this book, we use italics for emphasis, FAQ titles, special terms, and book titles. We use

code font for code fragments, file names, class names, method and field names, strings, and objects. We use bold font for menu paths, key names, and perspective and view names.

Optionally, an FAQ is followed by a list of related FAQs, book references, or URLs for related Web sites. Such a section is highlighted by a "hand" image in the text margin.

The table of contents mentions both FAQ numbers and the page on which the FAQ can be found. For brevity, the index at the end of the book only refers to the FAQ number. The Origin of the Questions We collected good questions from various sources and then wrote our own answers:

  • Eclipse newsgroups (http://eclipse.org/newsgroups)
  • The eclipse.org articles (http://eclipse.org/articles)
  • Eclipse developer mailing lists (http://eclipse.org/mail)
  • Interesting discussions in the descriptions of many Eclipse bugs
  • Feedback from Eclipse code camps and developer conferences such as EclipseCon Personal discussions with Eclipse committers
  • Varying other sources of Eclipse information (http://eclipse.org/community/main.html)
  • Our own personal experience with development of Eclipse
Structure of This Book

Part I (Chapter 1-4) discusses the organizational structure of the Eclipse Project and lays the fundaments for plug-in development. It explains where to download Eclipse, how to extend the platform by writing a plug-in, and how to use the Eclipse development environment to edit Java code. After reading Part I, you should become comfortably familiar with the strengths and abilities of the Eclipse Platform.

Part II (Chapters 5-14) describes Eclipse as a generic application platform, the so-called Rich Client Platform (RCP), with which standalone applications other than development tools can be built. The Eclipse plug-in architecture allows software developers to grow an application by picking and choosing the plug-ins they need to meet their goals. This has proven a godsend for the development tooling domain, which was previously dominated by monolithic products that were nearly impossible to customize and that rarely interoperated with each other.

Along the way, the Eclipse community took an unexpected left turn. While the Eclipse Foundation is still dedicated primarily to tool development, many members of the open source community around Eclipse started to see things differently and began to use the Eclipse Platform to build things other than development tools. They built games, chat clients, and news readers, and consulting companies started building all sorts of custom applications on top of the Eclipse Platform. They realized that a component-based platform with a vast store of open source components already available was ideal for rapidly creating all kinds of applications. Part II will still be interesting for development tool writers, since a great deal of the Eclipse Platform's functionality has been pushed down into this generic layer.

Part III (Chapter 15-20) discusses the Eclipse IDE Platform and will be of interest to those who want to enhance the Eclipse IDE with new behavior. These chapters cover FAQs relating to the broad assortment of plug-ins that round out the Eclipse SDK and include a chapter on extending the Java development tool (JDT) plug-ins, as well as a large chapter that guides you along the various steps of writing an IDE for your own programming language. Many of the plug-ins that make up the Eclipse IDE Platform, such as those providing text-editing functionality, search and compare support, and even repository support, may be interesting for RCP applications.

SEE: Erich Gamma and Kent Beck, Contributing to Eclipse (Addison-Wesley, 2004)
The Eclipse FAQ Web site (http://eclipsefaq.org)
HTMLDOC (http://www.easysw.com/htmldoc)
The Spider Web site (http://www.javaspider.org)

Read More Show Less

Table of Contents

Foreword.

Preface.

Acknowledgments.

I. THE ECLIPSE ECOSYSTEM.

1. The Eclipse Community.

What is Eclipse?

What is the Eclipse Platform?

Where did Eclipse come from?

What is the Eclipse Foundation?

How can my users tell where Eclipse ends and a product starts?

What are Eclipse projects and technologies?

How do I propose my own project?

Who is building commercial products based on Eclipse?

What open source projects are based on Eclipse?

What academic research projects are based on Eclipse?

Who uses Eclipse in the classroom?

What is an Eclipse Innovation Grant?

What Eclipse newsgroups are available?

How do I get access to Eclipse newsgroups?

What Eclipse mailing lists are available?

What articles on Eclipse have been written?

What books have been written on Eclipse?

How do I report a bug in Eclipse?

How can I search the existing list of bugs in Eclipse?

What do I do if my feature request is ignored?

Can I get my documentation in PDF form, please?

Where do I find documentation for a given extension point?

How is Eclipse licensed?

2. Getting Started.

Where do I get and install Eclipse?

How do I run Eclipse?

How do I increase the heap size available to Eclipse?

Where can I find that elusive .log file?

Does Eclipse run on any Linux distribution?

I unzipped Eclipse, but it won't start. Why?

How do I upgrade Eclipse?

How do I install new plug-ins?

Can I install plug-ins outside the main install directory?

How do I remove a plug-in?

How do I find out what plug-ins have been installed?

Where do I get help?

How do I accommodate project layouts that don't fit the Eclipse model?

What is new in Eclipse 30?

Is Eclipse 30 going to break all of my old plug-ins?

How do I prevent my plug-in from being broken when I update Eclipse?

3. Java Development in Eclipse.

How do I show/hide files like .classpath in the Navigator?

How do I link the Navigator with the currently active editor?

How do I use the keyboard to traverse between editors?

How can I rearrange Eclipse views and editors?

Why doesn't my program start when I click the Run button?

How do I turn off autobuilding of Java code?

How do I hide referenced libraries in the Package Explorer?

Where do my .class files disappear to?

What editor keyboard shortcuts are available?

How do I stop the Java editor from showing a single method at once?

How do I open a type in a Java editor?

How do I control the Java formatter?

How do I choose my own compiler?

What Java refactoring support is available?

How can Content Assist make me the fastest coder ever?

How can templates make me the fastest coder ever?

What is a Quick Fix?

How do I profile my Java program?

How do I debug my Java program?

How do I find out the command-line arguments of a launched program?

What is hot code replace?

How do I set a conditional breakpoint?

How do I find all Java methods that return a String?

What can I view in the Hierarchy view?

How do I add an extra library to my project's classpath?

What is the advantage of sharing the .project file in a repository?

What is the function of the .cvsignore file?

How do I set up a Java project to share in a repository?

Why does the Eclipse compiler create a different serialVersionUID from javac?

4. Plug-in Development Environment.

How do I create a plug-in?

How do I use the plug-in Manifest Editor?

Why doesn't my plug-in build correctly?

How do I run my plug-in in another instance of Eclipse?

What causes my plug-in to build but not to load in a runtime workbench?

My runtime workbench runs, but my plug-in does not show. Why?

How do I add images and other resources to a runtime JAR file?

Can I add icons declared by my plug-in.xml in the runtime JAR?

When does PDE change a plug-in's Java build path?

What is a PDE JUnit test?

Where can I find the Eclipse plug-ins?

How do I find a particular class from an Eclipse plug-in?

Why do I get a "plug-in was unable to load class" error when I activate a menu or toolbar action?

What is the use of the build.xml file?

How do I prevent my build.xml file from being overwritten?

When is the build.xml script executed?

How do I declare my own extension point?74

How do I find all the plug-ins that contribute to my extension point?

Why is the interface for my new extension point not visible?

Can my extension point schema contain nested elements?

How do I create a feature?

How do I synchronize versions between a feature and its plug-in(s)?

What is the Update Manager?

How do I create an update site (site.xml)?

Why does my update site need a license?

II. THE RICH CLIENT PLATFORM.

5. All about Plug-ins.

What is a plug-in?

Do I use plug-in or plug-in?

What is the plug-in manifest file (plug-in.xml)?

How do I make my plug-in connect to other plug-ins?

What are extensions and extension points?

What is an extension point schema?

How do I find out more about a certain extension point?

When does a plug-in get started?

Where do plug-ins store their state?

How do I find out the install location of a plug-in?

What is the classpath of a plug-in?

How do I add a library to the classpath of a plug-in?

How can I share a JAR among various plug-ins?

How do I use the context class loader in Eclipse?

Why doesn't Eclipse play well with Xerces?

What is a plug-in fragment?

Can fragments be used to patch a plug-in?

What is a configuration?

How do I find out whether the Eclipse Platform is running?

Where does System.out and System.err output go?

How do I locate the owner plug-in

from a given class?

How does OSGi and the new runtime affect me?

What is a dynamic plug-in?

How do I make my plug-in dynamic enabled?

How do I make my plug-in dynamic aware?

6. Runtime Facilities.

How do I use progress monitors?

How do I use a SubProgressMonitor?

How do I use the platform logging facility?

How do I use the platform debug tracing facility?

How do I load and save plug-in preferences?

How do I use the preference service?

What is a preference scope?

How do I use IAdaptable and IAdapterFactory?

Does the platform have support for concurrency?

How do I prevent two jobs from running at the same time?

What is the purpose of job families?

How do I find out whether a particular job is running?

How can I track the lifecycle of jobs?

How do I create a repeating background task?

7. Standard Widget Toolkit (SWT).

What is SWT?

Why does Eclipse use SWT?

Is SWT platformspecific?

Is SWT better than Swing?

Can I use SWT outside Eclipse for my own project?

Are there any visual composition editors available for SWT?

Why do I have to dispose of colors, fonts, and images?

Why do I get an invalid thread access exception?

How do I get a Display instance?

How do I prompt the user to select a file or a directory?

How do I display a Web page in SWT?

How do I embed AWT and Swing inside SWT?

Where can I find more information on SWT?

8. JFace.

What is a viewer?

What are content and label providers?

What kinds of viewers does JFace provide?

Why should I use a viewer?

How do I sort the contents of a viewer?

How do I filter the contents of a viewer?

How do I use properties to optimize a viewer?

What is a label decorator?

How do I use image and font registries?

What is a wizard?

How do I specify the order of pages in a wizard?

How can I reuse wizard pages in more than one wizard?

Can I reuse wizards from other plug-ins?160

How do I make my wizard appear in the UI?

How do I run a lengthy process in a wizard?

How do I launch the preference page that belongs to my plug-in?

How do I ask a simple yes or no question?

How do I inform the user of a problem?

How do I create a dialog with a details area?

How do I set the title of a custom dialog?165

How do I save settings for a dialog or wizard?

9. Generic Workbench.

Pages, parts, sites, windows: What is all this stuff?

How do I find out what object is selected?

How do I find out what view or editor is selected?

How do I find the active workbench page?

How do I show progress on the workbench status line?

Why should I use the new progress service?

How do I write a message to the workbench status line?

How do I create a label decorator declaratively?

How do I add label decorations to my viewer?

How do I make the workbench shutdown?

How can I use IWorkbenchAdapter to display my model elements? 176

How do I create my own preference page?

How do I use property pages?

How do I open a Property dialog?

How do I add my wizard to the New, Import, or Export menu categories?

Can I activate my plug-in when the workbench starts?

How do I create an image registry for my plug-in?

How do I use images defined by other plug-ins?

How do I show progress for things happening in the background?

How do I switch from using a Progress dialog to the Progress view?

Can I make a job run in the UI thread?

Are there any special Eclipse UI guidelines?

Why do the names of some interfaces end with the digit 2?

10. Perspectives and Views.

How do I create a new perspective?

How can I add my views and actions to an existing perspective?

How do I show a given perspective?

What is the difference between a perspective and a workbench page?

How do I create fixed views and perspectives?

What is a view?

What is the difference between a view and a viewer?

How do I create my own view?

How do I set the size or position of my view?

Why can't I control when, where, and how my view is presented?

How will my view show up in the Show View menu?

How do I make my view appear in the Show In menu?

How do I add actions to a view's menu and toolbar?

How do I make a view respond to selection changes in another view?

How does a view persist its state between sessions?

How do I open multiple instances of the same view?

11. Generic Editors.

What is the difference between a view and an editor?

How do I open an editor programmatically?

How do I open an external editor?

How do I dynamically register an editor to handle a given extension?

How do I switch to vi or emacs-style key bindings?

How do I create my own editor?

How do I enable the Save and Revert actions?

How do I enable global actions such as Cut, Paste, and Print in my editor?

How do I hook my editor to the Back and Forward buttons?

How do I create a form-based editor, such as the plug-in Manifest Editor?

How do I create a graphical editor?

How do I make an editor that contains another editor?

12. Actions, Commands, and Activities.

Actions, commands, operations, jobs: What does it all mean?

What is an action set?

How do I make my action set visible?

How do I add actions to the global toolbar?

How do I add menus to the main menu?

How do I add actions to the main menu?

Why are some actions activated without a target?

Where can I find a list of existing action group names?

What is the difference between a command and an action?

How do I associate an action with a command?

How do I create my own keybinding configuration?

How do I provide a keyboard shortcut for my action?

How can I change the name or tooltip of my action?

How do I hook into global actions, such as Copy and Delete?

How do I build menus and toolbars programmatically?

How do I make menus with dynamic contents?

What is the difference between a toolbar and a cool bar?

Can other plug-ins add actions to my part's context menu?

How do I add other plug-ins' actions to my menus?

What is the purpose of activities?

How do I add activities to my plug-in?

How do activities get enabled?

What is the difference between perspectives and activities?

13. Building Your Own Application.

What is an Eclipse application?

How do I create an application?

What is the minimal Eclipse configuration?

How do I create a Rich Client application?

How do I customize the menus in an RCP application?

How do I make key bindings work in an RCP application?

Can I create an application that doesn't have views or editors?

How do I specify where application data is stored?

Can I create an application that doesn't have a data

location?

14. Productizing an Eclipse Offering.

What is an Eclipse product?

What is the difference between a product and an application?

How do I distribute my Eclipse offering?250

Can I use an installation program to distribute my Eclipse product?251

Can I install my product as an add-on to another product?

Where do I find suitable Eclipse logos and wordmarks?

When do I need to write a plug-in install handler?

How do I support multiple natural languages in my plug-in messages?

How do I replace the Eclipse workbench window icon with my own?254

How do I write my own eclipse.exe platform launcher?

Who shows the Eclipse splash screen?

How can I publish partial upgrades (patches) to my product?

III. THE ECLIPSE IDE PLATFORM.

15. Text Editors.

What support is there for creating custom text editors?

I'm still confused! How do all the editor pieces fit together?

How do I get started with creating a custom text editor?

How do I use the text document model?

What is a document partition?

How do I add Content Assist to my editor?

How do I provide syntax coloring in an editor?

How do I support formatting in my editor?

How do I insert text in the active text editor?

What is the difference between highlight range and selection?

How do I change the selection on a double-click in my editor?

How do I use a model reconciler?

16. Help, Search, and Compare.

How do I add help content to my plug-in?

How do I provide F1 help?

How do I contribute help contexts?

How can I generate HTML and toc.xml files?

How do I write a Search dialog?

How do I implement a search operation?281

How do I display search results?

How can I use and extend the compare infrastructure?

How do I create a Compare dialog?

How do I create a compare editor?

17. Workspace and Resources API.

How are resources created?

Can I create resources that don't reside in the file system?

What is the difference between a path and a location?

When should I use refreshLocal?

How do I create my own tasks, problems, bookmarks, and so on?

How can I be notified of changes to the workspace?

How do I prevent builds between multiple changes to the workspace?

Why should I add my own project nature?

Where can I find information about writing builders?

How do I store extra properties on a resource?

How can I be notified on property changes on a resource?

How and when do I save the workspace?300

How can I be notified when the workspace is being saved?

Where is the workspace local history stored?

How can I repair a workspace that is broken?

What support does the workspace have for team tools?

18. Workbench IDE.

How do I open an editor on a file in the workspace?

How do I open an editor on a file outside the workspace?

How do I open an editor on something that is not a file?

Why don't my markers show up in the Tasks view?

Why don't my markers appear in the editor's vertical ruler?

How do I access the active project?

What are IWorkspaceRunnable, IRunnableWithProgress, and WorkspaceModifyOperation?

How do I write to the console from a plug-in?

How do I prompt the user to select a resource?

Can I use the actions from the Navigator in my own plug-in?.

What APIs exist for integrating repository clients into Eclipse?315

How do I deploy projects to a server and keep the two synchronized?

What is the difference between a repository provider and a team

subscriber?

What is a launch configuration?

When do I use a launch delegate?

What is Ant?

Why can't my Ant build find javac?

How do I add my own external tools?

How do I create an external tool builder?320

19. Implementing Support for Your Own Language.

What is eScript?

Language integration phase 1: How do I compile and build programs?

How do I load source files edited outside Eclipse?

How do I run an external builder on my source files?

How do I implement a compiler that runs inside Eclipse?

How do I react to changes in source files?

How do I implement an Eclipse builder?

Where are project build specifications stored?

How do I add a builder to a given project?

How do I implement an incremental project builder?

How do I handle setup problems for a given builder?

How do I make my compiler incremental?

Language integration phase 2: How do I implement a DOM?

How do I implement a DOM for my language?

How can I ensure that my model is scalable?

Language integration phase 3: How do I edit programs?

How do I write an editor for my own language?

How do I add Content Assist to my language editor?

How do I add hover support to my text editor?

How do I create problem markers for my compiler?

How do I implement Quick Fixes for my own language?

How do I support refactoring for my own language?

How do I create an Outline view for my own language editor?

Language integration phase 4: What are the finishing touches?354

What wizards do I define for my own language?

When does my language need its own nature?

When does my language need its own perspective?

How do I add documentation and help for my own language?

How do I support source-level debugging for my own language?

20. Java Development Tool API.

How do I extend the JDT?

What is the Java model?

How do I create Java elements?

How do I create a Java project?

How do I manipulate Java code?

What is a working copy?

What is a JDOM?

What is an AST?

How do I create and examine an AST?

How do I distinguish between internal and external JARs on the build path?

How do I launch a Java program?

What is JUnit?

How do I participate in a refactoring?

What is LTK?

Index.

Read More Show Less

Preface

Most of the numerous Eclipse books published over the course of 2003 and 2004 cater directly to novel users and/or starting contributors to the platform. Other books have a particular focus on a specific vertical domain, such as modeling, or on a special niche, such as the underlying design principles of the platform.

This book has been carefully sculpted to fit a particular niche market of its own: Eclipse enhancers with at least some experience in writing Eclipse plug-ins. Our goal was to make this book the definitive guide to the wealth of other relevant Eclipse books, online articles, newsgroups with thousands of messages, mailing lists, and other random sources of Eclipse information, such as wikis and online FAQ lists.

A Brief Exploration of FAQs

An FAQ is a Frequently Asked Question. We pronounce the acronym FAQ as it is spelled: FAQ. On the Web, FAQ lists are ubiquitous. A Google search on "FAQ" results in 60 million pages, with FAQs topic ranging from early music to Esperanto to fly-fishing to Perl to the X Files to XML programming. With an average FAQ size of 27K, this thriving online ecosystem of FAQs represents a whopping 1.6 petabytes of valuable, distilled domain knowledge.

In the more modest context of this book, an FAQ is a question that is frequently asked by Eclipse developers; hence the title of this book. Of course, we mean developers who extend the Eclipse Platform by writing new plug-ins. Developers who write random Java programs and happen to use Eclipse as an integrated development environment will find less guidance.

Naturally, even when considering that "wisdom lies in the question," a long list simply of questions would be rather depressing; most readers will not instantly know the answers to the majority of the questions. Therefore, this book also includes answers and guides you to even more sources of more detailed information.

The Target Audience for This Book

Official Eclipse 3.0 FAQs is targeted primarily at software developers interested in writing their own plug-ins to the Eclipse Platform, either for personal use or as part of a professional product. This audience consists of all the categories including and below Configurers (Figure P.1) in the Eclipse contribution pyramid described by Gamma and Beck (2004).

Everyone below the level of Users in this pyramid is somehow involved in creating and using plug-ins to customize their Eclipse environment, or publishing plug-ins for use by the greater community. This book targets all these groups of Eclipse plug-in writers. Rather than focusing on end-user questions, we discuss how Eclipse has been implemented, what techniques are being used, what extension points are published, and what application programming interfaces (API) are available. The goal is to provide an authoritative reference for all plug-in writers: from those writing simple extensions to their environment to those writing complete Eclipse-based applications of their own.

If you are interested only in using Eclipse-based applications as an end-user, an introductory Eclipse book might be more appropriate. No effort is made here to provide an exhaustive reference for Eclipse end-users. We intentionally keep answers brief and as concise as possible. Where appropriate, the included references are intended to provide more explanation when our quick answer is too terse or cryptic. Many projects are supported by the Eclipse Foundation, but this book focuses almost exclusively on the core Eclipse Platform. If you are interested in some of the other projects under the Eclipse umbrella, we highly recommend perusing the other titles in the Addison-Wesley Eclipse Series.

If you have been using Eclipse for a while and have written your first plug-in(s), you might be ready to better integrate them into the platform and iron out the wrinkles and erase the rough edges. In that case, this book will prove an indispensable guide. The questions answered here have been harvested from people who have been asking the very same questions you are facing now. Some of the questions are tough to answer, as we have discovered over the past year of writing.

This book refers to many online Eclipse articles and books and the overwhelmingly large platform documentation. By reading this FAQ book first, we believe that you will save yourself a lot of time in finding the information you are looking for.

The Eclipse Versions These FAQs Cover

Eclipse is a fast-moving target. Every six weeks, a stable build is released with significant new functionality, making it extremely difficult to write a book with the potential to remain relevant for a long time. In this FAQ list, we have chosen version 3.0 of the Eclipse Platform as our primary target. However, our focus is on core concepts and principles that are relevant to most, if not all, versions of the platform. In some cases, a redesign of architecture or API warrants specific answers for different versions of the platform. Major discrepancies between 2.1 and 3.0 are pointed out, and we sometimes give different answers for 2.1 versus 3.0. We generally do not delve into topics that are relevant only to versions of the platform prior to Eclipse 2.1.

However, all the example snippets were tested primarily on the latest 3.0 builds, and you may need to reverse engineer those examples for older versions of the platform. Of course, for some functionality that is new in Eclipse 3.0, no pre3.0 answer can be given.

A final caveat: This book went into production just after the 3.0M9 milestone build. This build represents a nearly feature-complete preview of what the final Eclipse 3.0 will be. We have covered only material that we are confident will remain correct when the final release goes out the door. With that said, there could be minor discrepancies between the information in this book and the final 3.0 release. We will try to maintain corrections and clarifications on the book's Web site (http://eclipsefaq.org).

How to Read This Book

This book consists of 20 chapters in three parts. Each chapter contains a number of FAQs, consisting of
  • A question in the form an Eclipse developer would pose it
  • A concise, to-the-point answer
  • References to other FAQs, articles, and books

One way to read this FAQ book is to glance over the table of contents, look at a few random FAQs, and use the book primarily as a desk reference. In that case, the included index at the end of the book or an online search engine will be invaluable.

Another way is to read this book from front to back. The chapters have been carefully written so that the next question is closely related to the current one or directly elaborates on a common theme. If you take this route, keep in mind that we have made the somewhat arbitrary distinction between "user questions" (Part I) and "developer questions" (Parts II and III). Of course, every developer is also a user, so we often had difficultly deciding exactly where a question should lie. Does it make sense to explain how a user builds a plug-in before describing exactly what a plug-in is? Novice users may find it necessary to flip back and forth between Part I and the remainder of this book as they grow into the simultaneous roles of "user" and "developer" of the platform.

Online Updates to This FAQ

This FAQ list is found online at this book's Web site (http://eclipsefaq.org). At that site, you can search and browse FAQs and propose new categories and questions for which the editors of the FAQ list may post answers.

Furthermore, from that Web site, FAQs can be downloaded as an Eclipse plug-in, in the form of Hypertext Markup Language (HTML) files. The plug-in allows for searching with the common Eclipse Help search (through Help > Help Contents...) to efficiently find your way through this FAQ list. Any reference made in an FAQ to other FAQs, documentation, or articles is done through HTML hyperlinks.

How This Book Was Written

"Eat your own dog food" is one of the most important guiding principles the Eclipse development team follows. As soon as possible, Eclipse was used to develop Eclipse itself. It is the most secure way to iron out bugs in the system. If you force yourself to use your own product, you are bound to make sure that it works well. Naturally, we adopted the same style while writing this book. To write this book in the true Eclipse spirit, we developed a plug-in that extends the following extension point:

The toc.xml file provides a topical ordering over the large collection of FAQ files. We realized early that we would go through quite a few editing steps before finalizing our ordering. We envisioned changing question titles, ordering in a given section, creating new FAQs, and discarding some others. Moreover, we also wanted to have a lot of FAQ cross-references. Finally, we wanted to offer readers both a softcopy version of the FAQ and a hardcopy printed version. Being good computer scientists, we decided that we had to build some of our own tooling to ease our work. Of course, we downloaded available open source technology when and where appropriate.

In writing the documentation for Eclipse 2.1, the Eclipse team devoted a lot of energy to managing the integrity of the documentation. Changing a section topic could result in changing a name in various unrelated locations. We decided to write an explorer for the toc.xml file to automate file editing, ordering, renaming, and cross-linking. Figure P.2 shows a screen dump of our Toc.xml Explorer with HTML preview window in action.

A second problem we faced was our wish for one master source for both the plug-in and book incarnations of the FAQ list. We decided to edit and maintain only the plug-in version and to generate the book from the plug-in with an automated script. For this conversion, we used HTMLDOC, a great tool for generating a Portable Document Format (PDF) version of a book from a set of input HTML files. This results in the best control over the printed end result. We also developed some rudimentary Eclipse support for HTMLDOC to allow automatic generation of camera-ready manuscripts from any plug-in containing a toc.xml file.

While we were at it, we also wrote an Eclipse HTML editor with basic code assist and syntax highlighting. Finally, we wrote a number of sample Eclipse plug-ins that are available from the book's Web site and on the book's CD-ROM.

Spider Diagrams

To generate diagrams of relevant Eclipse object structures, we used enhanced Spider diagrams. Spider diagrams were introduced by Erich Gamma and Kent Beck to illustrate complex object relationships. The Spider plug-in is a graphical object explorer. It shows objects as nodes in a graph. References between objects appear as arcs. The Spider plug-in is licensed under the Common Public License (CPL) and can be downloaded from the Spider Web site (http://www.javaspider.org).

For this book, we downloaded Spider and enhanced it only slightly to improve its visual appearance for printed matter and added support for exporting a graph to a bitmap image on the file system.

Figure P.3 shows a sample Spider graph containing an instance of class WelcomeEditor. When the method called getTitle() is invoked on it, the string "Welcome" is returned. The getItems() method returns an array with six WelcomeItems. Of the six, items 0, 2, and 5 are shown in Figure P.3. When getEditorSite is called on the WelcomeEditor object, an instance of EditorSite is returned. One of its methods, getActionBars(), returns an instance of EditorActionBars. Two of its fields--active and enabledAllowed--have a value equal to true and the refCount field has a value of 3.

Unlike Unified Modeling Language (UML) diagrams, Spider diagrams show a reference graph of live objects and their values. Spider diagrams are derived from the actual object model of a live, running Eclipse instance. Java reflection is used to inspect objects and obtain symbolic information.

Conventions Used in This Book

Throughout this book, we use italics for emphasis, FAQ titles, special terms, and book titles. We use code font for code fragments, file names, class names, method and field names, strings, and objects. We use bold font for menu paths, key names, and perspective and view names.

Optionally, an FAQ is followed by a list of related FAQs, book references, or URLs for related Web sites. Such a section is highlighted by a "hand" image in the text margin.

The table of contents mentions both FAQ numbers and the page on which the FAQ can be found. For brevity, the index at the end of the book only refers to the FAQ number.

The Origin of the Questions

We collected good questions from various sources and then wrote our own answers:
  • Eclipse newsgroups (http://eclipse.org/newsgroups)
  • The eclipse.org articles (http://eclipse.org/articles)
  • Eclipse developer mailing lists (http://eclipse.org/mail)
  • Interesting discussions in the descriptions of many Eclipse bugs
  • Feedback from Eclipse code camps and developer conferences such as EclipseCon Personal discussions with Eclipse committers
  • Varying other sources of Eclipse information (http://eclipse.org/community/main.html)
  • Our own personal experience with development of Eclipse

Structure of This Book

Part I (Chapter 1-4) discusses the organizational structure of the Eclipse Project and lays the fundaments for plug-in development. It explains where to download Eclipse, how to extend the platform by writing a plug-in, and how to use the Eclipse development environment to edit Java code. After reading Part I, you should become comfortably familiar with the strengths and abilities of the Eclipse Platform.

Part II (Chapters 5-14) describes Eclipse as a generic application platform, the so-called Rich Client Platform (RCP), with which standalone applications other than development tools can be built. The Eclipse plug-in architecture allows software developers to grow an application by picking and choosing the plug-ins they need to meet their goals. This has proven a godsend for the development tooling domain, which was previously dominated by monolithic products that were nearly impossible to customize and that rarely interoperated with each other.

Along the way, the Eclipse community took an unexpected left turn. While the Eclipse Foundation is still dedicated primarily to tool development, many members of the open source community around Eclipse started to see things differently and began to use the Eclipse Platform to build things other than development tools. They built games, chat clients, and news readers, and consulting companies started building all sorts of custom applications on top of the Eclipse Platform. They realized that a component-based platform with a vast store of open source components already available was ideal for rapidly creating all kinds of applications. Part II will still be interesting for development tool writers, since a great deal of the Eclipse Platform's functionality has been pushed down into this generic layer.

Part III (Chapter 15-20) discusses the Eclipse IDE Platform and will be of interest to those who want to enhance the Eclipse IDE with new behavior. These chapters cover FAQs relating to the broad assortment of plug-ins that round out the Eclipse SDK and include a chapter on extending the Java development tool (JDT) plug-ins, as well as a large chapter that guides you along the various steps of writing an IDE for your own programming language. Many of the plug-ins that make up the Eclipse IDE Platform, such as those providing text-editing functionality, search and compare support, and even repository support, may be interesting for RCP applications.

SEE: Erich Gamma and Kent Beck, Contributing to Eclipse (Addison-Wesley, 2004)
The Eclipse FAQ Web site (http://eclipsefaq.org)
HTMLDOC (http://www.easysw.com/htmldoc)
The Spider Web site (http://www.javaspider.org)

Read More Show Less

Customer Reviews

Be the first to write a review
( 0 )
Rating Distribution

5 Star

(0)

4 Star

(0)

3 Star

(0)

2 Star

(0)

1 Star

(0)

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 1 Customer Reviews
  • Anonymous

    Posted August 18, 2004

    361 FAQs!

    For those Eclipse users amongst you, this recent book may be a useful extension of your physical library. The authors have assembled 361 FAQs under one cover. These pertain to the latest major stable release, 3.0. In the jargon of O'Reilly, a major competitor to this publisher, the book is the equivalent of one of their '100 Hacks' books on some computing topic. But here offering over 3 times more tips. The book is designed for random access. Each FAQ is titled with a question that the FAQ then answers. So the directory pages should suffice in guiding you to an answer, if it exists, of course. Each FAQ's explanation can be read in isolation of the others. Though one very nice feature is how they cross reference each other where appropriate. The old fashioned equivalent of hyperlinks, remember? The technical level is moderate. You are required to have the rudiments of Java. It is not the authors' remit to teach this to you. But if you have this background, the book should be intelligible. Of course, the entire book could be online. But some will prefer this hardcopy.

    Was this review helpful? Yes  No   Report this review
Sort by: Showing 1 Customer Reviews

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