Sebastian,
Comments below.
Sebastian Höcht wrote:
Hi,
this is my first newsgroup entry, and im very new to EMF, so maybe my
question is inaccurate.
We'll let it go this time and then hold you to a higher standard. :-P
I'm trying to get a full list of all models types of our application
with all their properties.
Like doing EPackage.getEClassifiers and for each EClass, calling
getEAllStructurals or getEStructuralFeatures depending on whether you
want inherited ones or not.
But there are different kind of properties. Some can be edited in an
Editor, and some are just invisible.
Generally we try to ensure that by default all changeable features are
editable either directly in the tree view (containment references) or
via the properties view (all other references and all attributes).
I've heard of a property called
"PropertyType" which defines if a property of a model can be edited in
an Editor or not.
This information is available on the GenFeature that decorates each
EStructuralFeature. The information is not generally available at
runtime...
But i neither know where i can find this, nor how i
can get the value of the PropertyType. Maybe there is something in the
EClassifier?
No, it's only available in the GenModel (the *.genmodel) not in the
Ecore model (the *.ecore).
I already figured out, how to get a full list of all model types
(EClass). Then i use myEClass.getEAllStructuralFeatures(); But i only
want to get all features, that are editable in an editor.
Perhaps you should be doing this using the item providers. E.g.,
adapterFactoryContentProvider.getPropertySource(someInstance) and from
that you can get all the property descriptors.
I wonder what problem you're trying to solve. I might have a better
answer based on knowing the purpose...
I appreciate any suggestions.