private void displayResult(final JsVariable var, String errorMessage) {
final StyledText styledText = getStyledText(editorPart);
if (styledText == null) {
return; // TODO(apavlov): fix this when adding inspected variables
} else {
final IExpression expression = new JsInspectExpression(evaluateContext, selectedText, var, errorMessage);
ChromiumDebugUIPlugin.getDisplay().asyncExec(new Runnable() {
public void run() {
showPopup(styledText, expression);
}
});