aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRemy Suen2010-04-16 20:39:55 (EDT)
committerRemy Suen2010-04-16 20:39:55 (EDT)
commit51b7b4939c2032495438d4827805c2f6453adbe7 (patch)
treeee12634f23919d8129f3e900020b4ca792085f3e
parent1787ca23b9ff80a66e86d22fbc302726057001f5 (diff)
downloadegit-51b7b4939c2032495438d4827805c2f6453adbe7.zip
egit-51b7b4939c2032495438d4827805c2f6453adbe7.tar.gz
egit-51b7b4939c2032495438d4827805c2f6453adbe7.tar.bz2
Do not eagerly schedule refresh of the 'Repositories' viewrefs/changes/65/565/4
The view was originally refreshing its contents even when the user did not actually perform any action in the wizard. The code now checks to ensure that the user actually confirmed the operation before scheduling a refresh. Change-Id: I60ab4e39b050d193c923e7b3e5ba3eb3c7904c2a
-rw-r--r--org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java32
1 files changed, 15 insertions, 17 deletions
diff --git a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
index 3a1cc3b..7d70f30 100644
--- a/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
+++ b/org.eclipse.egit.ui/src/org/eclipse/egit/ui/internal/repository/RepositoriesView.java
@@ -670,11 +670,11 @@ public class RepositoriesView extends ViewPart implements ISelectionProvider {
@Override
public void widgetSelected(SelectionEvent e) {
- new WizardDialog(getSite().getShell(),
- new ConfigureRemoteWizard(node.getRepository()))
- .open();
- scheduleRefresh();
-
+ WizardDialog dialog = new WizardDialog(getSite().getShell(),
+ new ConfigureRemoteWizard(node.getRepository()));
+ if (dialog.open() == Window.OK) {
+ scheduleRefresh();
+ }
}
});
@@ -691,12 +691,11 @@ public class RepositoriesView extends ViewPart implements ISelectionProvider {
@Override
public void widgetSelected(SelectionEvent e) {
-
- new WizardDialog(getSite().getShell(),
- new ConfigureRemoteWizard(node.getRepository(),
- name, false)).open();
- scheduleRefresh();
-
+ WizardDialog dialog = new WizardDialog(getSite().getShell(),
+ new ConfigureRemoteWizard(node.getRepository(), name, false));
+ if (dialog.open() == Window.OK) {
+ scheduleRefresh();
+ }
}
});
@@ -707,12 +706,11 @@ public class RepositoriesView extends ViewPart implements ISelectionProvider {
@Override
public void widgetSelected(SelectionEvent e) {
-
- new WizardDialog(getSite().getShell(),
- new ConfigureRemoteWizard(node.getRepository(),
- name, true)).open();
- scheduleRefresh();
-
+ WizardDialog dialog = new WizardDialog(getSite().getShell(),
+ new ConfigureRemoteWizard(node.getRepository(), name, true));
+ if (dialog.open() == Window.OK) {
+ scheduleRefresh();
+ }
}
});