diff options
Diffstat (limited to 'bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java')
-rw-r--r-- | bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java | 64 |
1 files changed, 32 insertions, 32 deletions
diff --git a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java index d84d546f2..ef808f6c5 100644 --- a/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java +++ b/bundles/org.eclipse.team.cvs.ui/src/org/eclipse/team/internal/ccvs/ui/operations/UpdateOperation.java @@ -48,17 +48,17 @@ public class UpdateOperation extends SingleCommandOperation { this(part, asResourceMappers(resources), options, tag); } - /** - * Create an UpdateOperation that will perform on update on the given resources - * using the given local option. If a tag is provided, it will be added to the - * local options using the appropriate argument (-r or -D). If the tag is <code>null</code> - * then the tag will be omitted from the local options and the tags on the local resources - * will be used. - */ - public UpdateOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, CVSTag tag) { - super(part, mappings, options); - this.tag = tag; - } + /** + * Create an UpdateOperation that will perform on update on the given resources + * using the given local option. If a tag is provided, it will be added to the + * local options using the appropriate argument (-r or -D). If the tag is <code>null</code> + * then the tag will be omitted from the local options and the tags on the local resources + * will be used. + */ + public UpdateOperation(IWorkbenchPart part, ResourceMapping[] mappings, LocalOption[] options, CVSTag tag) { + super(part, mappings, options); + this.tag = tag; + } @Override protected IStatus executeCommand( @@ -84,19 +84,19 @@ public class UpdateOperation extends SingleCommandOperation { return execute; } - @Override + @Override protected LocalOption[] getLocalOptions(boolean recurse) { - // Build the local options + // Build the local options List<LocalOption> localOptions = new ArrayList<>(); - // Use the appropriate tag options - if (tag != null) { - localOptions.add(Update.makeTagOption(tag)); - } - // Build the arguments list - localOptions.addAll(Arrays.asList(super.getLocalOptions(recurse))); - LocalOption[] commandOptions = localOptions.toArray(new LocalOption[localOptions.size()]); - return commandOptions; - } + // Use the appropriate tag options + if (tag != null) { + localOptions.add(Update.makeTagOption(tag)); + } + // Build the arguments list + localOptions.addAll(Arrays.asList(super.getLocalOptions(recurse))); + LocalOption[] commandOptions = localOptions.toArray(new LocalOption[localOptions.size()]); + return commandOptions; + } protected Update getUpdateCommand() { return Command.UPDATE; @@ -121,23 +121,23 @@ public class UpdateOperation extends SingleCommandOperation { return null; } - @Override + @Override protected boolean isReportableError(IStatus status) { - return super.isReportableError(status) - || status.getCode() == CVSStatus.UNMEGERED_BINARY_CONFLICT - || status.getCode() == CVSStatus.INVALID_LOCAL_RESOURCE_PATH - || status.getCode() == CVSStatus.RESPONSE_HANDLING_FAILURE; - } + return super.isReportableError(status) + || status.getCode() == CVSStatus.UNMEGERED_BINARY_CONFLICT + || status.getCode() == CVSStatus.INVALID_LOCAL_RESOURCE_PATH + || status.getCode() == CVSStatus.RESPONSE_HANDLING_FAILURE; + } @Override protected String getErrorMessage(IStatus[] failures, int totalOperations) { return CVSUIMessages.UpdateAction_update; } - - @Override + + @Override protected ResourceMappingContext getResourceMappingContext() { - return SubscriberResourceMappingContext.createContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber()); - } + return SubscriberResourceMappingContext.createContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber()); + } public CVSTag getTag() { return tag; |