1 11 package org.eclipse.team.internal.ccvs.ui.actions; 12 13 import org.eclipse.team.internal.ccvs.core.ICVSRepositoryLocation; 14 import org.eclipse.team.internal.ccvs.core.ICVSResource; 15 import org.eclipse.team.internal.ccvs.ui.operations.ITagOperation; 16 import org.eclipse.team.internal.ccvs.ui.operations.TagInRepositoryOperation; 17 import org.eclipse.team.internal.ui.actions.TeamAction; 18 19 public class TagInRepositoryAction extends TagAction { 20 21 24 public boolean isEnabled() { 25 ICVSResource[] resources = getSelectedCVSResources(); 26 if (resources.length == 0) return false; 27 for (int i = 0; i < resources.length; i++) { 28 if (resources[i] instanceof ICVSRepositoryLocation) return false; 29 } 30 return true; 31 } 32 33 36 protected boolean needsToSaveDirtyEditors() { 37 return false; 38 } 39 40 43 protected boolean requiresLocalSyncInfo() { 44 return false; 45 } 46 47 protected ITagOperation createTagOperation() { 48 return new TagInRepositoryOperation(getTargetPart(), getSelectedRemoteResources()); 49 } 50 } 51 | Popular Tags |