//todo[nik]
protected void evaluateAndShowHint() {
    myEvaluator.evaluate(myExpression, new XEvaluationCallbackBase() {
      public void evaluated(@NotNull final XValue result) {
        result.computePresentation(new XValueNode() {
          @Override
          public void setPresentation(@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value, boolean hasChildren) {
            setPresentation(icon, type, XDebuggerUIConstants.EQ_TEXT, value, hasChildren);
          }
          @Override
          public void setPresentation(@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String separator, @NonNls @NotNull String value,
                                      boolean hasChildren) {
            setPresentation(icon, type, separator, value, null, hasChildren);
          }
          @Override
          public void setPresentation(@Nullable Icon icon, @NonNls @Nullable String type, @NonNls @NotNull String value,
                                      @Nullable NotNullFunction<String, String> valuePresenter, boolean hasChildren) {
            setPresentation(icon, type, XDebuggerUIConstants.EQ_TEXT, value, valuePresenter, hasChildren);
          }
          @Override
          public void setGroupingPresentation(@Nullable Icon icon, @NonNls @Nullable String value, @Nullable XValuePresenter valuePresenter, boolean expand) {
            setPresentation(icon, value, valuePresenter, true);
          }
          @Override
          public void setPresentation(@Nullable Icon icon, @NonNls @Nullable String value, @Nullable XValuePresenter valuePresenter, boolean hasChildren) {
            doSetPresentation(icon, null, XDebuggerUIConstants.EQ_TEXT, value, valuePresenter, hasChildren);
          }
          @Override
          public void setPresentation(@Nullable Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String separator,
                                      @NonNls @NotNull final String value, @Nullable final NotNullFunction<String, String> valuePresenter, final boolean hasChildren) {
            doSetPresentation(icon, type, separator, value, valuePresenter == null ? null : new XValuePresenterAdapter(valuePresenter), hasChildren);
          }
          private void doSetPresentation(@Nullable Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String separator,
                                      @NonNls @Nullable final String value, @Nullable final XValuePresenter valuePresenter, final boolean hasChildren) {
            AppUIUtil.invokeOnEdt(new Runnable() {
              public void run() {
                doShowHint(result, separator, value, type, valuePresenter == null ? XValueNodeImpl.DEFAULT_VALUE_PRESENTER : valuePresenter, hasChildren);
              }
            });
          }
          public void setPresentation(@NonNls final String name, @Nullable final Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String value,
                                      final boolean hasChildren) {
            setPresentation(icon, type, value, hasChildren);
          }
          public void setPresentation(@NonNls final String name, @Nullable final Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String separator,
                                      @NonNls @NotNull final String value,
                                      final boolean hasChildren) {
            setPresentation(icon, type, separator, value, hasChildren);
          }
          public void setFullValueEvaluator(@NotNull XFullValueEvaluator fullValueEvaluator) {
            //todo[nik] implement?
          }
          public boolean isObsolete() {
            //todo[nik]
            return false;
          }
        }, XValuePlace.TOOLTIP);
      }
      public void errorOccurred(@NotNull final String errorMessage) {
        LOG.debug("Cannot evaluate '" + myExpression + "':" + errorMessage);
      }
    }, myExpressionPosition);
  }
}
public void setFullValueEvaluator(@NotNull XFullValueEvaluator fullValueEvaluator) {
//todo[nik] implement?
}
public boolean isObsolete() {
public void setPresentation(@NonNls final String name, @Nullable final Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String value,
final boolean hasChildren) {
setPresentation(icon, type, value, hasChildren);
}
public void setPresentation(@NonNls final String name, @Nullable final Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String separator,
@NonNls @NotNull final String value,
final boolean hasChildren) {
setPresentation(icon, type, separator, value, hasChildren);
}
public void setFullValueEvaluator(@NotNull XFullValueEvaluator fullValueEvaluator) {
//todo[nik] implement?
}
public boolean isObsolete() {
//todo[nik]
return false;
}
}, XValuePlace.TOOLTIP);
}
public void errorOccurred(@NotNull final String errorMessage) {
LOG.debug("Cannot evaluate '" + myExpression + "':" + errorMessage);
}
doSetPresentation(icon, type, separator, value, valuePresenter == null ? null : new XValuePresenterAdapter(valuePresenter), hasChildren);
}
private void doSetPresentation(@Nullable Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String separator,
@NonNls @Nullable final String value, @Nullable final XValuePresenter valuePresenter, final boolean hasChildren) {
AppUIUtil.invokeOnEdt(new Runnable() {
public void run() {
doShowHint(result, separator, value, type, valuePresenter == null ? XValueNodeImpl.DEFAULT_VALUE_PRESENTER : valuePresenter, hasChildren);
}
});
}
public void setPresentation(@NonNls final String name, @Nullable final Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String value,
final boolean hasChildren) {
setPresentation(icon, type, value, hasChildren);
}
public void setPresentation(@NonNls final String name, @Nullable final Icon icon, @NonNls @Nullable final String type, @NonNls @NotNull final String separator,
@NonNls @NotNull final String value,
final boolean hasChildren) {
setPresentation(icon, type, separator, value, hasChildren);
}
public void setFullValueEvaluator(@NotNull XFullValueEvaluator fullValueEvaluator) {
//todo[nik] implement?
}
public boolean isObsolete() {
//todo[nik]
return false;
}
}, XValuePlace.TOOLTIP);
}
public void errorOccurred(@NotNull final String errorMessage) {
LOG.debug("Cannot evaluate '" + myExpression + "':" + errorMessage);
}
}, myExpressionPosition);
}