|
|
Re: how to use treeViewer getExpandedElements method [message #414850 is a reply to message #414849] |
Mon, 26 November 2007 12:00 |
Conor O'Mahony Messages: 108 Registered: July 2009 |
Senior Member |
|
|
What plugin/package is this class in? I can't find it to view the source in my current setup, and I
can't find it in org.eclipse.ui.views_3.2.100.I20070319-0010.jar
I'm using eclipse 3.2.
Ed Merks wrote:
> Conor,
>
> org.eclipse.ui.views.navigator.ResourceNavigator.restoreStat e uses it.
>
>
> Conor O'Mahony wrote:
>> Hi,
>>
>> I am using some of the EMF generated Editor code of my Model to
>> display a TreeViewer in a View. I have a filter on the TreeViewer that
>> filters the tree based on whatever the user selects in a dropdown.
>> When a user makes a particular selection in the dropdown, it may
>> result in an element being filtered out of the viewer, and what I want
>> to do is keep track of the expansion state of these elements that are
>> filtered out so that I can restore the expansion state when it gets
>> filtered back into the view.
>>
>> I have seen the Treeviewer getExpandedElements and setExpandedElements
>> methods in the TreeViewer API doc which I think will do the job,
>> however I could find any examples of their usage. I tried using them
>> within the select method of the ViewerFilter class, so that if an
>> element was being filtered out the viewer would retain a reference to
>> the expanded elements and then restore the expansion state when the
>> elements were filtered back in, but this did not work. Does anyone
>> know any examples of the correct usage of these methods or point out
>> where they should be used?
>>
>> Many thanks,
>> Conor
|
|
|
Re: how to use treeViewer getExpandedElements method [message #414851 is a reply to message #414850] |
Mon, 26 November 2007 12:06 |
Ed Merks Messages: 33140 Registered: July 2009 |
Senior Member |
|
|
Conor,
Given I've specified the fully qualified package name, that part should
be clear. It's in the org.eclipse.ui.ide plugin.
Conor O'Mahony wrote:
> What plugin/package is this class in? I can't find it to view the
> source in my current setup, and I can't find it in
> org.eclipse.ui.views_3.2.100.I20070319-0010.jar
>
> I'm using eclipse 3.2.
>
> Ed Merks wrote:
>> Conor,
>>
>> org.eclipse.ui.views.navigator.ResourceNavigator.restoreStat e uses it.
>>
>>
>> Conor O'Mahony wrote:
>>> Hi,
>>>
>>> I am using some of the EMF generated Editor code of my Model to
>>> display a TreeViewer in a View. I have a filter on the TreeViewer
>>> that filters the tree based on whatever the user selects in a
>>> dropdown. When a user makes a particular selection in the dropdown,
>>> it may result in an element being filtered out of the viewer, and
>>> what I want to do is keep track of the expansion state of these
>>> elements that are filtered out so that I can restore the expansion
>>> state when it gets filtered back into the view.
>>>
>>> I have seen the Treeviewer getExpandedElements and
>>> setExpandedElements methods in the TreeViewer API doc which I think
>>> will do the job, however I could find any examples of their usage. I
>>> tried using them within the select method of the ViewerFilter class,
>>> so that if an element was being filtered out the viewer would retain
>>> a reference to the expanded elements and then restore the expansion
>>> state when the elements were filtered back in, but this did not
>>> work. Does anyone know any examples of the correct usage of these
>>> methods or point out where they should be used?
>>>
>>> Many thanks,
>>> Conor
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.02872 seconds