mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
always select the result node on evaluate
This commit is contained in:
+6
-3
@@ -137,9 +137,7 @@ public class XDebuggerEvaluationDialog extends DialogWrapper {
|
||||
}.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.ALT_DOWN_MASK)), getRootPane(),
|
||||
myDisposable);
|
||||
|
||||
Condition<TreeNode> rootFilter = node -> node.getParent() instanceof EvaluatingExpressionRootNode;
|
||||
myTreePanel.getTree().expandNodesOnLoad(rootFilter);
|
||||
myTreePanel.getTree().selectNodeOnLoad(rootFilter);
|
||||
myTreePanel.getTree().expandNodesOnLoad(getFirstChildCondition());
|
||||
|
||||
EvaluationMode mode = XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings().getEvaluationDialogMode();
|
||||
if (mode == EvaluationMode.CODE_FRAGMENT && !myIsCodeFragmentEvaluationSupported) {
|
||||
@@ -307,6 +305,7 @@ public class XDebuggerEvaluationDialog extends DialogWrapper {
|
||||
final XDebuggerTree tree = myTreePanel.getTree();
|
||||
tree.markNodesObsolete();
|
||||
tree.setRoot(new EvaluatingExpressionRootNode(this, tree), false);
|
||||
tree.selectNodeOnLoad(getFirstChildCondition());
|
||||
|
||||
myResultPanel.invalidate();
|
||||
|
||||
@@ -323,6 +322,10 @@ public class XDebuggerEvaluationDialog extends DialogWrapper {
|
||||
}
|
||||
}
|
||||
|
||||
private static Condition<TreeNode> getFirstChildCondition() {
|
||||
return node -> node.getParent() instanceof EvaluatingExpressionRootNode;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doCancelAction() {
|
||||
getInputEditor().saveTextInHistory();
|
||||
|
||||
Reference in New Issue
Block a user