mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
IDEA-27194: Artifacts should delete old-named artifacts file wher I press apply button
This commit is contained in:
+10
@@ -41,6 +41,7 @@ public class SingleConfigurableEditor extends DialogWrapper {
|
||||
private Configurable myConfigurable;
|
||||
private JComponent myCenterPanel;
|
||||
private String myDimensionKey;
|
||||
private boolean myChangesWereApplied;
|
||||
|
||||
public SingleConfigurableEditor(Project project, Configurable configurable, @NonNls String dimensionKey) {
|
||||
super(project, true);
|
||||
@@ -108,6 +109,14 @@ public class SingleConfigurableEditor extends DialogWrapper {
|
||||
HelpManager.getInstance().invokeHelp(myConfigurable.getHelpTopic());
|
||||
}
|
||||
|
||||
@Override
|
||||
public void doCancelAction() {
|
||||
if (myChangesWereApplied) {
|
||||
ApplicationManager.getApplication().saveAll();
|
||||
}
|
||||
super.doCancelAction();
|
||||
}
|
||||
|
||||
protected void doOKAction() {
|
||||
try {
|
||||
if (myConfigurable.isModified()) myConfigurable.apply();
|
||||
@@ -165,6 +174,7 @@ public class SingleConfigurableEditor extends DialogWrapper {
|
||||
myPerformAction = true;
|
||||
if (myConfigurable.isModified()) {
|
||||
myConfigurable.apply();
|
||||
myChangesWereApplied = true;
|
||||
setCancelButtonText(CommonBundle.getCloseButtonText());
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user