1 11 package org.eclipse.team.internal.ccvs.ui.actions; 12 13 import java.lang.reflect.InvocationTargetException ; 14 15 import org.eclipse.jface.action.IAction; 16 import org.eclipse.team.internal.ccvs.core.CVSProviderPlugin; 17 import org.eclipse.team.internal.ccvs.core.client.Command; 18 import org.eclipse.team.internal.ccvs.ui.CVSUIPlugin; 19 import org.eclipse.team.internal.ccvs.ui.ICVSUIConstants; 20 import org.eclipse.team.internal.ccvs.ui.mappings.ModelUpdateOperation; 21 import org.eclipse.team.internal.ccvs.ui.operations.UpdateOperation; 22 23 28 public class UpdateSilentAction extends WorkspaceTraversalAction { 29 30 33 protected boolean isEnabledForAddedResources() { 34 return false; 35 } 36 37 40 protected boolean isEnabledForNonExistantResources() { 41 return true; 42 } 43 44 47 public void execute(IAction action) throws InterruptedException , InvocationTargetException { 48 if (CVSUIPlugin.getPlugin().getPreferenceStore().getString(ICVSUIConstants.PREF_UPDATE_HANDLING).equals(ICVSUIConstants.PREF_UPDATE_HANDLING_TRADITIONAL)) { 49 new UpdateOperation(getTargetPart(), getCVSResourceMappings(), Command.NO_LOCAL_OPTIONS, null ).run(); 50 } else { 51 new ModelUpdateOperation(getTargetPart(), getSelectedResourceMappings(CVSProviderPlugin.getTypeId())).run(); 52 } 53 } 54 55 58 public String getId() { 59 return ICVSUIConstants.CMD_UPDATE; 60 } 61 } 62 | Popular Tags |