*******************************************************************************/
package net.sourceforge.phpdt.internal.core;
-import java.io.InputStream;
+//import java.io.InputStream;
import java.util.ArrayList;
import java.util.HashMap;
import net.sourceforge.phpdt.internal.core.util.Util;
import org.eclipse.core.resources.IContainer;
-import org.eclipse.core.resources.IFile;
+//import org.eclipse.core.resources.IFile;
import org.eclipse.core.resources.IFolder;
import org.eclipse.core.resources.IResource;
import org.eclipse.core.resources.IResourceStatus;
/**
* Common constructor for all Java Model operations.
*/
- protected JavaModelOperation(IJavaElement element) {
- fElementsToProcess = new IJavaElement[] { element };
- }
+// protected JavaModelOperation(IJavaElement element) {
+// fElementsToProcess = new IJavaElement[] { element };
+// }
/**
* A common constructor for all Java Model operations.
*/
- protected JavaModelOperation(IJavaElement element, boolean force) {
- fElementsToProcess = new IJavaElement[] { element };
- this.force = force;
- }
+// protected JavaModelOperation(IJavaElement element, boolean force) {
+// fElementsToProcess = new IJavaElement[] { element };
+// this.force = force;
+// }
/*
* Registers the given action at the end of the list of actions to run.
/**
* Convenience method to create a file
*/
- protected void createFile(IContainer folder, String name,
- InputStream contents, boolean force) throws JavaModelException {
- IFile file = folder.getFile(new Path(name));
- try {
- file.create(contents, force ? IResource.FORCE
- | IResource.KEEP_HISTORY : IResource.KEEP_HISTORY,
- getSubProgressMonitor(1));
- this.setAttribute(HAS_MODIFIED_RESOURCE_ATTR, TRUE);
- } catch (CoreException e) {
- throw new JavaModelException(e);
- }
- }
+// protected void createFile(IContainer folder, String name,
+// InputStream contents, boolean force) throws JavaModelException {
+// IFile file = folder.getFile(new Path(name));
+// try {
+// file.create(contents, force ? IResource.FORCE
+// | IResource.KEEP_HISTORY : IResource.KEEP_HISTORY,
+// getSubProgressMonitor(1));
+// this.setAttribute(HAS_MODIFIED_RESOURCE_ATTR, TRUE);
+// } catch (CoreException e) {
+// throw new JavaModelException(e);
+// }
+// }
/**
* Convenience method to create a folder
/*
* Returns whether the given path is equals to one of the given other paths.
*/
- protected boolean equalsOneOf(IPath path, IPath[] otherPaths) {
- for (int i = 0, length = otherPaths.length; i < length; i++) {
- if (path.equals(otherPaths[i])) {
- return true;
- }
- }
- return false;
- }
+// protected boolean equalsOneOf(IPath path, IPath[] otherPaths) {
+// for (int i = 0, length = otherPaths.length; i < length; i++) {
+// if (path.equals(otherPaths[i])) {
+// return true;
+// }
+// }
+// return false;
+// }
/**
* Verifies the operation can proceed and executes the operation. Subclasses
* Returns the parent elements to which this operation applies, or
* <code>null</code> if not applicable.
*/
- protected IJavaElement[] getParentElements() {
- return fParentElements;
- }
+// protected IJavaElement[] getParentElements() {
+// return fParentElements;
+// }
/**
* Returns the elements created by this operation.
*/
- public IJavaElement[] getResultElements() {
- return resultElements;
- }
+// public IJavaElement[] getResultElements() {
+// return resultElements;
+// }
/*
* Returns the scheduling rule for this operation (i.e. the resource that
* Returns whether the given path is the prefix of one of the given other
* paths.
*/
- protected boolean prefixesOneOf(IPath path, IPath[] otherPaths) {
- for (int i = 0, length = otherPaths.length; i < length; i++) {
- if (path.isPrefixOf(otherPaths[i])) {
- return true;
- }
- }
- return false;
- }
+// protected boolean prefixesOneOf(IPath path, IPath[] otherPaths) {
+// for (int i = 0, length = otherPaths.length; i < length; i++) {
+// if (path.isPrefixOf(otherPaths[i])) {
+// return true;
+// }
+// }
+// return false;
+// }
/*
* Pushes the given operation on the stack of operations currently running