Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2005 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.io.*;
	public WorkspaceFileDiffOperation(IWorkbenchPart partResourceMapping[] mappingsLocalOption[] optionsFile fileboolean isMultiPatchboolean includeFullPathInformationIPath patchRoot) {
		super(partmappingsoptionsfileisMultiPatchincludeFullPathInformationpatchRoot);
	}
	protected void copyFile() throws CVSException {
		IWorkspaceRoot root =ResourcesPlugin.getWorkspace().getRoot();
		IFile finalFile = root.getFileForLocation(new Path(this..getPath()));
		InputStream fileInputStream = null;
		try {
			fileInputStream = new BufferedInputStream(new FileInputStream());
			if(!finalFile.exists()) {
				finalFile.create(fileInputStream. , null);
else {
				finalFile.setContents(fileInputStream.null);
			}	
catch (FileNotFoundException e) {
			throw CVSException.wrapException(e); 
catch (CoreException e) {
			throw CVSException.wrapException(e); 
		}
		finally{
			if (fileInputStream != null) {
				try {
					fileInputStream.close();
catch (IOException e) {
					// Ignore
finally {					
					if ( != null)
				}
			}
	    }
	}
New to GrepCode? Check out our FAQ X