[DataBinding] add non-model intermediary elements with ObservableListTreeContentProvider [message #648350] |
Wed, 12 January 2011 14:23 |
Eclipse User |
|
|
|
Originally posted by: matthias.koester.numberfour.eu
Hi,
I'm using ObservableListTreeContentProvider to create a tree view for an
EMF based model. Everything works fine, I especially like the EMF edit
integration. Now I want to group my object eContents based on their
feature. So currently my tree looks like:
Car
+Engine
+Tire
+Tire
Engine belongs to the feature engine and both Tire objects belong to the
tires feature. I want to display them as:
Car
+engine
+Engine
+tires
+Tire
+Tire
How can I achive sth. like that? Via a DelegatingListProperty? Does an
example exist for this use case?
Regards,
Matthias
|
|
|
|
Re: [DataBinding] add non-model intermediary elements with ObservableListTreeContentProvider [message #648507 is a reply to message #648352] |
Thu, 13 January 2011 10:12 |
Eclipse User |
|
|
|
Originally posted by: matthias.koester.numberfour.eu
Hi Tom,
Thanks for your hint, I already had a similar idea on my mind when I
wrote my post. But your example really helped, thx a lot!
Now I "just" need to hook up commands for adding and removing feature.
And copy & Paste.
Matthias
Am 12.01.11 15:49, schrieb Tom Schindl:
> You can take a look at my e4 model editor who adds such virtual nodes.
>
> There are 2 tricks I'm using to make it work:
> a) I create virtual elements named VirtualEntry who them selves simply
> wrap an IObservableList in my IObservableFactory
> b) The IObservableSet I use to create IObservableMap is not the one I
> retrieve from IObservableTreeContentProvider#getKnownElements() but
> one that is cleared from the VirtualEntry instances
>
> The code is in:
> /cvsroot/eclipse/e4/org.eclipse.e4.tools/bundles/org.eclipse .e4.tools.emf.ui
>
> Tom
>
> Am 12.01.11 15:23, schrieb Matthias Köster:
>> Hi,
>>
>> I'm using ObservableListTreeContentProvider to create a tree view for an
>> EMF based model. Everything works fine, I especially like the EMF edit
>> integration. Now I want to group my object eContents based on their
>> feature. So currently my tree looks like:
>>
>> Car
>> +Engine
>> +Tire
>> +Tire
>>
>> Engine belongs to the feature engine and both Tire objects belong to the
>> tires feature. I want to display them as:
>> Car
>> +engine
>> +Engine
>> +tires
>> +Tire
>> +Tire
>>
>> How can I achive sth. like that? Via a DelegatingListProperty? Does an
>> example exist for this use case?
>>
>> Regards,
>> Matthias
>
|
|
|
Powered by
FUDForum. Page generated in 0.04009 seconds