mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-37228 Live Template abbreviation is shown cutted if new name is longer then old one
This commit is contained in:
@@ -35,6 +35,7 @@ import com.intellij.ui.SimpleTextAttributes;
|
||||
import com.intellij.util.Alarm;
|
||||
import com.intellij.util.ui.ColumnInfo;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.tree.TreeUtil;
|
||||
import com.intellij.util.ui.update.UiNotifyConnector;
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
@@ -494,6 +495,17 @@ class TemplateListPanel extends JPanel {
|
||||
myTree.setSelectionInterval(selected, selected);
|
||||
|
||||
updateTemplateTextArea();
|
||||
|
||||
List<TreePath> expandedPaths = TreeUtil.collectExpandedPaths(myTree);
|
||||
TreePath[] selectedPaths = myTree.getSelectionPaths();
|
||||
((DefaultTreeModel)myTree.getModel()).nodeStructureChanged(myTreeRoot);
|
||||
TreeUtil.restoreExpandedPaths(myTree, expandedPaths);
|
||||
if (selectedPaths != null) {
|
||||
myTree.setSelectionPaths(selectedPaths);
|
||||
}
|
||||
|
||||
myTree.validate();
|
||||
myTree.repaint();
|
||||
}
|
||||
|
||||
private Map<TemplateOptionalProcessor, Boolean> getOptions(final TemplateImpl template) {
|
||||
|
||||
Reference in New Issue
Block a user