use of com.intellij.xdebugger.impl.evaluate.XDebuggerEvaluationDialog in project intellij-community by JetBrains.
the class XDebuggerEvaluateActionHandler method showDialog.
private static void showDialog(@NotNull XDebugSession session, VirtualFile file, XDebuggerEditorsProvider editorsProvider, XStackFrame stackFrame, XDebuggerEvaluator evaluator, @NotNull XExpression expression) {
if (expression.getLanguage() == null) {
Language language = null;
if (stackFrame != null) {
XSourcePosition position = stackFrame.getSourcePosition();
if (position != null) {
language = LanguageUtil.getFileLanguage(position.getFile());
}
}
if (language == null && file != null) {
language = LanguageUtil.getFileTypeLanguage(file.getFileType());
}
expression = new XExpressionImpl(expression.getExpression(), language, expression.getCustomInfo(), expression.getMode());
}
new XDebuggerEvaluationDialog(session, editorsProvider, evaluator, expression, stackFrame == null ? null : stackFrame.getSourcePosition()).show();
}
use of com.intellij.xdebugger.impl.evaluate.XDebuggerEvaluationDialog in project intellij-community by JetBrains.
the class XJumpToSourceActionBase method perform.
@Override
protected void perform(final XValueNodeImpl node, @NotNull final String nodeName, final AnActionEvent e) {
XValue value = node.getValueContainer();
final XDebuggerEvaluationDialog dialog = e.getData(XDebuggerEvaluationDialog.KEY);
XNavigatable navigatable = sourcePosition -> {
if (sourcePosition != null) {
final Project project = node.getTree().getProject();
AppUIUtil.invokeOnEdt(() -> {
sourcePosition.createNavigatable(project).navigate(true);
if (dialog != null && Registry.is("debugger.close.dialog.on.navigate")) {
dialog.close(DialogWrapper.CANCEL_EXIT_CODE);
}
}, project.getDisposed());
}
};
startComputingSourcePosition(value, navigatable);
}
Aggregations