1 11 package org.eclipse.team.internal.ccvs.ui.subscriber; 12 13 import org.eclipse.core.resources.IResource; 14 import org.eclipse.jface.wizard.IWizard; 15 import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin; 16 import org.eclipse.team.internal.ccvs.ui.CVSUIMessages; 17 import org.eclipse.team.internal.ccvs.ui.wizards.CheckoutWizard; 18 import org.eclipse.team.internal.ui.synchronize.SubscriberParticipantWizard; 19 import org.eclipse.team.ui.TeamUI; 20 import org.eclipse.team.ui.synchronize.ISynchronizeParticipantDescriptor; 21 import org.eclipse.team.ui.synchronize.ISynchronizeScope; 22 import org.eclipse.team.ui.synchronize.SubscriberParticipant; 23 24 27 public class CVSSynchronizeWizard extends SubscriberParticipantWizard { 28 29 protected IResource[] getRootResources() { 30 return CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().roots(); 31 } 32 33 34 37 protected String getName() { 38 ISynchronizeParticipantDescriptor desc = TeamUI.getSynchronizeManager().getParticipantDescriptor(WorkspaceSynchronizeParticipant.ID); 39 if(desc != null) { 40 return desc.getName(); 41 } else { 42 return CVSUIMessages.CVSSynchronizeWizard_0; } 44 } 45 46 49 protected SubscriberParticipant createParticipant(ISynchronizeScope scope) { 50 IResource[] roots = scope.getRoots(); 52 if (roots == null) { 53 roots = CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber().roots(); 54 } 55 WorkspaceSynchronizeParticipant participant = (WorkspaceSynchronizeParticipant)SubscriberParticipant.getMatchingParticipant(WorkspaceSynchronizeParticipant.ID, roots); 56 if (participant == null) { 58 return new WorkspaceSynchronizeParticipant(scope); 59 } else { 60 return participant; 61 } 62 } 63 64 67 protected IWizard getImportWizard() { 68 return new CheckoutWizard(); 69 } 70 } 71 | Popular Tags |