evaluationStarts();
	public void evalSelection(final int 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;						if (classPathHasChanged()) {					// need to relaunch VM				};							fVM = ScrapbookLauncher.getDefault().getDebugTarget(getPage());				if (fVM == null) {					launchVM();					fVM = ScrapbookLauncher.getDefault().getDebugTarget(getPage());				}			}		};		try {			new ProgressMonitorDialog(getShell()).run(true, false, r);				} catch (InterruptedException e) {			evaluationEnds();			return;		} catch (InvocationTargetException e) {			evaluationEnds();			return;		}		if (fVM == null) {			return;		}		fireEvalStateChanged();		DebugPlugin.getDefault().addDebugEventListener(JavaSnippetEditor.this);		ITextSelection selection= (ITextSelection) getSelectionProvider().getSelection();		String snippet= selection.getText();		if (snippet.length() == 0) {			return;		}		fSnippetStart= selection.getOffset();		fSnippetEnd= fSnippetStart + selection.getLength();				evaluationStarts();		evaluate(snippet);				}	