Scope for C# like Attribute-Class [message #1073266] |
Wed, 24 July 2013 08:38  |
Eclipse User |
|
|
|
Hello,
I´m currently working on a grammer for a class diagram.
I wrote a Rule called Reflection:
Reflection:
'[' name=[Attribute]('('var += [ParameterName] (','var += [ParameterName])*')') ']'
;
Attribute:
visib=Visibility 'attribute' name = ID'{'
(attributes+=Variable)*
(methodes+=Abstract_Method)*
'}'
;
Because i only want those ParameterName´s who belong to a Variable in my Reflection Rule i wrote a Scope-Operator.
IScope scope_Reflection_var(Reflection refl, EReference ref)
{
ArrayList<ParameterName> params = new ArrayList<ParameterName>();
for (Variable variable : refl.getName().getAttributes())
{
params.add(variable.getParam().getName());
}
return Scopes.scopeFor(params);
}
It seems like that i´m doing something wrong, because writing the grammer i get no propsals.
Maybe somebody can tell me what i´m doing wrong!?
Thx,
Günther
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.08391 seconds