1) Fixed issue #705: Take the global 'Undo history size' to overwrite the default...
[phpeclipse.git] / net.sourceforge.phpeclipse / src / net / sourceforge / phpdt / internal / compiler / SourceElementParser.java
index c120843..74b4c09 100644 (file)
@@ -132,19 +132,19 @@ public class SourceElementParser extends CommentRecorderParser {// extends
         * @deprecated use SourceElementParser(ISourceElementRequestor,
         *             IProblemFactory, CompilerOptions)
         */
-       public SourceElementParser(final ISourceElementRequestor requestor,
-                       IProblemFactory problemFactory) {
-               this(requestor, problemFactory, new CompilerOptions());
-       }
+//     public SourceElementParser(final ISourceElementRequestor requestor,
+//                     IProblemFactory problemFactory) {
+//             this(requestor, problemFactory, new CompilerOptions());
+//     }
 
-       public SourceElementParser(final ISourceElementRequestor requestor,
-                       IProblemFactory problemFactory, CompilerOptions options,
-                       boolean reportLocalDeclarations) {
-               this(requestor, problemFactory, options);
-               if (reportLocalDeclarations) {
-                       this.localDeclarationVisitor = new LocalDeclarationVisitor();
-               }
-       }
+//     public SourceElementParser(final ISourceElementRequestor requestor,
+//                     IProblemFactory problemFactory, CompilerOptions options,
+//                     boolean reportLocalDeclarations) {
+//             this(requestor, problemFactory, options);
+//             if (reportLocalDeclarations) {
+//                     this.localDeclarationVisitor = new LocalDeclarationVisitor();
+//             }
+//     }
 
        // public void checkAnnotation() {
        // int firstCommentIndex = scanner.commentPtr;
@@ -1005,7 +1005,7 @@ public class SourceElementParser extends CommentRecorderParser {// extends
                        if (isInterface) {
                                if (isInRange) {
                                        int modifiers = typeDeclaration.modifiers;
-                                       boolean deprecated = false; // (modifiers & AccDeprecated)
+                                       //boolean deprecated = false; // (modifiers & AccDeprecated)
                                                                                                // != 0; //
                                        // remember deprecation so as to not lose
                                        // it below
@@ -1132,36 +1132,36 @@ public class SourceElementParser extends CommentRecorderParser {// extends
                }
        }
 
-       public void parseCompilationUnit(ICompilationUnit unit, int start, int end) {
-               // boolean needReferenceInfo) {
-
-               // reportReferenceInfo = needReferenceInfo;
-               // boolean old = diet;
-               // if (needReferenceInfo) {
-               // unknownRefs = new NameReference[10];
-               // unknownRefsCounter = 0;
-               // }
-
-               try {
-                       // diet = true;
-                       CompilationResult compilationUnitResult = new CompilationResult(
-                                       unit, 0, 0, 10); // this.options.maxProblemsPerUnit);
-                       CompilationUnitDeclaration parsedUnit = parse(unit,
-                                       compilationUnitResult, start, end);
-                       // if (scanner.recordLineSeparator) {
-                       // requestor.acceptLineSeparatorPositions(scanner.getLineEnds());
-                       // }
-                       // if (this.localDeclarationVisitor != null || needReferenceInfo){
-                       // diet = false;
-                       // this.getMethodBodies(parsedUnit);
-                       // }
-                       // this.scanner.resetTo(start, end);
-                       // notifySourceElementRequestor(parsedUnit);
-               } catch (AbortCompilation e) {
-               } finally {
-                       // diet = old;
-               }
-       }
+//     public void parseCompilationUnit(ICompilationUnit unit, int start, int end) {
+//             // boolean needReferenceInfo) {
+//
+//             // reportReferenceInfo = needReferenceInfo;
+//             // boolean old = diet;
+//             // if (needReferenceInfo) {
+//             // unknownRefs = new NameReference[10];
+//             // unknownRefsCounter = 0;
+//             // }
+//
+//             try {
+//                     // diet = true;
+////                   CompilationResult compilationUnitResult = new CompilationResult(
+////                                   unit, 0, 0, 10); // this.options.maxProblemsPerUnit);
+////                   CompilationUnitDeclaration parsedUnit = parse(unit,
+////                                   compilationUnitResult, start, end);
+//                     // if (scanner.recordLineSeparator) {
+//                     // requestor.acceptLineSeparatorPositions(scanner.getLineEnds());
+//                     // }
+//                     // if (this.localDeclarationVisitor != null || needReferenceInfo){
+//                     // diet = false;
+//                     // this.getMethodBodies(parsedUnit);
+//                     // }
+//                     // this.scanner.resetTo(start, end);
+//                     // notifySourceElementRequestor(parsedUnit);
+//             } catch (AbortCompilation e) {
+//             } finally {
+//                     // diet = old;
+//             }
+//     }
 
        public CompilationUnitDeclaration parseCompilationUnit(
                        ICompilationUnit unit, boolean fullParse) {
@@ -1199,41 +1199,41 @@ public class SourceElementParser extends CommentRecorderParser {// extends
                return null;
        }
 
-       public CompilationUnitDeclaration parseCompletionUnit(
-                       ICompilationUnit unit, boolean fullParse) {
-
-               // boolean old = diet;
-               // if (fullParse) {
-               // unknownRefs = new NameReference[10];
-               // unknownRefsCounter = 0;
-               // }
-
-               try {
-                       // diet = true;
-                       this.reportReferenceInfo = fullParse;
-                       CompilationResult compilationUnitResult = new CompilationResult(
-                                       unit, 0, 0, this.options.maxProblemsPerUnit);
-                       CompilationUnitDeclaration parsedUnit = parse(unit,
-                                       compilationUnitResult, false);
-                       // if (scanner.recordLineSeparator) {
-                       // requestor.acceptLineSeparatorPositions(scanner.getLineEnds());
-                       // }
-                       // int initialStart = this.scanner.initialPosition;
-                       // int initialEnd = this.scanner.eofPosition;
-                       // // if (this.localDeclarationVisitor != null || fullParse){
-                       // // diet = false;
-                       // // this.getMethodBodies(parsedUnit);
-                       // // }
-                       // this.scanner.resetTo(initialStart, initialEnd);
-                       // notifySourceElementRequestor(parsedUnit);
-                       return parsedUnit;
-               } catch (AbortCompilation e) {
-                       // ignore this exception
-               } finally {
-                       // diet = old;
-               }
-               return null;
-       }
+//     public CompilationUnitDeclaration parseCompletionUnit(
+//                     ICompilationUnit unit, boolean fullParse) {
+//
+//             // boolean old = diet;
+//             // if (fullParse) {
+//             // unknownRefs = new NameReference[10];
+//             // unknownRefsCounter = 0;
+//             // }
+//
+//             try {
+//                     // diet = true;
+//                     this.reportReferenceInfo = fullParse;
+//                     CompilationResult compilationUnitResult = new CompilationResult(
+//                                     unit, 0, 0, this.options.maxProblemsPerUnit);
+//                     CompilationUnitDeclaration parsedUnit = parse(unit,
+//                                     compilationUnitResult, false);
+//                     // if (scanner.recordLineSeparator) {
+//                     // requestor.acceptLineSeparatorPositions(scanner.getLineEnds());
+//                     // }
+//                     // int initialStart = this.scanner.initialPosition;
+//                     // int initialEnd = this.scanner.eofPosition;
+//                     // // if (this.localDeclarationVisitor != null || fullParse){
+//                     // // diet = false;
+//                     // // this.getMethodBodies(parsedUnit);
+//                     // // }
+//                     // this.scanner.resetTo(initialStart, initialEnd);
+//                     // notifySourceElementRequestor(parsedUnit);
+//                     return parsedUnit;
+//             } catch (AbortCompilation e) {
+//                     // ignore this exception
+//             } finally {
+//                     // diet = old;
+//             }
+//             return null;
+//     }
 
        // public void parseTypeMemberDeclarations(
        // ISourceType sourceType,
@@ -1376,18 +1376,18 @@ public class SourceElementParser extends CommentRecorderParser {// extends
                return CharOperation.concatWith(type.getTypeName(), '.');
        }
 
-       public void addUnknownRef(NameReference nameRef) {
-               if (this.unknownRefs.length == this.unknownRefsCounter) {
-                       // resize
-                       System
-                                       .arraycopy(
-                                                       this.unknownRefs,
-                                                       0,
-                                                       (this.unknownRefs = new NameReference[this.unknownRefsCounter * 2]),
-                                                       0, this.unknownRefsCounter);
-               }
-               this.unknownRefs[this.unknownRefsCounter++] = nameRef;
-       }
+//     public void addUnknownRef(NameReference nameRef) {
+//             if (this.unknownRefs.length == this.unknownRefsCounter) {
+//                     // resize
+//                     System
+//                                     .arraycopy(
+//                                                     this.unknownRefs,
+//                                                     0,
+//                                                     (this.unknownRefs = new NameReference[this.unknownRefsCounter * 2]),
+//                                                     0, this.unknownRefsCounter);
+//             }
+//             this.unknownRefs[this.unknownRefsCounter++] = nameRef;
+//     }
 
        private void visitIfNeeded(AbstractMethodDeclaration method) {
                if (this.localDeclarationVisitor != null