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

Bug 355155

Summary: Updates needed for constructors
Product: z_Archived Reporter: Paul Harmon <pharmon>
Component: EDTAssignee: Project Inbox <edt.mofmodel-inbox>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: lasher
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Paul Harmon CLA 2011-08-18 15:28:33 EDT
Currently constructors are only allowed in external types, and the grammer does not allow you to specify public/private for the constructor.

We need the following updates to the parser/validation/mof model

1) Constructors should support the private/public modifier
2) Constructors should be supported for Handlers
3) If a constructor is specified as private, it should not be resolvable outside of the part that defines it
4) If a part defines its default constructor as private, the following should be flagged as invalid (outside of the part definition):

new Thing();
new Thing;
Comment 1 Lisa Lasher CLA 2011-08-26 18:07:12 EDT
changing to Enhancement, as this isn't really a defect.
Comment 2 Paul Harmon CLA 2011-09-16 13:28:24 EDT
I have completed all work for constructors

I have updated the binding resolution and the EGL2MofExpression to handle resolution of constructor references when inside a constructor. Additionally, I added validation to require that an constructor call can only occur as the first statement in a constructor.
Comment 3 Lisa Lasher CLA 2011-11-04 11:45:39 EDT
Closing this work item