Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJean Michel-Lemieux2004-12-09 12:44:15 -0500
committerJean Michel-Lemieux2004-12-09 12:44:15 -0500
commit88fe1247f4902f200df0f1b674b87699cbb8a277 (patch)
tree0d471d24329f43f1195d0a10cf6db987056703a5
parent0c0f86535615f26ec637fac4b0915cecb64a325f (diff)
downloadeclipse.platform.team-88fe1247f4902f200df0f1b674b87699cbb8a277.tar.gz
eclipse.platform.team-88fe1247f4902f200df0f1b674b87699cbb8a277.tar.xz
eclipse.platform.team-88fe1247f4902f200df0f1b674b87699cbb8a277.zip
Bug 75735 Changes to working set names not reflected in synchronize dropdownRoot_bran
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties4
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java5
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java6
-rw-r--r--bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java17
5 files changed, 32 insertions, 5 deletions
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
index f6fe1cb8a..955200821 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/messages.properties
@@ -185,8 +185,8 @@ action.collapseAll.tooltip=Collapse All
action.collapseAll.description=Collapse All
action.collapseAll.image=collapseall.gif
-action.configureSchedulel.label=&Schedule {0}...
-action.configureSchedulel.tooltip=Configure the Synchronization Schedule...
+action.configureSchedulel.label=&Schedule...
+action.configureSchedulel.tooltip=Schedule a Background Synchronization
action.refreshWithRemote.label=&Synchronize
action.refreshWithRemote.tooltip=Synchronize
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
index 17ff241d5..68c05088e 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/internal/ui/synchronize/SynchronizeManager.java
@@ -192,6 +192,11 @@ public class SynchronizeManager implements ISynchronizeManager {
* @see org.eclipse.team.ui.synchronize.ISynchronizeParticipantReference#getDisplayName()
*/
public String getDisplayName() {
+ String key = Utils.getKey(descriptor.getId(), getSecondaryId());
+ ISynchronizeParticipant participant = (ISynchronizeParticipant) counter.get(key);
+ if(participant != null) {
+ return participant.getName();
+ }
return displayName != null ? displayName : descriptor.getName();
}
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
index 4d3e3ad46..eb4929340 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/ISynchronizeScope.java
@@ -30,6 +30,11 @@ public interface ISynchronizeScope {
public static final String ROOTS = "prop_roots"; //$NON-NLS-1$
/**
+ * Property used to indicate when the name of the scope has changed.
+ */
+ public static final String NAME = "prop_name"; //$NON-NLS-1$
+
+ /**
* Return the name of the scope
*
* @return the name of the scope
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
index e253565ce..fabcf8747 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/SubscriberParticipant.java
@@ -16,6 +16,7 @@ import org.eclipse.core.resources.IResource;
import org.eclipse.core.runtime.*;
import org.eclipse.jface.util.IPropertyChangeListener;
import org.eclipse.jface.util.PropertyChangeEvent;
+import org.eclipse.jface.viewers.IBasicPropertyConstants;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.TeamException;
import org.eclipse.team.core.subscribers.Subscriber;
@@ -256,6 +257,11 @@ public abstract class SubscriberParticipant extends AbstractSynchronizeParticipa
if (event.getProperty().equals(ISynchronizeScope.ROOTS)) {
setResources(scope.getRoots());
}
+ if (event.getProperty().equals(ISynchronizeScope.NAME)) {
+ // Force a name change event, which will cause this classes getName to be called
+ // and updated with the correct working set name.
+ firePropertyChange(this, IBasicPropertyConstants.P_TEXT, null, getName());
+ }
}
/* (non-Javadoc)
diff --git a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
index b789a8610..0df7f9ad5 100644
--- a/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
+++ b/bundles/org.eclipse.team.ui/src/org/eclipse/team/ui/synchronize/WorkingSetScope.java
@@ -45,8 +45,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
* @param set the working set that defines this scope
*/
public WorkingSetScope(IWorkingSet[] sets) {
- this.sets = sets;
- PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
+ setWorkingSets(sets);
}
/**
@@ -59,6 +58,16 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
super(memento);
}
+ /**
+ * Initialize this working set scope with the provided working sets.
+ *
+ * @since 3.1
+ */
+ protected void setWorkingSets(IWorkingSet[] sets) {
+ this.sets = sets;
+ PlatformUI.getWorkbench().getWorkingSetManager().addPropertyChangeListener(this);
+ }
+
/* (non-Javadoc)
* @see org.eclipse.team.ui.synchronize.ISynchronizeScope#getName()
*/
@@ -133,6 +142,8 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
return;
}
}
+ } else if(event.getProperty() == IWorkingSetManager.CHANGE_WORKING_SET_NAME_CHANGE) {
+ firePropertyChangedEvent(new PropertyChangeEvent(this, NAME, null, event.getNewValue()));
}
}
@@ -173,7 +184,7 @@ public class WorkingSetScope extends AbstractSynchronizeScope implements IProper
sets.add(set);
}
}
- this.sets = (IWorkingSet[]) sets.toArray(new IWorkingSet[sets.size()]);
+ setWorkingSets((IWorkingSet[]) sets.toArray(new IWorkingSet[sets.size()]));
}
}
} \ No newline at end of file

Back to the top