mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
artifacts editor: synchronize manifest properties between different artifacts using same manifest file (IDEA-111679)
This commit is contained in:
+19
@@ -35,6 +35,7 @@ import com.intellij.openapi.roots.ui.configuration.projectRoot.*;
|
||||
import com.intellij.openapi.roots.ui.configuration.projectRoot.daemon.ProjectStructureElement;
|
||||
import com.intellij.openapi.ui.MasterDetailsState;
|
||||
import com.intellij.openapi.ui.NamedConfigurable;
|
||||
import com.intellij.openapi.util.Comparing;
|
||||
import com.intellij.packaging.artifacts.*;
|
||||
import com.intellij.packaging.impl.artifacts.ArtifactUtil;
|
||||
import com.intellij.packaging.impl.artifacts.InvalidArtifact;
|
||||
@@ -317,6 +318,24 @@ public class ArtifactsStructureConfigurable extends BaseStructureConfigurable {
|
||||
myPackagingEditorContext.disposeUIResources();
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void updateSelection(@Nullable NamedConfigurable configurable) {
|
||||
boolean selectionChanged = !Comparing.equal(myCurrentConfigurable, configurable);
|
||||
if (selectionChanged && myCurrentConfigurable instanceof ArtifactConfigurable) {
|
||||
ArtifactEditorImpl editor = myPackagingEditorContext.getArtifactEditor(((ArtifactConfigurable)myCurrentConfigurable).getArtifact());
|
||||
if (editor != null) {
|
||||
editor.getLayoutTreeComponent().saveElementProperties();
|
||||
}
|
||||
}
|
||||
super.updateSelection(configurable);
|
||||
if (selectionChanged && configurable instanceof ArtifactConfigurable) {
|
||||
ArtifactEditorImpl editor = myPackagingEditorContext.getArtifactEditor(((ArtifactConfigurable)configurable).getArtifact());
|
||||
if (editor != null) {
|
||||
editor.getLayoutTreeComponent().resetElementProperties();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public String getHelpTopic() {
|
||||
final String topic = super.getHelpTopic();
|
||||
|
||||
Reference in New Issue
Block a user