| viewing AST updates in DSL editor [message #1321796] |
Tue, 29 April 2014 10:02  |
Eclipse User |
|
|
|
I have created a DSL which allows me to create instances of myProperty and allow me to create a myDependency between two myProperty instances. Each myProperty has an attribute 'value' of type float. For more info, see 'my language description below'.
What I want to do:
if I create a dependency between two myProperties in the DSL, then I want the editor to calculate the value of the target myProperty.
What I currently do is:
I hook in using the validator (probably not the best place, I know), that is a write a validation rule in which I update the setValue operation on the applicable myProperty. The problem is that the value of that myProperty is not updated in my DSL file. Is there any way to get this done?
my language description is as follows:
Model returns Model:
{Model}
'Model'
'{'
('properties' '{' properties+=myProperty ( "," properties+=myProperty)* '}' )?
('dependencies' '{' dependencies+=myDependency ( "," dependencies+=myDependency)* '}' )?
'}';
myProperty returns myProperty:
'myProperty'
'{'
'value' value=EFloat
'}';
myDependency returns myDependency:
'myDependency'
'{'
'source' source=[myProperty|EString]
'target' target=[myProperty|EString]
'}';
EFloat returns ecore::EFloat:
'-'? INT? '.' INT (('E'|'e') '-'? INT)?;
EString returns ecore::EString:
STRING | ID;
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.06041 seconds