Bug 54445 [Jobs] Duplicate search marker jobs
Build 20040310 While doing operations, I got locked while a build was running. Looking at the progress, I observed there were 3 instances of a searching marker job in the queue, awaiting to proceed. The scheduling of these search jobs should be smart enough to avoid stepping on itself. If it is already scheduled, it shouldn't reschedule one, or if doing so, it should cancel pre-enqueued one.
bundles/org.eclipse.ui.ide/src/org/eclipse/ui/views/markers/internal/RestartableJob.java
IRunnableWithProgress runnable;
	
	Job theJob;
	boolean restartNeeded = false;
	private Object lock = new Object();
	private IProgressMonitor currentMonitor = null;
	IWorkbenchSiteProgressService progressService;
	
	/**
	 * Constructs a new RestartableJob with the given name that will run the given
	 * runnable.
	 * 
	 * @param name
	 * @param newRunnable
	 * @param IWorkbenchSiteProgressService the service we are
	 * going to use to show progress or <code>null</code>.
	 */
	public RestartableJob(
			String name, 
			IRunnableWithProgress newRunnable,
			IWorkbenchSiteProgressService service) {
		this.runnable = newRunnable;
		progressService = service;
		createJob(name);
		
		theJob.addJobChangeListener(new JobChangeAdapter() {
			public void done(IJobChangeEvent e) {
				synchronized(lock) {
					currentMonitor = null;