org.eclipse.jdt.core/dom/org/eclipse/jdt/core/dom/ASTParser.java

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.85, Sat Mar 7 00:59:01 2009 UTC revision 1.86, Tue Mar 31 14:17:29 2009 UTC
# Line 1099  Line 1099 
1099                                          return compilationUnit;                                          return compilationUnit;
1100                                  }                                  }
1101                          case K_CLASS_BODY_DECLARATIONS :                          case K_CLASS_BODY_DECLARATIONS :
1102                                  final org.eclipse.jdt.internal.compiler.ast.ASTNode[] nodes = codeSnippetParsingUtil.parseClassBodyDeclarations(this.rawSource, this.sourceOffset, this.sourceLength, this.compilerOptions, true);                                  final org.eclipse.jdt.internal.compiler.ast.ASTNode[] nodes = codeSnippetParsingUtil.parseClassBodyDeclarations(this.rawSource, this.sourceOffset, this.sourceLength, this.compilerOptions, true, this.statementsRecovery);
1103                                  recordedParsingInformation = codeSnippetParsingUtil.recordedParsingInformation;                                  recordedParsingInformation = codeSnippetParsingUtil.recordedParsingInformation;
1104                                  comments = recordedParsingInformation.commentPositions;                                  comments = recordedParsingInformation.commentPositions;
1105                                  if (comments != null) {                                  if (comments != null) {
1106                                          converter.buildCommentsTable(compilationUnit, comments);                                          converter.buildCommentsTable(compilationUnit, comments);
1107                                  }                                  }
1108                                  compilationUnit.setLineEndTable(recordedParsingInformation.lineEnds);                                  compilationUnit.setLineEndTable(recordedParsingInformation.lineEnds);
                                 if (nodes != null) {  
1109                                          TypeDeclaration typeDeclaration = converter.convert(nodes);                                          TypeDeclaration typeDeclaration = converter.convert(nodes);
1110                                          typeDeclaration.setSourceRange(this.sourceOffset, this.sourceOffset + this.sourceLength);                                          typeDeclaration.setSourceRange(this.sourceOffset, this.sourceOffset + this.sourceLength);
1111                                          rootNodeToCompilationUnit(typeDeclaration.getAST(), compilationUnit, typeDeclaration, codeSnippetParsingUtil.recordedParsingInformation, null);                                          rootNodeToCompilationUnit(typeDeclaration.getAST(), compilationUnit, typeDeclaration, codeSnippetParsingUtil.recordedParsingInformation, null);
1112                                          ast.setDefaultNodeFlag(0);                                          ast.setDefaultNodeFlag(0);
1113                                          ast.setOriginalModificationCount(ast.modificationCount());                                          ast.setOriginalModificationCount(ast.modificationCount());
1114                                          return typeDeclaration;                                          return typeDeclaration;
                                 } else {  
                                         CategorizedProblem[] problems = recordedParsingInformation.problems;  
                                         if (problems != null) {  
                                                 compilationUnit.setProblems(problems);  
                                         }  
                                         ast.setDefaultNodeFlag(0);  
                                         ast.setOriginalModificationCount(ast.modificationCount());  
                                         return compilationUnit;  
                                 }  
1115                  }                  }
1116                  throw new IllegalStateException();                  throw new IllegalStateException();
1117          }          }

Legend:
Removed from v.1.85  
changed lines
  Added in v.1.86