artifact 'surround with': avoid invokeLater

This commit is contained in:
peter
2016-04-06 11:07:28 +02:00
parent 1a23fc52c9
commit 395bd478d6
@@ -17,7 +17,6 @@ package com.intellij.openapi.roots.ui.configuration.artifacts.actions;
import com.intellij.openapi.actionSystem.AnActionEvent;
import com.intellij.openapi.actionSystem.CustomShortcutSet;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.keymap.KeymapManager;
import com.intellij.openapi.project.Project;
import com.intellij.openapi.roots.ui.configuration.artifacts.ArtifactEditorEx;
@@ -87,13 +86,7 @@ public class SurroundElementWithAction extends LayoutTreeActionBase {
@Override
public PopupStep onChosen(final CompositePackagingElementType selectedValue, boolean finalChoice) {
ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
surroundWith(selectedValue, parent, selected, treeComponent);
}
});
return FINAL_CHOICE;
return doFinalStep(() -> surroundWith(selectedValue, parent, selected, treeComponent));
}
}).showInBestPositionFor(e.getDataContext());
}