Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 357614

Summary: AST does not contain "parts" for a handler with syntax error
Product: z_Archived Reporter: Xiao Bin Chen <xiaobinc>
Component: EDTAssignee: Project Inbox <edt.compiler-inbox>
Status: CLOSED FIXED QA Contact:
Severity: normal    
Priority: P1 CC: chenzhh, pharmon
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Xiao Bin Chen CLA 2011-09-14 06:38:36 EDT
Build Identifier: 

1>new a ruihandler
2>set a breakpoint at EGLDocument.reconcile() 
before 
fireModelReconciled(report);

3>edit the file and check the "fileRootNode"(a File instance) 's partsList filed value


4>the value is null

Reproducible: Always
Comment 1 Tony Chen CLA 2011-09-18 09:51:08 EDT
Paul, I'm assigning this defect to Compiler. When working copy compiler get AST for below handler code, the AST does not contain "part". The code has error, the stereotype is not input yet, however, ErrorCorrectingParser is expected to correct it and produce an AST tree with a Handler in it. 

This error makes it impossible to give content assist when user press ctrl+space after the keyword type. 

package tony;
handler h1 type       
	name string;
end  



It seemed only happen to handler, record and programs (as below code shows) can get a correct AST tree even if its missing stereotype. 

package tony;
record myrecord type     
    itemName string;
end

package tony;
program p1 type             
	variableName string;
	
	function main ()
	end
end
Comment 2 Paul Harmon CLA 2011-11-15 12:33:54 EST
I was (finally) able to fix this by updating org.eclipse.edt.compiler.core.ast.ParseTable

This class contains a "registry" for certain node types. I had to add the new HandlerContent nodes to this registry.

I have updated the documentation on the parser maintenance (in the RBD wiki) so future updates to the parser will hopefully not run into this same problem
Comment 3 Xiao Bin Chen CLA 2011-11-17 22:26:28 EST
verified in 0.7.0.v201111172101.