Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMichael Valenta2004-09-27 14:38:04 +0000
committerMichael Valenta2004-09-27 14:38:04 +0000
commit6a479d8079e8878d53b8f4fe0806661619cf3bd2 (patch)
treee34e701b381ee224de7e64b4f8c17accaa13750b
parent7754648d08c99828aec0f07af54bc3ea78b8e2d3 (diff)
downloadeclipse.platform.team-6a479d8079e8878d53b8f4fe0806661619cf3bd2.tar.gz
eclipse.platform.team-6a479d8079e8878d53b8f4fe0806661619cf3bd2.tar.xz
eclipse.platform.team-6a479d8079e8878d53b8f4fe0806661619cf3bd2.zip
Ongoing refactoring of Change Sets
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ChangeSet.java (renamed from bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/ChangeSet.java)32
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/IChangeSetChangeListener.java (renamed from bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/IChangeSetChangeListener.java)3
-rw-r--r--bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeSetManager.java (renamed from bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/SubscriberChangeSetManager.java)249
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java20
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelSorter.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDiffNode.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetManager.java2
-rw-r--r--bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java2
-rw-r--r--tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java4
11 files changed, 188 insertions, 132 deletions
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/ChangeSet.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ChangeSet.java
index dccaf70b5..3cbf975ba 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/ChangeSet.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/ChangeSet.java
@@ -8,15 +8,12 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.team.core.change;
+package org.eclipse.team.core.subscribers;
-import java.util.StringTokenizer;
+import java.util.*;
-import org.eclipse.core.resources.IResource;
-import org.eclipse.core.resources.IWorkspaceRoot;
-import org.eclipse.core.resources.ResourcesPlugin;
+import org.eclipse.core.resources.*;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.SyncInfoTree;
import org.eclipse.team.internal.core.TeamPlugin;
@@ -148,7 +145,7 @@ public class ChangeSet {
* @param resource
* @throws TeamException
*/
- public void add(SyncInfo info) throws TeamException {
+ public void add(SyncInfo info) {
if (getManager().isModified(info)) {
set.add(info);
}
@@ -160,7 +157,7 @@ public class ChangeSet {
* @param resources the resources to be added.
* @throws TeamException
*/
- public void add(SyncInfo[] infos) throws TeamException {
+ public void add(SyncInfo[] infos) {
try {
set.beginInput();
for (int i = 0; i < infos.length; i++) {
@@ -261,4 +258,23 @@ public class ChangeSet {
}
}
}
+
+ /**
+ * Add the resources to the change set if they are outgoing changes.
+ * @param resources the resouces to add.
+ * @throws TeamException
+ */
+ public void add(IResource[] resources) throws TeamException {
+ List toAdd = new ArrayList();
+ for (int i = 0; i < resources.length; i++) {
+ IResource resource = resources[i];
+ SyncInfo info = manager.getSyncInfo(resource);
+ if (info != null) {
+ toAdd.add(info);
+ }
+ }
+ if (!toAdd.isEmpty()) {
+ add((SyncInfo[]) toAdd.toArray(new SyncInfo[toAdd.size()]));
+ }
+ }
}
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/IChangeSetChangeListener.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/IChangeSetChangeListener.java
index 7a30f26ef..ef705805b 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/IChangeSetChangeListener.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/IChangeSetChangeListener.java
@@ -8,10 +8,11 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.team.core.change;
+package org.eclipse.team.core.subscribers;
import org.eclipse.core.resources.IResource;
+
/**
* Interface for registering change set change listeners with
* the change set manager.
diff --git a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/SubscriberChangeSetManager.java b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeSetManager.java
index 8a9d3d409..800434168 100644
--- a/bundles/org.eclipse.team.core/src/org/eclipse/team/core/change/SubscriberChangeSetManager.java
+++ b/bundles/org.eclipse.team.core/src/org/eclipse/team/core/subscribers/SubscriberChangeSetManager.java
@@ -8,31 +8,19 @@
* Contributors:
* IBM Corporation - initial API and implementation
*******************************************************************************/
-package org.eclipse.team.core.change;
+package org.eclipse.team.core.subscribers;
-import java.util.ArrayList;
-import java.util.Iterator;
-import java.util.List;
+import java.util.*;
import org.eclipse.core.internal.runtime.ListenerList;
+import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IResource;
-import org.eclipse.core.runtime.CoreException;
-import org.eclipse.core.runtime.IProgressMonitor;
-import org.eclipse.core.runtime.ISafeRunnable;
-import org.eclipse.core.runtime.IStatus;
-import org.eclipse.core.runtime.Platform;
-import org.eclipse.core.runtime.preferences.IEclipsePreferences;
-import org.eclipse.core.runtime.preferences.IPreferencesService;
-import org.eclipse.core.runtime.preferences.InstanceScope;
+import org.eclipse.core.runtime.*;
+import org.eclipse.core.runtime.preferences.*;
import org.eclipse.team.core.ITeamStatus;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.subscribers.Subscriber;
-import org.eclipse.team.core.synchronize.ISyncInfoSetChangeEvent;
-import org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener;
-import org.eclipse.team.core.synchronize.SyncInfo;
-import org.eclipse.team.core.synchronize.SyncInfoSet;
-import org.eclipse.team.internal.core.BackgroundEventHandler;
-import org.eclipse.team.internal.core.TeamPlugin;
+import org.eclipse.team.core.synchronize.*;
+import org.eclipse.team.internal.core.*;
import org.eclipse.team.internal.core.subscribers.SubscriberResourceCollector;
import org.osgi.service.prefs.BackingStoreException;
import org.osgi.service.prefs.Preferences;
@@ -48,28 +36,11 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
private static final int RESOURCE_REMOVAL = 1;
private static final int RESOURCE_CHANGE = 2;
- private static final int SET_RESOURCE_CHANGE = 3;
- private static final int SET_TITLE_CHANGE = 4;
- private static final int SET_ADDED = 5;
- private static final int SET_REMOVED = 6;
- private static final int DEFAULT_SET_CHANGED = 7;
-
private List activeSets;
private ListenerList listeners = new ListenerList();
private ChangeSet defaultSet;
private EventHandler handler;
- private class SetEvent extends BackgroundEventHandler.Event {
- private final ChangeSet set;
- public SetEvent(ChangeSet set, IResource resource, int type) {
- super(resource, type, IResource.DEPTH_ZERO);
- this.set = set;
- }
- public ChangeSet getSet() {
- return set;
- }
- }
-
/*
* Background event handler for serializing and batching change set changes
*/
@@ -85,16 +56,8 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
* @see org.eclipse.team.internal.core.BackgroundEventHandler#processEvent(org.eclipse.team.internal.core.BackgroundEventHandler.Event, org.eclipse.core.runtime.IProgressMonitor)
*/
protected void processEvent(Event event, IProgressMonitor monitor) throws CoreException {
- switch (event.getType()) {
- case RESOURCE_REMOVAL:
- handleRemove(event.getResource());
- break;
- case RESOURCE_CHANGE:
- handleChange(event.getResource(), event.getDepth());
- break;
- default:
- break;
- }
+ // Handle everything in the dispatch
+ dispatchEvents.add(event);
}
/* (non-Javadoc)
@@ -105,12 +68,52 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
return false;
}
try {
-
+ beginDispath();
+ for (Iterator iter = dispatchEvents.iterator(); iter.hasNext();) {
+ Event event = (Event) iter.next();
+ switch (event.getType()) {
+ case RESOURCE_REMOVAL:
+ handleRemove(event.getResource());
+ break;
+ case RESOURCE_CHANGE:
+ handleChange(event.getResource(), event.getDepth());
+ break;
+ default:
+ break;
+ }
+ }
} finally {
- dispatchEvents.clear();
+ try {
+ endDispatch(monitor);
+ } finally {
+ dispatchEvents.clear();
+ }
}
return true;
}
+
+ private void beginDispath() {
+ for (Iterator iter = activeSets.iterator(); iter.hasNext();) {
+ ChangeSet set = (ChangeSet) iter.next();
+ set.getSyncInfos().beginInput();
+ }
+ }
+
+ private void endDispatch(IProgressMonitor monitor) {
+ monitor.beginTask(null, 100 * activeSets.size());
+ for (Iterator iter = activeSets.iterator(); iter.hasNext();) {
+ ChangeSet set = (ChangeSet) iter.next();
+ try {
+ set.getSyncInfos().endInput(Policy.subMonitorFor(monitor, 100));
+ } catch (RuntimeException e) {
+ // Don't worry about ending every set if an error occurs.
+ // Instead, log the error and suggest a restart.
+ TeamPlugin.log(IStatus.ERROR, "An error occurred while reconciling change sets. Restarting the application is recommended.", e);
+ throw e;
+ }
+ }
+ monitor.done();
+ }
/* (non-Javadoc)
* @see org.eclipse.team.internal.core.BackgroundEventHandler#queueEvent(org.eclipse.team.internal.core.BackgroundEventHandler.Event, boolean)
@@ -141,10 +144,22 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
* Handle the change
*/
private void handleChange(IResource resource, int depth) throws TeamException {
- if (isModified(resource)) {
- // Consider for inclusion in the default set
- // if the resource is not already a memebr of another set
- considerForDefaultSet(resource);
+ SyncInfo syncInfo = getSyncInfo(resource);
+ if (isModified(syncInfo)) {
+ ChangeSet[] containingSets = getContainingSets(resource);
+ if (containingSets.length == 0) {
+ // Consider for inclusion in the default set
+ // if the resource is not already a memebr of another set
+ if (defaultSet != null) {
+ defaultSet.add(syncInfo);
+ }
+ } else {
+ for (int i = 0; i < containingSets.length; i++) {
+ ChangeSet set = containingSets[i];
+ // Update the sync info in the set
+ set.getSyncInfos().add(syncInfo);
+ }
+ }
} else {
removeFromAllSets(resource);
}
@@ -158,46 +173,31 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
}
private void removeFromAllSets(IResource resource) {
+ List toRemove = new ArrayList();
for (Iterator iter = activeSets.iterator(); iter.hasNext();) {
ChangeSet set = (ChangeSet) iter.next();
if (set.contains(resource)) {
set.remove(resource);
if (set.isEmpty()) {
- remove(set);
+ toRemove.add(set);
}
}
}
- }
-
- private void considerForDefaultSet(IResource resource) throws TeamException {
- if (defaultSet != null && !isInActiveSet(resource)) {
- defaultSet.add(resource);
+ for (Iterator iter = toRemove.iterator(); iter.hasNext();) {
+ ChangeSet set = (ChangeSet) iter.next();
+ remove(set);
}
}
-
- private boolean isInActiveSet(IResource resource) {
+
+ private ChangeSet[] getContainingSets(IResource resource) {
+ Set sets = new HashSet();
for (Iterator iter = activeSets.iterator(); iter.hasNext();) {
ChangeSet set = (ChangeSet) iter.next();
if (set.contains(resource)) {
- return true;
+ sets.add(set);
}
}
- return false;
- }
-
- private void resourcesChanged(final ChangeSet set, final IResource[] files) {
- Object[] listeners = getListeners();
- for (int i = 0; i < listeners.length; i++) {
- final IChangeSetChangeListener listener = (IChangeSetChangeListener) listeners[i];
- Platform.run(new ISafeRunnable() {
- public void handleException(Throwable exception) {
- // Exceptions are logged by the platform
- }
- public void run() throws Exception {
- listener.resourcesChanged(set, files);
- }
- });
- }
+ return (ChangeSet[]) sets.toArray(new ChangeSet[sets.size()]);
}
}
@@ -256,25 +256,6 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
return true;
}
- /*
- * Callback that is invoked from a ChangeSet when a resource
- * has been added to the set. The add may have been done by
- * a third party (i.e. not the manager) so make sure the
- * resource does not exist in other sets.
- */
- /* package */ void resourceAdded(final ChangeSet set, IResource resource) {
- resourceChanged(set, resource);
- if (isSingleSetPerResource()) {
- // Remove the added files from any other set that contains them
- for (Iterator iter = activeSets.iterator(); iter.hasNext();) {
- ChangeSet otherSet = (ChangeSet) iter.next();
- if (otherSet != set) {
- otherSet.remove(resource);
- }
- }
- }
- }
-
/**
* Create a commit set with the given title and files. The created
* set is not added to the control of the commit set manager
@@ -294,6 +275,26 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
}
/**
+ * Create a change set containing the given files if
+ * they have been modified locally.
+ * @param title the title of the commit set
+ * @param files the files contained in the set
+ * @return the created set
+ * @throws TeamException
+ */
+ public ChangeSet createSet(String title, IFile[] files) throws TeamException {
+ List infos = new ArrayList();
+ for (int i = 0; i < files.length; i++) {
+ IFile file = files[i];
+ SyncInfo info = getSyncInfo(file);
+ if (info != null) {
+ infos.add(info);
+ }
+ }
+ return createSet(title, (SyncInfo[]) infos.toArray(new SyncInfo[infos.size()]));
+ }
+
+ /**
* Add the set to the list of active sets.
* @param set the set to be added
*/
@@ -379,6 +380,10 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
* @param set the set which is to become the default set
*/
public void makeDefault(ChangeSet set) {
+ // The default set must be an active set
+ if (!contains(set)) {
+ add(set);
+ }
final ChangeSet oldSet = defaultSet;
defaultSet = set;
Object[] listeners = getListeners();
@@ -414,16 +419,16 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
}
/**
- * Return whether the resource is modified locally w.r.t.
- * the subscriber.
+ * Return the sync info for the given resource obtained
+ * from the subscriber.
* @param resource the resource
- * @return whether the resource is modified locally
+ * @return the sync info for the resource
* @throws TeamException
*/
- protected boolean isModified(IResource resource) throws TeamException {
+ protected SyncInfo getSyncInfo(IResource resource) throws TeamException {
Subscriber subscriber = getSubscriber();
SyncInfo info = subscriber.getSyncInfo(resource);
- return isModified(info);
+ return info;
}
protected boolean isModified(SyncInfo info) {
@@ -525,7 +530,7 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
* @see org.eclipse.team.core.synchronize.ISyncInfoSetChangeListener#syncInfoSetReset(org.eclipse.team.core.synchronize.SyncInfoSet, org.eclipse.core.runtime.IProgressMonitor)
*/
public void syncInfoSetReset(SyncInfoSet set, IProgressMonitor monitor) {
- handleSyncSetChange(set, set.getSyncInfos());
+ handleSyncSetChange(set, set.getSyncInfos(), set.getResources());
}
/* (non-Javadoc)
@@ -533,7 +538,23 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
*/
public void syncInfoChanged(ISyncInfoSetChangeEvent event, IProgressMonitor monitor) {
SyncInfoSet set = event.getSet();
- handleSyncSetChange(set, event.getAddedResources());
+ handleSyncSetChange(set, event.getAddedResources(), getAllResources(event));
+ }
+
+ private IResource[] getAllResources(ISyncInfoSetChangeEvent event) {
+ Set allResources = new HashSet();
+ SyncInfo[] addedResources = event.getAddedResources();
+ for (int i = 0; i < addedResources.length; i++) {
+ SyncInfo info = addedResources[i];
+ allResources.add(info.getLocal());
+ }
+ SyncInfo[] changedResources = event.getChangedResources();
+ for (int i = 0; i < changedResources.length; i++) {
+ SyncInfo info = changedResources[i];
+ allResources.add(info.getLocal());
+ }
+ allResources.addAll(Arrays.asList(event.getRemovedResources()));
+ return (IResource[]) allResources.toArray(new IResource[allResources.size()]);
}
private void handleAddedResources(ChangeSet set, SyncInfo[] infos) {
@@ -552,14 +573,34 @@ public class SubscriberChangeSetManager extends SubscriberResourceCollector impl
}
}
- private void handleSyncSetChange(SyncInfoSet set, SyncInfo[] addedInfos) {
+ private void handleSyncSetChange(SyncInfoSet set, SyncInfo[] addedInfos, IResource[] allAffectedResources) {
ChangeSet changeSet = getChangeSet(set);
if (set.isEmpty() && changeSet != null) {
remove(changeSet);
}
+ fireResourcesChangedEvent(changeSet, allAffectedResources);
handleAddedResources(changeSet, addedInfos);
}
+ /**
+ * @param changeSet
+ * @param allAffectedResources
+ */
+ private void fireResourcesChangedEvent(final ChangeSet changeSet, final IResource[] allAffectedResources) {
+ Object[] listeners = getListeners();
+ for (int i = 0; i < listeners.length; i++) {
+ final IChangeSetChangeListener listener = (IChangeSetChangeListener)listeners[i];
+ Platform.run(new ISafeRunnable() {
+ public void handleException(Throwable exception) {
+ // Exceptions are logged by the platform
+ }
+ public void run() throws Exception {
+ listener.resourcesChanged(changeSet, allAffectedResources);
+ }
+ });
+ }
+ }
+
private ChangeSet getChangeSet(SyncInfoSet set) {
for (Iterator iter = activeSets.iterator(); iter.hasNext();) {
ChangeSet changeSet = (ChangeSet) iter.next();
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java
index 0bfc7c93a..e3c32433d 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CVSParticipantLabelDecorator.java
@@ -17,7 +17,7 @@ import org.eclipse.jface.util.PropertyChangeEvent;
import org.eclipse.jface.viewers.*;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.*;
-import org.eclipse.team.core.change.ChangeSet;
+import org.eclipse.team.core.subscribers.ChangeSet;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.internal.ccvs.core.*;
import org.eclipse.team.internal.ccvs.core.resources.CVSWorkspaceRoot;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java
index d5a07a8ed..2626ac7ef 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelProvider.java
@@ -29,8 +29,7 @@ import org.eclipse.jface.viewers.*;
import org.eclipse.swt.custom.BusyIndicator;
import org.eclipse.swt.widgets.Control;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.change.ChangeSet;
-import org.eclipse.team.core.change.IChangeSetChangeListener;
+import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.core.subscribers.Subscriber;
import org.eclipse.team.core.synchronize.*;
import org.eclipse.team.core.synchronize.FastSyncInfoFilter.*;
@@ -161,7 +160,7 @@ public class ChangeLogModelProvider extends CompositeModelProvider implements IC
public void run() {
try {
IResource[] resources = Utils.getResources(getSelectedDiffElements());
- ChangeSet set = CommitSetManager.getInstance().createSet(Policy.bind("ChangeLogModelProvider.1"), null); //$NON-NLS-1$
+ ChangeSet set = CommitSetManager.getInstance().createSet(Policy.bind("ChangeLogModelProvider.1"), new SyncInfo[0]); //$NON-NLS-1$
CommitSetDialog dialog = new CommitSetDialog(getConfiguration().getSite().getShell(), set, resources,
Policy.bind("ChangeLogModelProvider.2"), Policy.bind("ChangeLogModelProvider.3")); //$NON-NLS-1$ //$NON-NLS-2$
dialog.open();
@@ -593,8 +592,6 @@ public class ChangeLogModelProvider extends CompositeModelProvider implements IC
}
};
private static final ChangeLogModelProviderDescriptor descriptor = new ChangeLogModelProviderDescriptor();
-
- private ChangeSet defaultSet;
public ChangeLogModelProvider(ISynchronizePageConfiguration configuration, SyncInfoSet set, String id) {
super(configuration, set);
@@ -1380,15 +1377,16 @@ public class ChangeLogModelProvider extends CompositeModelProvider implements IC
/* (non-Javadoc)
* @see org.eclipse.team.core.change.IChangeSetChangeListener#defaultSetChanged(org.eclipse.team.core.change.ChangeSet)
*/
- public void defaultSetChanged(ChangeSet set) {
- if (defaultSet != null) {
- refreshNode(getDiffNodeFor(defaultSet));
+ public void defaultSetChanged(ChangeSet oldDefault, ChangeSet set) {
+ if (oldDefault != null) {
+ refreshNode(getDiffNodeFor(oldDefault));
}
- defaultSet = set;
- if (defaultSet != null) {
- refreshNode(getDiffNodeFor(defaultSet));
+ if (set != null) {
+ refreshNode(getDiffNodeFor(set));
}
}
+
+
/* (non-Javadoc)
* @see org.eclipse.team.core.change.IChangeSetChangeListener#resourcesChanged(org.eclipse.team.core.change.ChangeSet, org.eclipse.core.resources.IResource[])
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelSorter.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelSorter.java
index a54c6816a..a50da08b6 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelSorter.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/ChangeLogModelSorter.java
@@ -12,7 +12,7 @@ package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.jface.viewers.Viewer;
import org.eclipse.jface.viewers.ViewerSorter;
-import org.eclipse.team.core.change.ChangeSet;
+import org.eclipse.team.core.subscribers.ChangeSet;
import org.eclipse.team.internal.ccvs.core.ILogEntry;
import org.eclipse.team.ui.synchronize.ISynchronizeModelElement;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java
index 62b5ca838..612e32136 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDialog.java
@@ -20,7 +20,7 @@ import org.eclipse.swt.events.*;
import org.eclipse.swt.layout.GridData;
import org.eclipse.swt.layout.GridLayout;
import org.eclipse.swt.widgets.*;
-import org.eclipse.team.core.change.ChangeSet;
+import org.eclipse.team.core.subscribers.ChangeSet;
import org.eclipse.team.internal.ccvs.ui.*;
import org.eclipse.ui.help.WorkbenchHelp;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDiffNode.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDiffNode.java
index d50674215..554106326 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDiffNode.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetDiffNode.java
@@ -12,7 +12,7 @@ package org.eclipse.team.internal.ccvs.ui.subscriber;
import org.eclipse.core.resources.IResource;
import org.eclipse.jface.resource.ImageDescriptor;
-import org.eclipse.team.core.change.ChangeSet;
+import org.eclipse.team.core.subscribers.ChangeSet;
import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin;
import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants;
import org.eclipse.team.internal.ui.synchronize.SynchronizeModelElement;
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetManager.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetManager.java
index c0117d228..5cb074ce2 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetManager.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/CommitSetManager.java
@@ -10,7 +10,7 @@
*******************************************************************************/
package org.eclipse.team.internal.ccvs.ui.subscriber;
-import org.eclipse.team.core.change.SubscriberChangeSetManager;
+import org.eclipse.team.core.subscribers.SubscriberChangeSetManager;
import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin;
/**
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java
index 59539ae98..7ad106c4b 100644
--- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java
+++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/subscriber/WorkspaceCommitOperation.java
@@ -22,7 +22,7 @@ import org.eclipse.jface.dialogs.IDialogConstants;
import org.eclipse.jface.dialogs.MessageDialog;
import org.eclipse.swt.widgets.Shell;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.change.ChangeSet;
+import org.eclipse.team.core.subscribers.ChangeSet;
import org.eclipse.team.core.synchronize.SyncInfo;
import org.eclipse.team.core.synchronize.SyncInfoSet;
import org.eclipse.team.internal.ccvs.core.*;
diff --git a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java
index 09af1d649..56229f5f1 100644
--- a/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java
+++ b/tests/org.eclipse.team.tests.cvs.core/src/org/eclipse/team/tests/ccvs/ui/CommitSetTests.java
@@ -20,7 +20,7 @@ import org.eclipse.core.resources.*;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.swt.widgets.Display;
import org.eclipse.team.core.TeamException;
-import org.eclipse.team.core.change.*;
+import org.eclipse.team.core.subscribers.*;
import org.eclipse.team.internal.ccvs.core.CVSException;
import org.eclipse.team.internal.ccvs.ui.subscriber.CommitSetManager;
import org.eclipse.team.tests.ccvs.core.EclipseTest;
@@ -43,7 +43,7 @@ public class CommitSetTests extends EclipseTest {
// TODO Auto-generated method stub
}
- public void defaultSetChanged(ChangeSet set) {
+ public void defaultSetChanged(ChangeSet oldDefault, ChangeSet set) {
// TODO Auto-generated method stub
}

Back to the top