| Summary: | [dom ast] Add a debug option to verify proper nesting of ASTNodes | ||
|---|---|---|---|
| Product: | [Eclipse Project] JDT | Reporter: | Markus Keller <markus.kell.r> |
| Component: | Core | Assignee: | Markus Keller <markus.kell.r> |
| Status: | VERIFIED FIXED | QA Contact: | |
| Severity: | enhancement | ||
| Priority: | P3 | CC: | anchakrk, jarthana, manoj.palat, markus.kell.r, srikanth_sankaran |
| Version: | 4.3 | ||
| Target Milestone: | 4.3 M7 | ||
| Hardware: | All | ||
| OS: | All | ||
| Whiteboard: | |||
|
Description
Markus Keller
I've implemented two debug options to enable this verification: # Reports bad node nesting in DOM AST org.eclipse.jdt.core/debug/dom/ast=false # Throws an exception in case of bad node nesting in DOM AST org.eclipse.jdt.core/debug/dom/ast/throw=false The first option just writes issues to the log -> suitable for daily use in main and runtime workbench The second option throws an exception when bad source ranges are found -> suitable for JUnit test runs (so that the test goes red) SourceRangeVerifier#checkChild(..) stops verification when malformed or recovered nodes are encountered. We do accept some strangeness in this case. Released to master with http://git.eclipse.org/c/jdt/eclipse.jdt.core.git/commit/?id=11bdf7ee83fa535bb4e922a4f202eec91a5eb529 Forgot to mention that I also fixed two cases of bad property ordering in AnnotationTypeMemberDeclaration and DoStatement. Verified for 4.3 M7 build I20130428-2000. Saw the following in the .options file: # Reports bad node nesting in DOM AST org.eclipse.jdt.core/debug/dom/ast=false # Throws an exception in case of bad node nesting in DOM AST org.eclipse.jdt.core/debug/dom/ast/throw=false |