Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Wolf2016-04-21 21:10:18 +0000
committerMatthias Sohn2016-04-24 21:26:53 +0000
commitf17c07e7777f8a353f4933abcdb2c18d08321a88 (patch)
tree246cdacc1c71a873670c0409eb17ca38db7464cb
parentff8fd0e218dba6eb0a0e9ea7b8288c4af4bd38d1 (diff)
downloadegit-f17c07e7777f8a353f4933abcdb2c18d08321a88.tar.gz
egit-f17c07e7777f8a353f4933abcdb2c18d08321a88.tar.xz
egit-f17c07e7777f8a353f4933abcdb2c18d08321a88.zip
Fix two more asynchronous dialog invocations
Bug: 487209 Change-Id: Id13c1c15ed48a991bc0e960dde99dc0039e5a895 Signed-off-by: Thomas Wolf <thomas.wolf@paranor.ch>
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java16
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java17
2 files changed, 4 insertions, 29 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java
index 11ecbde413..7e7c087ac3 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushToGerritPage.java
@@ -59,10 +59,8 @@ import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.Combo;
import org.eclipse.swt.widgets.Composite;
import org.eclipse.swt.widgets.Label;
-import org.eclipse.swt.widgets.Shell;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.IWorkbenchCommandConstants;
-import org.eclipse.ui.PlatformUI;
/**
* Push the current HEAD to Gerrit
@@ -261,18 +259,8 @@ class PushToGerritPage extends WizardPage {
}
}
});
- getShell().getDisplay().asyncExec(new Runnable() {
- @Override
- public void run() {
- Shell shell = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getShell();
- PushResultDialog dlg = new PushResultDialog(shell,
- repository, result[0], op.getDestinationString(),
- false);
- dlg.showConfigureButton(false);
- dlg.open();
- }
- });
+ PushResultDialog.show(repository, result[0],
+ op.getDestinationString(), false, false);
storeLastUsedUri(uriCombo.getText());
storeLastUsedBranch(branchText.getText());
} catch (URISyntaxException e) {
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java
index bfcfb2190d..e9a2025abe 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/push/PushWizard.java
@@ -34,7 +34,6 @@ import org.eclipse.egit.ui.internal.components.RefSpecPage;
import org.eclipse.egit.ui.internal.components.RepositorySelection;
import org.eclipse.egit.ui.internal.components.RepositorySelectionPage;
import org.eclipse.egit.ui.internal.credentials.EGitCredentialsProvider;
-import org.eclipse.jface.dialogs.Dialog;
import org.eclipse.jface.dialogs.ErrorDialog;
import org.eclipse.jface.wizard.IWizardPage;
import org.eclipse.jface.wizard.Wizard;
@@ -46,8 +45,6 @@ import org.eclipse.jgit.transport.RemoteRefUpdate;
import org.eclipse.jgit.transport.Transport;
import org.eclipse.jgit.transport.URIish;
import org.eclipse.osgi.util.NLS;
-import org.eclipse.swt.widgets.Shell;
-import org.eclipse.ui.PlatformUI;
/**
* Wizard allowing user to specify all needed data to push to another repository
@@ -308,18 +305,8 @@ public class PushWizard extends Wizard {
}
if (resultToCompare == null || !result.equals(resultToCompare)) {
- PlatformUI.getWorkbench().getDisplay().asyncExec(
- new Runnable() {
- @Override
- public void run() {
- final Shell shell = PlatformUI.getWorkbench()
- .getActiveWorkbenchWindow().getShell();
- final Dialog dialog = new PushResultDialog(
- shell, localDb, result,
- destinationString, false);
- dialog.open();
- }
- });
+ PushResultDialog.show(localDb, result, destinationString, true,
+ false);
}
return Status.OK_STATUS;
}

Back to the top