1 11 package org.eclipse.team.internal.ccvs.ui.mappings; 12 13 import org.eclipse.core.resources.mapping.*; 14 import org.eclipse.team.core.mapping.ISynchronizationScope; 15 import org.eclipse.team.internal.core.subscribers.ChangeSet; 16 import org.eclipse.team.internal.ui.mapping.DiffTreeChangesSection.ITraversalFactory; 17 import org.eclipse.team.ui.mapping.SynchronizationCompareAdapter; 18 import org.eclipse.ui.IMemento; 19 20 public class ChangeSetCompareAdapter extends SynchronizationCompareAdapter implements ITraversalFactory { 21 22 public void save(ResourceMapping[] mappings, IMemento memento) { 23 } 25 26 public ResourceMapping[] restore(IMemento memento) { 27 return new ResourceMapping[0]; 29 } 30 31 public ResourceTraversal[] getTraversals(ISynchronizationScope scope) { 32 return scope.getTraversals(ModelProvider.RESOURCE_MODEL_PROVIDER_ID); 33 } 34 35 public String getName(ResourceMapping mapping) { 36 Object modelObject = mapping.getModelObject(); 37 if (modelObject instanceof ChangeSet) { 38 ChangeSet changeSet = (ChangeSet) modelObject; 39 return changeSet.getName(); 40 } 41 return super.getName(mapping); 42 } 43 44 } 45 | Popular Tags |