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.86, Tue Mar 31 14:17:29 2009 UTC revision 1.87, Tue Mar 31 15:02:58 2009 UTC
# Line 1106  Line 1106 
1106                                          converter.buildCommentsTable(compilationUnit, comments);                                          converter.buildCommentsTable(compilationUnit, comments);
1107                                  }                                  }
1108                                  compilationUnit.setLineEndTable(recordedParsingInformation.lineEnds);                                  compilationUnit.setLineEndTable(recordedParsingInformation.lineEnds);
1109                                    if (nodes != null) {
1110                                            // source has no syntax error or the statement recovery is enabled
1111                                  TypeDeclaration typeDeclaration = converter.convert(nodes);                                  TypeDeclaration typeDeclaration = converter.convert(nodes);
1112                                  typeDeclaration.setSourceRange(this.sourceOffset, this.sourceOffset + this.sourceLength);                                  typeDeclaration.setSourceRange(this.sourceOffset, this.sourceOffset + this.sourceLength);
1113                                  rootNodeToCompilationUnit(typeDeclaration.getAST(), compilationUnit, typeDeclaration, codeSnippetParsingUtil.recordedParsingInformation, null);                                  rootNodeToCompilationUnit(typeDeclaration.getAST(), compilationUnit, typeDeclaration, codeSnippetParsingUtil.recordedParsingInformation, null);
1114                                  ast.setDefaultNodeFlag(0);                                  ast.setDefaultNodeFlag(0);
1115                                  ast.setOriginalModificationCount(ast.modificationCount());                                  ast.setOriginalModificationCount(ast.modificationCount());
1116                                  return typeDeclaration;                                  return typeDeclaration;
1117                                    } else {
1118                                            // source has syntax error and the statement recovery is disabled
1119                                            CategorizedProblem[] problems = recordedParsingInformation.problems;
1120                                            if (problems != null) {
1121                                                    compilationUnit.setProblems(problems);
1122                                            }
1123                                            ast.setDefaultNodeFlag(0);
1124                                            ast.setOriginalModificationCount(ast.modificationCount());
1125                                            return compilationUnit;
1126                                    }
1127                  }                  }
1128                  throw new IllegalStateException();                  throw new IllegalStateException();
1129          }          }

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