IDEA-123787 "No live templates selected" label in multiple selection
authorVassiliy <vassiliy.kudryashov@jetbrains.com>
Tue, 3 Jun 2014 13:55:54 +0000 (17:55 +0400)
committerVassiliy <vassiliy.kudryashov@jetbrains.com>
Tue, 3 Jun 2014 13:55:54 +0000 (17:55 +0400)
platform/lang-impl/src/com/intellij/codeInsight/template/impl/TemplateListPanel.java

index ed0419eb3a1fbd47c71496d8b23592ea6c5b6fc6..9a7a724e2d5d21a8199d45794d97af7e573cb6f2 100644 (file)
@@ -51,10 +51,7 @@ import javax.swing.*;
 import javax.swing.border.EmptyBorder;
 import javax.swing.event.TreeSelectionEvent;
 import javax.swing.event.TreeSelectionListener;
-import javax.swing.tree.DefaultMutableTreeNode;
-import javax.swing.tree.DefaultTreeModel;
-import javax.swing.tree.TreeNode;
-import javax.swing.tree.TreePath;
+import javax.swing.tree.*;
 import java.awt.*;
 import java.awt.event.ActionEvent;
 import java.awt.event.ActionListener;
@@ -573,6 +570,7 @@ public class TemplateListPanel extends JPanel implements Disposable {
     };
     myTree.setRootVisible(false);
     myTree.setShowsRootHandles(true);
+    myTree.getSelectionModel().setSelectionMode(TreeSelectionModel.SINGLE_TREE_SELECTION);
 
     myTree.getSelectionModel().addTreeSelectionListener(new TreeSelectionListener(){
       @Override