mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
expand breakpoint groups on double click
This commit is contained in:
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -189,7 +189,7 @@ class CheckboxTreeHelper {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
else if (clickCount > 1) {
|
||||
else if (clickCount > 1 && clickCount % 2 == 0) {
|
||||
myEventDispatcher.getMulticaster().mouseDoubleClicked(node);
|
||||
return true;
|
||||
}
|
||||
|
||||
+14
-2
@@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright 2000-2014 JetBrains s.r.o.
|
||||
* Copyright 2000-2015 JetBrains s.r.o.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
@@ -55,6 +55,7 @@ import org.jetbrains.annotations.Nullable;
|
||||
|
||||
import javax.swing.*;
|
||||
import javax.swing.tree.DefaultMutableTreeNode;
|
||||
import javax.swing.tree.TreePath;
|
||||
import java.awt.*;
|
||||
import java.util.*;
|
||||
import java.util.List;
|
||||
@@ -235,7 +236,18 @@ public class BreakpointsDialog extends DialogWrapper {
|
||||
final JTree tree = new BreakpointsCheckboxTree(myProject, myTreeController) {
|
||||
@Override
|
||||
protected void onDoubleClick(CheckedTreeNode node) {
|
||||
navigate(false);
|
||||
if (node instanceof BreakpointsGroupNode) {
|
||||
TreePath path = TreeUtil.getPathFromRoot(node);
|
||||
if (isExpanded(path)) {
|
||||
collapsePath(path);
|
||||
}
|
||||
else {
|
||||
expandPath(path);
|
||||
}
|
||||
}
|
||||
else {
|
||||
navigate(false);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user