mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
Use Messages instead of JOptionPane.
This commit is contained in:
+3
-7
@@ -22,10 +22,9 @@ import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.ui.Messages;
|
||||
import org.jetbrains.idea.maven.utils.MavenDataKeys;
|
||||
|
||||
import javax.swing.*;
|
||||
|
||||
/**
|
||||
* @author Sergey Evdokimov
|
||||
*/
|
||||
@@ -37,11 +36,8 @@ public class RemoveMavenRunConfigurationAction extends AnAction {
|
||||
|
||||
assert settings != null && project != null;
|
||||
|
||||
int res = JOptionPane.showConfirmDialog(JOptionPane.getRootFrame(),
|
||||
"Delete \"" + settings.getName() + "\"?",
|
||||
"Confirmation", JOptionPane.YES_NO_OPTION);
|
||||
|
||||
if (res == JOptionPane.YES_OPTION) {
|
||||
int res = Messages.showYesNoDialog(project, "Delete \"" + settings.getName() + "\"?", "Confirmation", Messages.getQuestionIcon());
|
||||
if (res == 0) {
|
||||
((RunManagerEx)RunManager.getInstance(project)).removeConfiguration(settings);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user