diff options
author | james | 2002-02-04 19:17:05 +0000 |
---|---|---|
committer | james | 2002-02-04 19:17:05 +0000 |
commit | e6e851d94184ad5a2ae1aacc60a42c28f05394b6 (patch) | |
tree | 178bd168e62d29de78e5d0b4cd0f0b7d048c7d39 | |
parent | 18caaa714c1faff83624fda3f40eba2e6f108c97 (diff) | |
download | eclipse.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.java | 32 |
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)); |