protected void displayResult(final IScriptEvaluationResult result) { // Errors if (result.hasErrors()) { final Display display = DLTKDebugUIPlugin.getStandardDisplay(); display.asyncExec( new Runnable() { public void run() { if (display.isDisposed()) { return; } reportErrors(result); evaluationCleanup(); } }); return; } final String snippet = result.getSnippet(); IScriptValue resultValue = result.getValue(); final String typeName = resultValue.getType().getName(); IDebugModelPresentation presentation = getDebugModelPresentation(result.getThread().getModelIdentifier()); presentation.computeDetail( resultValue, new IValueDetailListener() { public void detailComputed(IValue value, String result) { displayStringResult( snippet, MessageFormat.format( Messages.ScriptDisplayAction_displayResult, new Object[] {typeName, trimDisplayResult(result)})); } }); presentation.dispose(); // displayStringResult(snippet, getExceptionMessage(x)); }