Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjames2002-02-04 19:17:05 +0000
committerjames2002-02-04 19:17:05 +0000
commite6e851d94184ad5a2ae1aacc60a42c28f05394b6 (patch)
tree178bd168e62d29de78e5d0b4cd0f0b7d048c7d39
parent18caaa714c1faff83624fda3f40eba2e6f108c97 (diff)
downloadeclipse.platform.team-e6e851d94184ad5a2ae1aacc60a42c28f05394b6.tar.gz
eclipse.platform.team-e6e851d94184ad5a2ae1aacc60a42c28f05394b6.tar.xz
eclipse.platform.team-e6e851d94184ad5a2ae1aacc60a42c28f05394b6.zip
8671: No need for "Nothing to Sync..." dialog?
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncView.java32
1 files changed, 21 insertions, 11 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncView.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncView.java
index 6f9799f2e..02f70fb67 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncView.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/sync/SyncView.java
@@ -255,15 +255,6 @@ public class SyncView extends ViewPart {
this.input = input;
currentSyncMode = SYNC_NONE;
- // Run the diff and stop if cancel or error occurred.
- if (!run(input)) return;
-
- // Check for problem message
- if (input.getMessage() != null) {
- MessageDialog.openInformation(getSite().getShell(), Policy.bind("SyncView.unableSynchronize"), input.getMessage());
- return;
- }
-
// Remove old viewer
Control[] oldChildren = top.getChildren();
if (oldChildren != null) {
@@ -279,14 +270,33 @@ public class SyncView extends ViewPart {
bars.getMenuManager().update();
bars.updateActionBars();
+ // Display the default contents while running the diff
+ showDefaultContents();
+ top.layout();
+
+ // Run the diff and stop if cancel or error occurred.
+ if (!run(input)) return;
+
+ // Check for problem message
+ if (input.getMessage() != null) {
+ MessageDialog.openInformation(getSite().getShell(), Policy.bind("SyncView.unableSynchronize"), input.getMessage());
+ return;
+ }
+
// Check for empty comparison
if (isEmpty(input.getDiffRoot())) {
MessageDialog.openInformation(getSite().getShell(), Policy.bind("nothingToSynchronize"), Policy.bind("SyncView.same"));
- showDefaultContents();
- top.layout();
return;
}
+ // Remove the default contents
+ oldChildren = top.getChildren();
+ if (oldChildren != null) {
+ for (int i = 0; i < oldChildren.length; i++) {
+ oldChildren[i].dispose();
+ }
+ }
+
// Show the result
Control control = input.createContents(top);
control.setLayoutData(new GridData(GridData.FILL_BOTH));

Back to the top