Chapter 3 errata

Page 40 — The list of steps for adding the Delta Pack to your target suggests adding the directory ${workspace_loc}/HyperbolaTarget/delta.pack to your target definition. If in fact you followed the preceding steps and imported the Delta Pack archive, you would have to add the directory ${workspace_loc}/HyperbolaTarget/delta.pack/eclipse. The “eclipse” segment is missing in the example.

Note however that in the target supplied with the Samples Manager we eliminated the “eclipse” folder in the Delta Pack and so, as shown in figure 3-4, the eclipse segment was not needed in this case.

Chapter 4 errata

Page 52 — The snippet of Application code incorrectly shows the old Eclipse application run() method. The best practice for defining applications is now to implement IApplication which requires a start() and stop() methods as shown below.

public class Application implements IApplication {
	public Object start(IApplicationContext context) {
		Display display = PlatformUI.createDisplay();
		try {
			int returnCode = PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
			if (returnCode == PlatformUI.RETURN_RESTART) {
				return IApplication.EXIT_RESTART;
			return IApplication.EXIT_OK;
		} finally {

	public void stop() {
		if (!PlatformUI.isWorkbenchRunning())
		final IWorkbench workbench = PlatformUI.getWorkbench();
		final Display display = workbench.getDisplay();
		display.syncExec(new Runnable() {
			public void run() {
				if (!display.isDisposed())

Page 60 — In the description of how to get to the launch configurations (section 4.3.2) the menu path should be Run > Run Configurations… and Run > Debug Configurations….  Similarly, Figure 4-12 shows an outdated view of the Run menu.

Chapter 17 errata

Page 265 — Figure 17-1 includes a number of Java code lines involving String literals. It appears that a number of the ” (quote) characters were converted to ? (question mark) characters during the creation of the artwork. There is also a stray ? character just before the last block of code. Obviously these should be removed or replaced  to make the Java code syntactically valid.

Page 277 — In the BrowserView code snippet the “nextAction” variable declared at the beginning of createControlPart() should be named “forwardAction” to match its use in the last line of the snippet.

Chapter 9 errata

Page 131 — In Chapter 8 we defined the Hyperbola product and set its ID. Unfortunately on page 117 of the first printing we suggested using “org.eclipsercp.hyperbola” for the product ID. In Chapter 9 when you go to export the product and use the Generate Metadata repository option in the export wizard, there is a conflict between this product id and the id of the org.eclipsercp.hyperbola bundle. The result is that the export silently fails and the output directory does not contain an executable.  To address this problem, ensure that the ID of the product in the top box of the Overview page of the product editor, is something other than org.eclipsercp.hyperbola.  For example, we suggest using org.eclispercp.hyperbola.product.

Chapter 8 errata

Page 117 — In Figure 8-2 the product ID (top text box) is show an “org.eclipsercp.hyperbola”. This works fine in the sample for Chapter 8 but in subsequent chapters where building with p2 metadata is involved, that id will collide with the id of the org.eclipsercp.hyperbola bundle. We suggest changing the ID here to something like org.eclipsercp.hyperbola.product to avoid ambiguity.

Page 125 — When you add translatable messages to the file you should ensure that the bundle’s MANIFEST.MF is updated to indicate where the translations are to be found. For example,

Bundle-Localization: plugin

Chapter 24 errata

Page 402 — The Target Export wizard was added in Eclipse 3.6.  People developing for 3.5.x can move to 3.6 since you have a distinct Target definition.  That’s the point of target platforms.  Alternatively you can use a 3.6 to do the target export and continue with 3.5.2 for the book samples.

Chapter 14 errata

Page 203 — The Multi-User Chat (MUC) feature mentioned in this discussion is an example only.  The sample code does not include such a feature.

Page 208 — The features to be included in the Hyperbola feature are part of the target platform. In Eclipse 3.5.x there is a PDE bug that prevents features from software sites from being added to the target platform. This has been resolved in 3.6. To work around this, we have manually added the required features to the HyperbolaTarget project’s misc/features directory.  Alternatively, you can use Eclipse 3.6 to do your development.

Note as well that the org.eclipse.equinox.p2.user.ui feature is listed as the Equinox p2 Provisioning feature in the Galileo repository and is not included in the Equinox p2 SDK feature.

Page 210 — To get a binding for %aboutText you need to tell OSGi where to find translations. Do this by adding the following header to the Hyperbola bundle manifest:

Bundle-Localization: plugin

Page 211 — To be able to run or test the new p2 function, you have to export Hyperbola and be running it as a normal application. You also need to have a repository to which you can point Hyperbola for updates or new function. You can do this with the following steps:

  • Export Hyperbola with the Generate Metadata Repository box selected
  • Copy the output Hyperbola directory to some other location  (or unzip the output zip somewhere)
  • Change the version number of the Hyperbola feature or product to simulate a change
  • Re-export Hyperbola to the same location
  • Run the original Hyperbola and add the exported “repository” directory as a local software site in the p2 Available Software Sites preferences UI. This will come up automatically if you use Help > Check for Updates
  • After updating and restarting, confirm that the update happened using About > Installation Details and look for the version number you changed
  • You can also create some new features and export them to the same repository.  They will then show up in the Install New Software UI

Chapter 13 errata

Page 188 — The third step says to use the filter box to find the Help feature.  Due to a bug in the way PDE works, doing this can sometimes cause other, previously selected features to be unselected. We suggest that you simply turn off categorization and scroll to “Eclipse Help System” and select that feature.

Note — The Help UI requires the UI forms bundle (org.eclipse.ui.forms).  This is not part of the standard RCP feature and so typically would not be part of your target platform. We have added it manually in the provided target definition in the misc folder as a convenience. As an alternative, you could add the Eclipse Platform SDK feature from the Galileo repository to your target.  This includes UI forms, in addition to many other things, some of which you may find useful.

Chapter 10 Errata

To make it easier to run the examples in standalone mode, we recommend running a local XMPP server and running the Eliza bot locally as you work through the examples. Here are the steps:

  1. Download the Openfire server, install, and run it.
  2. Using the admin web ui for Openfire, add 2 users: ‘eliza’ and ‘reader’. Set their respective passwords to ‘secret’.
  3. Load the sample code for Chapter 10 and select the ‘org.eclipsercp.eliza’ project and from the context menu click Run As > Eclipse Application. This will start eliza and from the Openfire admin ui you should see her as logged in now.
  4. The Eliza bot will now be part of the sample code for Chapters 10 and on.

From this point on, you can continue with the sample code an use your machine name (e.g., localhost) instead of ‘’ in all code that connects to the server.