* @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;
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
}
}
- 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) {
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,
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