Temporarily add structural features to existent metamodel [message #526285] |
Fri, 09 April 2010 13:42 |
Eclipse User |
|
|
|
Originally posted by: formatzeh.gmx.de
Hi NG,
I'm wondering if it is possible to add temporarily new structural
features to an existing metamodel. Consider the Ecore metamodel itself:
the feature eSuperTypes returns all super classes of a class. Imagine
that I want a feature eSubTypes to return all subclasses currently
existent in the workspace. That means I can't modify the metamodel
itself. Is it possible anyhow to specify the implementation of the
getter of such a new feature and a call to
someInstantiatedEClass.eGet(eSubTypes) returns the values computed by
the delivered implementation? I mean what Ed described here
http://ed-merks.blogspot.com/2008/01/creating-children-you-d idnt-know.html
goes a little bit in the same direction, isn't it? The original editor
knows EClasses of another metamodel. For my case I'm asking if it is
possible to just temporarily add some features to be accessible? The
features might be some kind of derived features, i.e. they aren't
editable or settable. Maybe I can create an extension of EReference for
example and integrate it? For my case those features needn't to be
serialized, just for querying some implicit information contained in a
model. How can I realize this? What do you think is the best and most
generic approach?
best regards,
Gilbert
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.04127 seconds