IDEA-84746 Show error message in AWT.

This commit is contained in:
Kirill Likhodedov
2012-04-17 20:10:38 +04:00
parent d284d94c0b
commit a6a0e327f8
@@ -18,6 +18,7 @@ package git4idea.ui;
import com.intellij.notification.Notification; import com.intellij.notification.Notification;
import com.intellij.notification.NotificationListener; import com.intellij.notification.NotificationListener;
import com.intellij.notification.NotificationType; import com.intellij.notification.NotificationType;
import com.intellij.openapi.application.ApplicationManager;
import com.intellij.openapi.components.ServiceManager; import com.intellij.openapi.components.ServiceManager;
import com.intellij.openapi.diagnostic.Logger; import com.intellij.openapi.diagnostic.Logger;
import com.intellij.openapi.progress.ProgressIndicator; import com.intellij.openapi.progress.ProgressIndicator;
@@ -173,13 +174,18 @@ public class GitUnstashDialog extends DialogWrapper {
ProgressManager.getInstance().run(new Task.Modal(myProject, "Removing stash " + stash.getStash(), false) { ProgressManager.getInstance().run(new Task.Modal(myProject, "Removing stash " + stash.getStash(), false) {
@Override @Override
public void run(@NotNull ProgressIndicator indicator) { public void run(@NotNull ProgressIndicator indicator) {
GitSimpleHandler h = dropHandler(stash.getStash()); final GitSimpleHandler h = dropHandler(stash.getStash());
try { try {
h.run(); h.run();
h.unsilence(); h.unsilence();
} }
catch (VcsException ex) { catch (final VcsException ex) {
GitUIUtil.showOperationError(myProject, ex, h.printableCommandLine()); ApplicationManager.getApplication().invokeLater(new Runnable() {
@Override
public void run() {
GitUIUtil.showOperationError(myProject, ex, h.printableCommandLine());
}
});
} }
} }
}); });