Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Implements my own search
Implements my own search [message #668149] Wed, 04 May 2011 07:11 Go to next message
arthurembo Simo is currently offline arthurembo SimoFriend
Messages: 16
Registered: May 2011
Location: Germany
Junior Member
Hi all,

I am new in RCP and need help to implement my own search. I have a big xml file and want to do some search in my tool(RCP). So I have an extension point to org.eclipse.search. That means I become per default a search dialog with the default page 'File Search'. Now I create an own class:

public class SearchPage extends DialogPage implements ISearchPage


This page content 2 TreeViewer to drag and drop. The right treeviewer contains the node to search.

When I press the button 'search', the method perfomAction() is called. Into this method, I search the nodes in the xml files. I become as output or result a set of nodes and I can display that on the console.

Now I want to adapt this to the search mechanism of eclipse, that means I want to open my result (set of nodes) in the search result view. I see that, man need a SearchQuery, SearchResult etc.., but I don't understand how this classes work or how I can adapt my result(set of nodes) to this.

Best regards

Re: Implements my own search [message #668225 is a reply to message #668149] Wed, 04 May 2011 15:01 Go to previous messageGo to next message
Dani Megert is currently offline Dani MegertFriend
Messages: 3802
Registered: July 2009
Senior Member
On 04.05.2011 09:11, arthurembo wrote:
> Hi all,
>
> I am new in RCP and need help to implement my own search. I have a big
> xml file and want to do some search in my tool(RCP). So I have an
> extension point to org.eclipse.search. That means I become per default
> a search dialog with the default page 'File Search'. Now I create an
> own class:
>
> public class SearchPage extends DialogPage implements ISearchPage
>
> This page content 2 TreeViewer to drag and drop. The right treeviewer
> contains the node to search.
> When I press the button 'search', the method perfomAction() is called.
> Into this method, I search the nodes in the xml files. I become as
> output or result a set of nodes and I can display that on the console.
>
> Now I want to adapt this to the search mechanism of eclipse, that
> means I want to open my result (set of nodes) in the search result
> view. I see that, man need a SearchQuery, SearchResult etc.., but I
> don't understand how this classes work or how I can adapt my
> result(set of nodes) to this.
Take a look at how File or Java search is done.

Dani
>
> Best regards
>
>
Re: Implements my own search [message #668358 is a reply to message #668225] Thu, 05 May 2011 11:52 Go to previous message
arthurembo Simo is currently offline arthurembo SimoFriend
Messages: 16
Registered: May 2011
Location: Germany
Junior Member
I see,
ok but I choose another simple solution. I used the Search Dialog and added a Page to this. But for the result view, I create an own simple view with a tree viewer, that I give my result as input data and it works. I don't need really more.

Thanks
Previous Topic:Command Handler + KeyBinding = Freezing
Next Topic:No extra console
Goto Forum:
  


Current Time: Tue Apr 16 12:16:20 GMT 2024

Powered by FUDForum. Page generated in 1.34888 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top