From 412129f5f90a293502d64d75e1c3392836d2a71e Mon Sep 17 00:00:00 2001 From: Kirill Likhodedov Date: Sat, 16 Jun 2012 12:38:10 +0400 Subject: [PATCH] [github] Handle GithubShareAction result in EDT: show error or refresh need to be called from there. --- .../plugins/github/GithubShareAction.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java index 263e038ead8c..09c71311c194 100644 --- a/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java +++ b/plugins/github/src/org/jetbrains/plugins/github/GithubShareAction.java @@ -237,19 +237,19 @@ public class GithubShareAction extends DumbAwareAction { gitPushHandler.addParameters("-u", "origin", "master"); GitPushUtils.trackPushRejectedAsError(gitPushHandler, "Rejected push (" + root.getPresentableUrl() + "): "); errors.addAll(GitHandlerUtil.doSynchronouslyWithExceptions(gitPushHandler)); - if (!errors.isEmpty()) { ApplicationManager.getApplication().invokeLater(new Runnable() { @Override public void run() { - GitUIUtil.showOperationErrors(project, errors, GitBundle.getString("push.active.pushing")); + if (!errors.isEmpty()) { + GitUIUtil.showOperationErrors(project, errors, GitBundle.getString("push.active.pushing")); + } + else { + RefreshAction.doRefresh(project); + Notifications.Bus.notify(new Notification("github", "Success", "Successfully created project ''" + name + "'' on github", + NotificationType.INFORMATION)); + } } }); - } - else { - RefreshAction.doRefresh(project); - Notifications.Bus.notify(new Notification("github", "Success", "Successfully created project ''" + name + "'' on github", - NotificationType.INFORMATION)); - } } }.queue(); }