Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 357614 - AST does not contain "parts" for a handler with syntax error
Summary: AST does not contain "parts" for a handler with syntax error
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P1 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-09-14 06:38 EDT by Xiao Bin Chen CLA
Modified: 2017-02-23 14:15 EST (History)
2 users (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.