|
Re: EMF Show model attributes as rows in a table/tree [message #664128 is a reply to message #664028] |
Thu, 07 April 2011 14:08 |
Ed Merks Messages: 33218 Registered: July 2009 |
Senior Member |
|
|
Martin,
Via the GenFeature of the GenModel you can instruct the generator (via
the Children property) to support attributes as children, so that would
be a starting point at least...
Martin Domig wrote:
> Hello
>
> I'm quite new to EMF and don't know my way around here, so sorry if
> this question has been answered before - I couldn't find it using the
> keyword search.
>
> Lets suppose I have a model class "Configuration" with ~15 attributes.
> The class also contains references to "SubConfiguration" classes, also
> ~15 attributes each.
>
> Now, I know how to use the generated edit code to create a table/tree
> viewer with ~15 columns for a table viewer: put 15 columns in a table
> viewer and implement getColumnImage() / getColumnText() in the
> respective item providers.
>
> But - a table with 15 columns is all but fun to work with. I would
> like to get a tree with 2 columns, attribute name in the first and
> value in the second column.
>
> How can I get a content provider that takes the EMF classes and
> returns its attributes as children? Do I have to write it myself or is
> there some implementation in EMF that is either ready to use or can be
> generated?
>
> Thanks!
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03943 seconds