mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
artifacts: do not reset selection in 'Project Structure' on apply (IDEA-66258)
This commit is contained in:
+3
-4
@@ -289,11 +289,10 @@ public class ArtifactsStructureConfigurable extends BaseStructureConfigurable {
|
||||
modifiableModel.commit();
|
||||
}
|
||||
}.execute();
|
||||
myPackagingEditorContext.resetModifiableModel();
|
||||
}
|
||||
|
||||
|
||||
reset(); // TODO: fix to not reset on apply!
|
||||
myPackagingEditorContext.resetModifiableModel();
|
||||
reloadTreeNodes();
|
||||
restoreLastSelection();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
+16
-7
@@ -233,19 +233,28 @@ public abstract class BaseStructureConfigurable extends MasterDetailsComponent i
|
||||
if (!myWasTreeInitialized) {
|
||||
initTree();
|
||||
myTree.setShowsRootHandles(false);
|
||||
loadTree();
|
||||
} else {
|
||||
super.disposeUIResources();
|
||||
myTree.setShowsRootHandles(false);
|
||||
loadTree();
|
||||
loadTreeNodes();
|
||||
}
|
||||
for (ProjectStructureElement element : getProjectStructureElements()) {
|
||||
myContext.getDaemonAnalyzer().queueUpdate(element);
|
||||
else {
|
||||
reloadTreeNodes();
|
||||
}
|
||||
|
||||
super.reset();
|
||||
}
|
||||
|
||||
private void loadTreeNodes() {
|
||||
loadTree();
|
||||
for (ProjectStructureElement element : getProjectStructureElements()) {
|
||||
myContext.getDaemonAnalyzer().queueUpdate(element);
|
||||
}
|
||||
}
|
||||
|
||||
protected final void reloadTreeNodes() {
|
||||
super.disposeUIResources();
|
||||
myTree.setShowsRootHandles(false);
|
||||
loadTreeNodes();
|
||||
}
|
||||
|
||||
@NotNull
|
||||
protected Collection<? extends ProjectStructureElement> getProjectStructureElements() {
|
||||
return Collections.emptyList();
|
||||
|
||||
@@ -25,7 +25,6 @@ import com.intellij.ui.navigation.Place;
|
||||
import com.intellij.ui.treeStructure.Tree;
|
||||
import com.intellij.util.PlatformIcons;
|
||||
import com.intellij.util.containers.ContainerUtil;
|
||||
import java.util.HashSet;
|
||||
import com.intellij.util.ui.JBUI;
|
||||
import com.intellij.util.ui.UIUtil;
|
||||
import com.intellij.util.ui.tree.TreeUtil;
|
||||
@@ -332,6 +331,10 @@ public abstract class MasterDetailsComponent implements Configurable, DetailsCom
|
||||
//myTree.requestFocus();
|
||||
myState.getProportions().restoreSplitterProportions(myWholePanel);
|
||||
|
||||
restoreLastSelection();
|
||||
}
|
||||
|
||||
protected final void restoreLastSelection() {
|
||||
final Enumeration enumeration = myRoot.breadthFirstEnumeration();
|
||||
boolean selected = false;
|
||||
while (enumeration.hasMoreElements()) {
|
||||
|
||||
Reference in New Issue
Block a user