fResultMode= resultMode;
IRunnableWithProgress r= new IRunnableWithProgress() { public void run(IProgressMonitor pm) throws InvocationTargetException { pm.beginTask(JavaPlugin.getResourceString(EVALUATING), IProgressMonitor.UNKNOWN); if (!getJavaProject().getProject().getWorkspace().isAutoBuilding()) { try { getJavaProject().getProject().build(IncrementalProjectBuilder.INCREMENTAL_BUILD, pm); } catch (CoreException e) { throw new InvocationTargetException(e); } } fResultMode= resultMode;
	public void evalSelection(final int resultMode) {		fResultMode= resultMode;				if (classPathHasChanged()) {			// need to relaunch VM		};					fVM = ScrapbookLauncher.getDefault().getDebugTarget(getPage());		if (fVM == null) {			launchVM();			fVM = ScrapbookLauncher.getDefault().getDebugTarget(getPage());		}		fireEvalStateChanged();		ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection();		String snippet= selection.getText();		fSnippetStart= selection.getOffset();		fSnippetEnd= fSnippetStart + selection.getLength();				if (snippet.length() == 0)			return;		evaluationStarts();		evaluate(snippet);	}	