Start line:  
End line:  

Snippet Preview

Snippet HTML Code

Stack Overflow Questions
Copyright (c) 2000, 2010 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.jdt.internal.core;
Discards a working copy (decrement its use count and remove its working copy info if the use count is 0) and signal its removal through a delta.
		super(new IJavaElement[] {workingCopy});
	}
	protected void executeOperation() throws JavaModelException {
		CompilationUnit workingCopy = getWorkingCopy();
		JavaModelManager manager = JavaModelManager.getJavaModelManager();
		int useCount = manager.discardPerWorkingCopyInfo(workingCopy);
		if (useCount == 0) {
			IJavaProject javaProject = workingCopy.getJavaProject();
				manager.removePerProjectInfo((JavaProjectjavaProjecttrue /* remove external jar files indexes and timestamps*/);
				manager.containerRemove(javaProject);
			}
			if (!workingCopy.isPrimary()) {
				// report removed java delta for a non-primary working copy
				delta.removed(workingCopy);
				addDelta(delta);
				removeReconcileDelta(workingCopy);
else {
				if (workingCopy.getResource().isAccessible()) {
					// report a F_PRIMARY_WORKING_COPY change delta for a primary working copy
					addDelta(delta);
else {
					// report a REMOVED delta
					addDelta(delta);
				}
			}
		}
	}
Returns the working copy this operation is working on.
	}
	public boolean isReadOnly() {
		return true;
	}
New to GrepCode? Check out our FAQ X