Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community ForumsHow can I set multiple root to treeviewer using emf adapterfactoryContentProvider
https://www.eclipse.org/forums/index.php/mv/msg/364976/889615/#msg_889615
I want to set multiple roots for my treeviewer.
My program uses AdapterFactoryContentProvider as the tree viewer content provider but I was using single root.
Now when I wanted to add multiple root I knew that I should use ArrayContentProvider
is there something like this in EMF or I should adapt all previous code to the jface ArrayContentProvider ?
Thanks]]>becks m2012-06-19T12:11:14-00:00Re: How can I set multiple root to treeviewer using emf adapterfactoryContentProvider
https://www.eclipse.org/forums/index.php/mv/msg/364976/889643/#msg_889643
that as input to the view. In the constructor you can specify the
collection of objects you want as roots displayed in the tree view.
On 19/06/2012 8:11 AM, becks m wrote:
> Hi guys,
>
> I want to set multiple roots for my treeviewer.
>
> My program uses AdapterFactoryContentProvider as the tree viewer
> content provider but I was using single root.
>
> Now when I wanted to add multiple root I knew that I should use
> ArrayContentProvider
>
> is there something like this in EMF I should adapt all previous code
> to the jface ArrayContentProvider ?
>
>
>
> Thanks]]>Ed Merks2012-06-19T12:41:27-00:00Re: How can I set multiple root to treeviewer using emf adapterfactoryContentProvider
https://www.eclipse.org/forums/index.php/mv/msg/364976/889655/#msg_889655
Ed Merks wrote on Tue, 19 June 2012 08:41
You can create an org.eclipse.emf.edit.provider.ItemProvider and use
that as input to the view. In the constructor you can specify the
collection of objects you want as roots displayed in the tree view.
On 19/06/2012 8:11 AM, becks m wrote:
> Hi guys,
>
> I want to set multiple roots for my treeviewer.
>
> My program uses AdapterFactoryContentProvider as the tree viewer
> content provider but I was using single root.
>
> Now when I wanted to add multiple root I knew that I should use
> ArrayContentProvider
>
> is there something like this in EMF I should adapt all previous code
> to the jface ArrayContentProvider ?
>
>
>
> Thanks
Thanks Ed,
I already have org.eclipse.emf.edit.provider.ItemProvider created for all my classes and that was used by adapterfactorycontentprovider.
In which constructor you mean ? can you please clarify this point .
Thanks,
becks]]>becks m2012-06-19T12:56:12-00:00Re: How can I set multiple root to treeviewer using emf adapterfactoryContentProvider
https://www.eclipse.org/forums/index.php/mv/msg/364976/889683/#msg_889683
your generated item providers, with ItemProvider? I'm pretty sure
ItemProvider(Collection) will provide what you need.
On 19/06/2012 8:56 AM, becks m wrote:
> Ed Merks wrote on Tue, 19 June 2012 08:41
>> You can create an org.eclipse.emf.edit.provider.ItemProvider and use
>> that as input to the view. In the constructor you can specify the
>> collection of objects you want as roots displayed in the tree view.
>>
>> On 19/06/2012 8:11 AM, becks m wrote:
>> > Hi guys,
>> >
>> > I want to set multiple roots for my treeviewer.
>> >
>> > My program uses AdapterFactoryContentProvider as the tree viewer >
>> content provider but I was using single root.
>> >
>> > Now when I wanted to add multiple root I knew that I should use >
>> ArrayContentProvider
>> >
>> > is there something like this in EMF I should adapt all previous
>> code > to the jface ArrayContentProvider ?
>> >
>> >
>> >
>> > Thanks
>
>
>
>
> Thanks Ed,
> I already have org.eclipse.emf.edit.provider.ItemProvider created for
> all my classes and that was used by adapterfactorycontentprovider.
>
>
> In which constructor you mean ? can you please clarify this point .
>
>
> Thanks,
> becks]]>Ed Merks2012-06-19T13:22:30-00:00Re: How can I set multiple root to treeviewer using emf adapterfactoryContentProvider
https://www.eclipse.org/forums/index.php/mv/msg/364976/889702/#msg_889702
Now, I got your point, and I'll give it a try and get back if there is something else