Job buildJob = new Job(PreferencesMessages.getString("OptionsConfigurationBlock.job.title")){  protected IStatus run(IProgressMonitor monitor) { try { if (fProject != null) { monitor.beginTask(PreferencesMessages.getFormattedString("OptionsConfigurationBlock.buildproject.taskname", fProject.getName()), 2); fProject.build(IncrementalProjectBuilder.FULL_BUILD, new SubProgressMonitor(monitor,1)); JavaPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(monitor,1)); } else { monitor.beginTask(PreferencesMessages.getString("OptionsConfigurationBlock.buildall.taskname"), 2); JavaPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, new SubProgressMonitor(monitor, 2)); } } catch (CoreException e) { return e.getStatus(); } catch (OperationCanceledException e) { return Status.CANCEL_STATUS; } finally { monitor.done(); } return Status.OK_STATUS; } public boolean belongsTo(Object family) { return ResourcesPlugin.FAMILY_MANUAL_BUILD == family; } };  buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule()); buildJob.setUser(true); buildJob.schedule();
CoreUtility.startBuildInBackground(fProject);
	protected boolean doFullBuild() {				Job buildJob = new Job(PreferencesMessages.getString("OptionsConfigurationBlock.job.title")){  //$NON-NLS-1$			/* (non-Javadoc)			 * @see org.eclipse.core.runtime.jobs.Job#run(org.eclipse.core.runtime.IProgressMonitor)			 */			protected IStatus run(IProgressMonitor monitor) {				try {					if (fProject != null) {						monitor.beginTask(PreferencesMessages.getFormattedString("OptionsConfigurationBlock.buildproject.taskname", fProject.getName()), 2); //$NON-NLS-1$						fProject.build(IncrementalProjectBuilder.FULL_BUILD, new SubProgressMonitor(monitor,1));						JavaPlugin.getWorkspace().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, new SubProgressMonitor(monitor,1));					} else {						monitor.beginTask(PreferencesMessages.getString("OptionsConfigurationBlock.buildall.taskname"), 2); //$NON-NLS-1$						JavaPlugin.getWorkspace().build(IncrementalProjectBuilder.FULL_BUILD, new SubProgressMonitor(monitor, 2));					}				} catch (CoreException e) {					return e.getStatus();				} catch (OperationCanceledException e) {					return Status.CANCEL_STATUS;				}				finally {					monitor.done();				}				return Status.OK_STATUS;			}			public boolean belongsTo(Object family) {				return ResourcesPlugin.FAMILY_MANUAL_BUILD == family;			}		};				buildJob.setRule(ResourcesPlugin.getWorkspace().getRuleFactory().buildRule());		buildJob.setUser(true); 		buildJob.schedule();		return true;	}		