Mike
Mike

Reputation: 51

A tutorial on adding search to an Eclipse RCP program

Could some one point me to a tutorial on how to work with the Eclipse search plug-in with custom views in an Eclipse RCP program. I have tried searching google for one, but I have found to have the word "search" in your search phrase you might as well not have it there.

I have tried the phrase "Eclipse RCP search" "Eclipse RCP search tutorial" "Eclipse RCP search plug-in" and none of my results are about the search plug-in (maybe a suggested search phrase if one can not suggest a good tutorial)

Upvotes: 5

Views: 3741

Answers (4)

Christian
Christian

Reputation: 456

The short answer is that you need 5 classes to implement following interfaces:

  • ISearchQuery
  • ISearchResult
  • SearchResultEvent
  • ISearchPage
  • ISearchResultPage

Furthermore the last 2 implementations need to be registered as extension points:

  • org.eclipse.search.searchPages
  • org.eclipse.search.searchResultViewPages

For a detailed tutorial how to glue this stuff together read this article

Upvotes: 0

Tom Seidel
Tom Seidel

Reputation: 9535

Implementing your custom search is not that hard. The best is to look into other plugins to see how they implemented the search. To get you started I recommed the Task-Search from Mylyn - very easy to adopt.

Just donwload the sources from Mylyn and look at the bundle

org.eclipse.mylyn.tasks.search

HTH Tom

Upvotes: 1

Prakash G. R.
Prakash G. R.

Reputation: 4892

As far as I know there isn't a good article about search in Eclipse.

Also see this and this bugs

Upvotes: 0

Katona
Katona

Reputation: 4901

You may start here: http://wiki.eclipse.org/FAQ_How_do_I_write_a_Search_dialog%3F It is not strictly related to RCP development, but I think it applies to that also.

Upvotes: 0

Related Questions