Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2006 IBM Corporation and others. All rights reserved. This program and the accompanying materials are made available under the terms of the Eclipse Public License v1.0 which accompanies this distribution, and is available at http://www.eclipse.org/legal/epl-v10.html Contributors: IBM Corporation - initial API and implementation /
 
 package org.eclipse.team.internal.ccvs.ui.operations;
 
 import java.util.List;
 
Operation which performs a CVS update
 
 public class UpdateOperation extends SingleCommandOperation {
 
 	private CVSTag 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 null then the tag will be omitted from the local options and the tags on the local resources will be used.
 
 	public UpdateOperation(IWorkbenchPart partIResource[] resourcesLocalOption[] optionsCVSTag tag) {
 		this(partasResourceMappers(resources), optionstag);
 	}

    
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 null then the tag will be omitted from the local options and the tags on the local resources will be used.
 
     public UpdateOperation(IWorkbenchPart partResourceMapping[] mappingsLocalOption[] optionsCVSTag tag) {
         super(partmappingsoptions);
         this. = tag;
     }
 
     /* (non-Javadoc)
 	 * @see org.eclipse.team.internal.ccvs.ui.operations.SingleCommandOperation#executeCommand(org.eclipse.team.internal.ccvs.core.client.Session, org.eclipse.team.internal.ccvs.core.CVSTeamProvider, org.eclipse.core.resources.IResource[], org.eclipse.core.runtime.IProgressMonitor)
 	 */
 	protected IStatus executeCommand(
 		Session session,
 		CVSTeamProvider provider,
 		ICVSResource[] resources,
 		boolean recurseIProgressMonitor monitor)
 			
 			LocalOption[] commandOptions = getLocalOptions(recurse);
 		
 			monitor.beginTask(null, 100);
 				session,
 				commandOptions
 				resources,
 				Policy.subMonitorFor(monitor, 95));
 			
 			updateWorkspaceSubscriber(providerresourcesrecurse, Policy.subMonitorFor(monitor, 5));
 			monitor.done();
 			return execute;
 	}
 
     protected LocalOption[] getLocalOptions(boolean recurse) {
         // Build the local options
         List localOptions = new ArrayList();
         // Use the appropriate tag options
         if ( != null) {
         	localOptions.add(Update.makeTagOption());
         }
         // Build the arguments list
         localOptions.addAll(Arrays.asList(super.getLocalOptions(recurse)));
         LocalOption[] commandOptions = (LocalOption[])localOptions.toArray(new LocalOption[localOptions.size()]);
        return commandOptions;
    }
	protected Update getUpdateCommand() {
		return .;
	}
	/* (non-Javadoc)
	 * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getTaskName()
	 */
	protected String getTaskName() {
	}
	/* (non-Javadoc)
	 * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getTaskName(org.eclipse.team.internal.ccvs.core.CVSTeamProvider)
	 */
	protected String getTaskName(CVSTeamProvider provider) {
		return NLS.bind(.new String[] { provider.getProject().getName() }); 
	}

Return the listener that is used to process E and M messages. The default is null.

Returns:
		return null;
	}
    protected boolean isReportableError(IStatus status) {
        return super.isReportableError(status)
        	|| status.getCode() == .
        	|| status.getCode() == .
        	|| status.getCode() == .;
    }
    /* (non-Javadoc)
	 * @see org.eclipse.team.internal.ccvs.ui.operations.CVSOperation#getErrorMessage(org.eclipse.core.runtime.IStatus[], int)
	 */
	protected String getErrorMessage(IStatus[] failuresint totalOperations) {
	}
    
    /* (non-Javadoc)
     * @see org.eclipse.team.internal.ccvs.ui.operations.RepositoryProviderOperation#getResourceMappingContext()
     */
        return SubscriberResourceMappingContext.createContext(CVSProviderPlugin.getPlugin().getCVSWorkspaceSubscriber());
    }
	public CVSTag getTag() {
		return ;
	}
	public void setTag(CVSTag tag) {
		this. = tag;
	}
New to GrepCode? Check out our FAQ X