Searching GEF outline page TreeViewer [message #247500] |
Mon, 23 February 2009 23:28 |
Eclipse User |
|
|
|
Hi All
Q: Searching GEF outline page TreeViewer | Selecting TreeViewer elements
programmatically
My GEF editor has an outlinePage displaying the model names as TreeViewer.
I am trying to implement a search function on these TreeViewer elements. I
have added a search action to OutlinePgae actionbar; to enable users to
search for a particular or likely name.
The process I am thinking is:
1: Get user search term [InputDialog ]
2: Read model and its children then use regular expressions to match the
names
3: create a list of search results.
4: Highlight these search results [model elements or components].
I am able to do the first 3 parts of the process, but now I struck at
highlighting [Selecting] TreeViewer model elements. As my outline page
TreeViewer, and GraphicalEditor are synchronised; I presume
programmatically sleeting a set of TreeViewer model elements will
highlight both.
Can anyone please advise me, how can I select one or more TreeViewer model
elements programmatically?
Any suggestion on better way of implementing such search or an example is
also a great help.
Thanks for your help in advance
Cheers
DJ
|
|
|
Powered by
FUDForum. Page generated in 0.03161 seconds