Two small problems in the plug-in test code in section 2.8. of the Book and PDF. Both of these have been fixed it the downloadble examples, but do not yet appear in the errata page.
First, the line below is missing from the import statements.
import org.eclipse.core.runtime.jobs.Job;
Second, the waitForJobs method in the book seems to cause the test to hang
public void waitForJobs() {
while (!Job.getJobManager().isIdle())
delay(1000);
}
The correct method (from the downloaded code) is:
public void waitForJobs() {
while (Job.getJobManager().currentJob() != null)
delay(1000);
}