Constrain which values an attribute is allowed to get [message #417342] |
Wed, 05 March 2008 18:38 |
Eclipse User |
|
|
|
Originally posted by: muba_u.web.de
Hi,
I have the following problem:
I have got a Class Vocable which has an attribute 'translations" of type
EList<Vocable>. Means my Vocable itself refers to another vocables.
Because of that I only have a EList<Vocable> getVocables() and no setter.
I wanna do this.
The Class Vocable has also an attribute 'value' and 'language'.
Currently i am just supporting 2 typs of languages (lets say english and
german).
If the languae is 'german' the translations (which are vocables and thus
have also an attribute 'language') should only be 'english.
In the editor a Popup appears when I want to add translations. Can I
somehow modify that, that there only appears whose vocables which are
actually allowed to be selected?
Of could you tell me how I can basically check a value befor it is
applied to translations?
If there would be a separate set- or add-method of my
translation-attribute I might be able to do something, but since there
is no such thing I am kinda confused how I can influence that part.
Hope you can help me out.
draGy
|
|
|
|
Re: Constrain which values an attribute is allowed to get [message #417349 is a reply to message #417346] |
Wed, 05 March 2008 20:46 |
Eclipse User |
|
|
|
Originally posted by: muba_u.web.de
Yeah I just saw, that the "Customizing Pulldown-property" might be quite
the same as my question, so I will take the answeres on that one to
figure mine out.
And well, yeah you basically could have an infinite recursion, but its
not like that there will ever be an iteration like: go to one vocable
and then to its translations.
And its just an example anyway. Won't be a application or anything, but
just an example I thought of for using EMF on my paper.
|
|
|
Powered by
FUDForum. Page generated in 0.02717 seconds