Search in sources :

Example 1 with XNavigatable

use of com.intellij.xdebugger.frame.XNavigatable 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);
}
Also used : XNavigatable(com.intellij.xdebugger.frame.XNavigatable) XValueNodeImpl(com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl) AppUIUtil(com.intellij.ui.AppUIUtil) XValue(com.intellij.xdebugger.frame.XValue) DialogWrapper(com.intellij.openapi.ui.DialogWrapper) XDebuggerEvaluationDialog(com.intellij.xdebugger.impl.evaluate.XDebuggerEvaluationDialog) AnActionEvent(com.intellij.openapi.actionSystem.AnActionEvent) Project(com.intellij.openapi.project.Project) Registry(com.intellij.openapi.util.registry.Registry) NotNull(org.jetbrains.annotations.NotNull) Project(com.intellij.openapi.project.Project) XNavigatable(com.intellij.xdebugger.frame.XNavigatable) XDebuggerEvaluationDialog(com.intellij.xdebugger.impl.evaluate.XDebuggerEvaluationDialog) XValue(com.intellij.xdebugger.frame.XValue)

Aggregations

AnActionEvent (com.intellij.openapi.actionSystem.AnActionEvent)1 Project (com.intellij.openapi.project.Project)1 DialogWrapper (com.intellij.openapi.ui.DialogWrapper)1 Registry (com.intellij.openapi.util.registry.Registry)1 AppUIUtil (com.intellij.ui.AppUIUtil)1 XNavigatable (com.intellij.xdebugger.frame.XNavigatable)1 XValue (com.intellij.xdebugger.frame.XValue)1 XDebuggerEvaluationDialog (com.intellij.xdebugger.impl.evaluate.XDebuggerEvaluationDialog)1 XValueNodeImpl (com.intellij.xdebugger.impl.ui.tree.nodes.XValueNodeImpl)1 NotNull (org.jetbrains.annotations.NotNull)1