Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-05-03 16:53:45 -0400
committerJean Michel-Lemieux2004-05-03 16:53:45 -0400
commit091d60e5b6f9f0159b8f3e515a29d519543012cd (patch)
tree336bbcb7e9cd79f2d0e3b34847db3881e0e89d16
parentb05262166b5c31cff3768f1633804748804bf930 (diff)
downloadeclipse.platform.team-091d60e5b6f9f0159b8f3e515a29d519543012cd.tar.gz
eclipse.platform.team-091d60e5b6f9f0159b8f3e515a29d519543012cd.tar.xz
eclipse.platform.team-091d60e5b6f9f0159b8f3e515a29d519543012cd.zip
Bug 60647 [Progress] can't show compare dialog twice from progress view
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java22
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java1
2 files changed, 13 insertions, 10 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java
index 20cdd7bf9..0a1413fc8 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshSubscriberJob.java
@@ -239,7 +239,7 @@ public final class RefreshSubscriberJob extends WorkspaceJob {
code = IRefreshEvent.STATUS_NO_CHANGES;
text.append(Policy.bind("RefreshCompleteDialog.6")); //$NON-NLS-1$
}
- return new Status(IStatus.INFO, TeamUIPlugin.ID, code, text.toString(), null);
+ return new Status(IStatus.OK, TeamUIPlugin.ID, code, text.toString(), null);
}
return Status.OK_STATUS;
}
@@ -263,12 +263,7 @@ public final class RefreshSubscriberJob extends WorkspaceJob {
private void initialize(final IRefreshSubscriberListener listener) {
final IWorkbenchAction[] gotoAction = new IWorkbenchAction[] {null};
- IProgressMonitor group = Platform.getJobManager().createProgressGroup();
- group.beginTask(participant.getName(), 100);
- setProgressGroup(group, 80);
- getCollector().setProgressGroup(group, 20);
- setProperty(new QualifiedName("org.eclipse.ui.workbench.progress", "icon"), participant.getImageDescriptor());
- setProperty(new QualifiedName("org.eclipse.ui.workbench.progress", "goto"), new WorkbenchAction() {
+ final IWorkbenchAction actionWrapper = new WorkbenchAction() {
public void run() {
if(gotoAction[0] != null) {
gotoAction[0].run();
@@ -287,7 +282,14 @@ public final class RefreshSubscriberJob extends WorkspaceJob {
gotoAction[0].dispose();
}
}
- });
+ };
+
+ IProgressMonitor group = Platform.getJobManager().createProgressGroup();
+ group.beginTask(participant.getName(), 100);
+ setProgressGroup(group, 80);
+ getCollector().setProgressGroup(group, 20);
+ setProperty(new QualifiedName("org.eclipse.ui.workbench.progress", "icon"), participant.getImageDescriptor());
+ setProperty(new QualifiedName("org.eclipse.ui.workbench.progress", "goto"), actionWrapper);
// Listener delagate
IRefreshSubscriberListener autoListener = new IRefreshSubscriberListener() {
public void refreshStarted(IRefreshEvent event) {
@@ -317,12 +319,12 @@ public final class RefreshSubscriberJob extends WorkspaceJob {
// to perform the results.
} else {
gotoAction[0] = runnable;
- gotoAction[0].setEnabled(runnable.isEnabled());
+ actionWrapper.setEnabled(runnable.isEnabled());
runnable.addPropertyChangeListener(new IPropertyChangeListener() {
public void propertyChange(PropertyChangeEvent event) {
if(event.getProperty().equals(IAction.ENABLED)) {
Boolean bool = (Boolean) event.getNewValue();
- gotoAction[0].setEnabled(bool.booleanValue());
+ actionWrapper.setEnabled(bool.booleanValue());
}
}
});
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
index c5b34257e..4c0200d57 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/RefreshUserNotificationPolicyInModalDialog.java
@@ -55,6 +55,7 @@ public class RefreshUserNotificationPolicyInModalDialog implements IRefreshSubsc
return;
}
compareAndOpenDialog(event, participant);
+ setEnabled(false);
}
public void dispose() {
if (TeamUI.getSynchronizeManager().get(participant.getId(), participant.getSecondaryId()) == null) {

Back to the top