removed action for line delimiter conversion; this is provided by IDE now
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / core / CompilationUnit.java
index a17cf19..4d7be34 100644 (file)
@@ -1,10 +1,10 @@
 /*******************************************************************************
  * Copyright (c) 2000, 2003 IBM Corporation and others.
- * All rights reserved. This program and the accompanying materials 
+ * All rights reserved. This program and the accompanying materials
  * are made available under the terms of the Common Public License v1.0
  * which accompanies this distribution, and is available at
  * http://www.eclipse.org/legal/cpl-v10.html
- * 
+ *
  * Contributors:
  *     IBM Corporation - initial API and implementation
  *******************************************************************************/
@@ -17,7 +17,6 @@ import java.util.Map;
 import net.sourceforge.phpdt.core.IBuffer;
 import net.sourceforge.phpdt.core.IBufferFactory;
 import net.sourceforge.phpdt.core.ICodeAssist;
-import net.sourceforge.phpdt.core.ICodeCompletionRequestor;
 import net.sourceforge.phpdt.core.ICompilationUnit;
 import net.sourceforge.phpdt.core.IImportContainer;
 import net.sourceforge.phpdt.core.IImportDeclaration;
@@ -66,7 +65,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
   public WorkingCopyOwner owner;
   /**
    * Constructs a handle to a compilation unit with the given name in the specified package for the specified owner
-   * 
+   *
    * @exception IllegalArgumentException
    *              if the name of the compilation unit does not end with ".java"
    */
@@ -79,7 +78,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
    * Accepts the given visitor onto the parsed tree of this compilation unit, after having runned the name resolution. The visitor's
    * corresponding <code>visit</code> method is called with the corresponding parse tree. If the visitor returns <code>true</code>,
    * this method visits this parse node's members.
-   * 
+   *
    * @param visitor
    *          the visitor
    * @exception JavaModelException
@@ -165,7 +164,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
     if (underlyingResource == null) {
       underlyingResource = getResource();
     }
-    
+
     SourceElementParser parser = new SourceElementParser(requestor, problemFactory,
         new CompilerOptions(options));
     //, true/*report local declarations*/);
@@ -349,7 +348,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
 
   /**
    * Returns true if this handle represents the same Java element as the given handle.
-   * 
+   *
    * @see Object#equals(java.lang.Object)
    */
   public boolean equals(Object obj) {
@@ -549,7 +548,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
 
   /**
    * A compilation unit has a corresponding resource unless it is contained in a jar.
-   * 
+   *
    * @see IJavaElement#getCorrespondingResource()
    */
   public IResource getCorrespondingResource() throws JavaModelException {
@@ -643,7 +642,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
        }
 
   }
+
   /**
    * @see net.sourceforge.phpdt.internal.compiler.env.ICompilationUnit#getMainTypeName()
    */
@@ -810,17 +809,17 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
   // */
   //public IJavaElement getSharedWorkingCopy(IProgressMonitor pm, IBufferFactory factory, IProblemRequestor problemRequestor)
   // throws JavaModelException {
-  //   
+  //
   //   // if factory is null, default factory must be used
   //   if (factory == null) factory = this.getBufferManager().getDefaultBufferFactory();
   //
   //   JavaModelManager manager = JavaModelManager.getJavaModelManager();
-  //   
+  //
   //   // In order to be shared, working copies have to denote the same compilation unit
   //   // AND use the same buffer factory.
   //   // Assuming there is a little set of buffer factories, then use a 2 level Map cache.
   //   Map sharedWorkingCopies = manager.sharedWorkingCopies;
-  //   
+  //
   //   Map perFactoryWorkingCopies = (Map) sharedWorkingCopies.get(factory);
   //   if (perFactoryWorkingCopies == null){
   //           perFactoryWorkingCopies = new HashMap();
@@ -919,7 +918,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
 
   /**
    * If I am not open, return true to avoid parsing.
-   * 
+   *
    * @see IParent#hasChildren()
    */
   public boolean hasChildren() throws JavaModelException {
@@ -974,7 +973,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
   }
 
   /**
-   * 
+   *
    * @see IOpenable
    */
   public boolean isOpen() {
@@ -1050,7 +1049,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
   //public net.sourceforge.phpdt.core.dom.CompilationUnit makeConsistent(boolean createAST, int astLevel, IProgressMonitor monitor)
   // throws JavaModelException {
   //   if (isConsistent()) return null;
-  //           
+  //
   //   // create a new info and make it the current info
   //   // (this will remove the info and its children just before storing the new infos)
   //   if (createAST) {
@@ -1093,7 +1092,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
   //   BufferManager bufManager = getBufferManager();
   //   IBuffer buffer = getBufferFactory().createBuffer(this);
   //   if (buffer == null) return null;
-  //   
+  //
   //   // set the buffer source
   //   if (buffer.getCharacters() == null){
   //           IFile file = (IFile)this.getResource();
@@ -1103,10 +1102,10 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
   //
   //   // add buffer to buffer cache
   //   bufManager.addBuffer(buffer);
-  //                   
+  //
   //   // listen to buffer changes
   //   buffer.addBufferChangedListener(this);
-  //   
+  //
   //   return buffer;
   //}
   /**
@@ -1253,7 +1252,7 @@ public class CompilationUnit extends Openable implements ICompilationUnit,
    * @deprecated - use codeComplete(int, ICompletionRequestor)
    */
   //public void codeComplete(int offset, final ICodeCompletionRequestor requestor) throws JavaModelException {
-  //   
+  //
   //   if (requestor == null){
   //           codeComplete(offset, (ICompletionRequestor)null);
   //           return;