Refactory: remove unused classes, imports, fields and methods.
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / JavaModelOperation.java
index 89a9a40..0803cd0 100644 (file)
@@ -10,7 +10,7 @@
  *******************************************************************************/
 package net.sourceforge.phpdt.internal.core;
 
-import java.io.InputStream;
+//import java.io.InputStream;
 import java.util.ArrayList;
 import java.util.HashMap;
 
@@ -27,7 +27,7 @@ import net.sourceforge.phpdt.internal.core.util.PerThreadObject;
 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;
@@ -188,17 +188,17 @@ public abstract class JavaModelOperation implements IWorkspaceRunnable,
        /**
         * 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.
@@ -309,18 +309,18 @@ public abstract class JavaModelOperation implements IWorkspaceRunnable,
        /**
         * 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
@@ -414,14 +414,14 @@ public abstract class JavaModelOperation implements IWorkspaceRunnable,
        /*
         * 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
@@ -578,16 +578,16 @@ public abstract class JavaModelOperation implements IWorkspaceRunnable,
         * 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
@@ -774,14 +774,14 @@ public abstract class JavaModelOperation implements IWorkspaceRunnable,
         * 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