[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Newsgroup Home]
|
[news.eclipse.tools.emf] How to create a prefix like fXxx or _xxx for fields in generated models?
|
Hi,
is there a way to specify a prefix or the name for the field generated?
Example (using emfatic syntax):
class MyClass {
attr int fooBar;
}
I want to specify the name of the fooBar
field to be _fooBar or fFooBar. Instead of
protected int fooBar = FOO_BAR_EDEFAULT;
I want
protected int _fooBar = FOO_BAR_EDEFAULT;
or
protected int fFooBar = FOO_BAR_EDEFAULT;
or
protected int fooBar_ = FOO_BAR_EDEFAULT;
Is thre a magic annotation like the @GenModel(documentation="my doc")
(https://bugs.eclipse.org/bugs/show_bug.cgi?id=152481#c1)?
class MyClass {
@GenModel(filedName="fFooBar") // would be nice :-)
attr int fooBar;
}
Why? Because often without the escape it is all to easy
to accidentally assign to the fooBar variable in "@generated NO"
methods.
Another option I would like is to make members private to the
class.....
Michael
--
Michael Scharf
Wind River Systems GmbH
http://www.WindRiver.com
http://MichaelScharf.blogspot.com/