if (fThread != null) { try { fThread.resume(); int count= 0; while (fThread != null && !fThread.isSuspended() && count < 20) { try { count++; Thread.sleep(100); } catch (InterruptedException e) { } } } catch (DebugException e) {  } }
	public void evaluationComplete(final IJavaEvaluationResult result) {		if (fThread != null) {			try {				fThread.resume();				int count= 0;				while (fThread != null && !fThread.isSuspended() && count < 20) {					try {						count++;						Thread.sleep(100);					} catch (InterruptedException e) {					}				}			} catch (DebugException e) {				// XXX: error			}		}		Runnable r = new Runnable() {			public void run() {				if (result.hasProblems()) {					IMarker[] problems = result.getProblems();					int count= problems.length;					if (count == 0) {						showException(result.getException());					} else {						for (int i = 0; i < count; i++) {							showProblem(problems[i]);						}					}				} else {					final IJavaValue value = result.getValue();					if (value != null) {						switch (fResultMode) {						case RESULT_DISPLAY:							Runnable r = new Runnable() {								public void run() {									displayResult(value);								}							};							getSite().getShell().getDisplay().asyncExec(r);							break;						case RESULT_INSPECT:							String snippet = result.getSnippet().trim();							int snippetLength = snippet.length();							if (snippetLength > 30) {								snippet = snippet.substring(0, 15) + "..." + snippet.substring(snippetLength - 15, snippetLength); 							}							snippet = snippet.replace('\n', ' ');							snippet = snippet.replace('\r', ' ');							snippet = snippet.replace('\t', ' ');							DebugUITools.inspect(snippet, value);							break;						case RESULT_RUN:							// no action							break;						}					}				}				evaluationEnds();			}		};		Control control= getVerticalRuler().getControl();		if (!control.isDisposed()) {			control.getDisplay().asyncExec(r);		}	}