Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 355155 - Updates needed for constructors
Summary: Updates needed for constructors
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: EDT (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-08-18 15:28 EDT by Paul Harmon CLA
Modified: 2017-02-23 14:17 EST (History)
1 user (show)

See Also:


Attachments

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