diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/XDebuggerEvaluationDialog.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/XDebuggerEvaluationDialog.java index 49fd002c4ba3..c0de88fd2593 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/XDebuggerEvaluationDialog.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/evaluate/XDebuggerEvaluationDialog.java @@ -1,6 +1,4 @@ -/* - * Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. - */ +// Copyright 2000-2018 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. package com.intellij.xdebugger.impl.evaluate; import com.intellij.codeInsight.lookup.LookupManager; @@ -10,7 +8,6 @@ import com.intellij.openapi.editor.Editor; import com.intellij.openapi.project.DumbAwareAction; import com.intellij.openapi.project.Project; import com.intellij.openapi.ui.DialogWrapper; -import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.SystemInfo; import com.intellij.openapi.wm.IdeFocusManager; import com.intellij.openapi.wm.WindowManager; @@ -137,7 +134,7 @@ public class XDebuggerEvaluationDialog extends DialogWrapper { }.registerCustomShortcutSet(new CustomShortcutSet(KeyStroke.getKeyStroke(KeyEvent.VK_R, InputEvent.ALT_DOWN_MASK)), getRootPane(), myDisposable); - myTreePanel.getTree().expandNodesOnLoad(getFirstChildCondition()); + myTreePanel.getTree().expandNodesOnLoad(XDebuggerEvaluationDialog::isFirstChild); EvaluationMode mode = XDebuggerSettingManagerImpl.getInstanceImpl().getGeneralSettings().getEvaluationDialogMode(); if (mode == EvaluationMode.CODE_FRAGMENT && !myIsCodeFragmentEvaluationSupported) { @@ -305,7 +302,7 @@ public class XDebuggerEvaluationDialog extends DialogWrapper { final XDebuggerTree tree = myTreePanel.getTree(); tree.markNodesObsolete(); tree.setRoot(new EvaluatingExpressionRootNode(this, tree), false); - tree.selectNodeOnLoad(getFirstChildCondition()); + tree.selectNodeOnLoad(XDebuggerEvaluationDialog::isFirstChild); myResultPanel.invalidate(); @@ -322,8 +319,8 @@ public class XDebuggerEvaluationDialog extends DialogWrapper { } } - private static Condition getFirstChildCondition() { - return node -> node.getParent() instanceof EvaluatingExpressionRootNode; + private static boolean isFirstChild(TreeNode node) { + return node.getParent() instanceof EvaluatingExpressionRootNode; } @Override