Details
-
Type:
New Feature
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 2.5.1Release
-
Fix Version/s: None
-
Component/s: DSL Support
-
Labels:None
-
Number of attachments :
Description
It's possible to define method and property contributions but not constructors. It would be great if the DSLD spec supported this feature, needed by AST transformations like @Immutable, @Tuppleconstructors and @Canonical
Issue Links
- is duplicated by
-
GRECLIPSE-1556
Support constructor definitions in DSLD syntax
-
I'm not ignoring this issue. I have given this problem quite a bit of thought and it is not as easy as it would seem. There is a difference between adding constructor calls and adding method calls as content assist proposals.
For method calls, the scope is well defined. Whenever there is a method call, the declaring type of the method call is already known and so we simply need to ask "what extra methods are added to this type?"
With constructors, it is different, since constructors are not attached to a declaring type, whenever there is a content assist invocation on something that might be a constructor call, we need to ask "which constructors are available here (regardless of the current type)?"
Although not impossible to implement, it does require a very different mechanism for registering and searching for constructor contributions.