diff --git a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java index 1d89297b62a4..a11f1cb076b1 100644 --- a/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java +++ b/platform/dvcs-impl/src/com/intellij/dvcs/push/ui/PushLog.java @@ -156,7 +156,6 @@ public class PushLog extends JPanel implements DataProvider { myTree.setUI(new MyTreeUi()); myTree.setBorder(new EmptyBorder(2, 0, 0, 0)); //additional vertical indent myTree.setEditable(true); - myTree.setHorizontalAutoScrollingEnabled(false); myTree.setShowsRootHandles(root.getChildCount() > 1); MyTreeCellEditor treeCellEditor = new MyTreeCellEditor(); myTree.setCellEditor(treeCellEditor); diff --git a/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java b/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java index a28aa2f1da52..f28f3eec6f2e 100644 --- a/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java +++ b/platform/lang-impl/src/com/intellij/ide/util/FileStructurePopup.java @@ -1034,7 +1034,6 @@ public class FileStructurePopup implements Disposable, TreeActionsOwner { super(treeModel); setRootVisible(false); setShowsRootHandles(true); - setHorizontalAutoScrollingEnabled(false); HintUpdateSupply.installHintUpdateSupply(this, o -> { Object value = unwrapValue(o); diff --git a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java index dc63f7c4c073..3dcfb73ac3cc 100644 --- a/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java +++ b/platform/platform-api/src/com/intellij/ui/treeStructure/Tree.java @@ -20,6 +20,7 @@ import com.intellij.openapi.util.Condition; import com.intellij.openapi.util.Conditions; import com.intellij.openapi.util.Disposer; import com.intellij.openapi.util.SystemInfo; +import com.intellij.openapi.util.registry.Registry; import com.intellij.ui.*; import com.intellij.util.ReflectionUtil; import com.intellij.util.ui.*; @@ -55,7 +56,7 @@ public class Tree extends JTree implements ComponentWithEmptyText, ComponentWith private Dimension myHoldSize; private final MySelectionModel mySelectionModel = new MySelectionModel(); - private boolean myHorizontalAutoScrolling = true; + private boolean myHorizontalAutoScrolling = Registry.is("ide.tree.horizontal.default.autoscrolling", false); private TreePath rollOverPath; diff --git a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java index db354da5177b..6f92da7a6783 100644 --- a/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java +++ b/platform/usageView/src/com/intellij/usages/impl/UsageViewImpl.java @@ -192,7 +192,6 @@ public class UsageViewImpl implements UsageViewEx { myTree = new Tree(myModel) { { ToolTipManager.sharedInstance().registerComponent(this); - setHorizontalAutoScrollingEnabled(false); } @Override diff --git a/platform/util/resources/misc/registry.properties b/platform/util/resources/misc/registry.properties index a121599bc741..438f00bcc645 100644 --- a/platform/util/resources/misc/registry.properties +++ b/platform/util/resources/misc/registry.properties @@ -136,6 +136,8 @@ ide.tree.clearOnHideTime=120000 ide.tree.clearOnHideTime.description=Time in milliseconds when the hidden project view tree will be deactivated. ide.tree.autoscrollToVCenter=true +ide.tree.horizontal.default.autoscrolling=false +ide.tree.horizontal.default.autoscrolling.description=Allow automatic horizontal scroll of selected tree nodes to visible area in tree views ide.tree.ensureSelectionOnFocusGained=true ide.tree.autoExpandMaxDepth=5 ide.tree.expandRecursionDepth=50 diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java index a51359fd7b4c..02291f65c718 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/shelf/ShelvedChangesViewManager.java @@ -144,7 +144,6 @@ public class ShelvedChangesViewManager implements ProjectComponent { myTree.setRootVisible(false); myTree.setShowsRootHandles(true); myTree.setEditable(true); - myTree.setHorizontalAutoScrollingEnabled(false); myTree.setCellRenderer(new ShelfTreeCellRenderer(project, myMoveRenameInfo)); DefaultTreeCellEditor treeCellEditor = new DefaultTreeCellEditor(myTree, null) { @Override diff --git a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java index fd811120dba8..72a15b56997c 100644 --- a/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java +++ b/platform/vcs-impl/src/com/intellij/openapi/vcs/changes/ui/ChangesTree.java @@ -94,7 +94,6 @@ public abstract class ChangesTree extends Tree implements DataProvider { myShowCheckboxes = showCheckboxes; myCheckboxWidth = new JCheckBox().getPreferredSize().width; - setHorizontalAutoScrollingEnabled(false); setRootVisible(false); setShowsRootHandles(true); setOpaque(false); diff --git a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/tree/BreakpointsCheckboxTree.java b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/tree/BreakpointsCheckboxTree.java index b464d515a749..2bd1d68103f7 100644 --- a/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/tree/BreakpointsCheckboxTree.java +++ b/platform/xdebugger-impl/src/com/intellij/xdebugger/impl/breakpoints/ui/tree/BreakpointsCheckboxTree.java @@ -54,7 +54,6 @@ public class BreakpointsCheckboxTree extends CheckboxTree { public BreakpointsCheckboxTree(Project project, BreakpointItemsTreeController model) { super(new BreakpointsTreeCellRenderer.BreakpointsCheckboxTreeCellRenderer(project), model.getRoot()); - setHorizontalAutoScrollingEnabled(false); } @Override