Home Ask Login Register

Developers Planet

Your answer is one click away!

Raj February 2016

Search some contents and update it in Eclipse search view

I have created Eclipse plugin to search some contents and update it in eclipse search view, but I am unable to do so since createControl() of ISearchResultPage is called only once in its life cycle.

I need to call it every time my search result changes so that I can erase all the previous widgets and update my search result using new widgets accordingly.


greg-449 February 2016

The createContents method is only ever called once. What you can do in your result page is use an IQueryListener to listen for changes to queries.

Add the listener in the createContents method with:


You should remove the listener in the page dispose method:


Note that the org.eclipse.search.ui.text.AbstractTextSearchViewPage does this for you, you may be able to extend that page rather than write your own complete ISearchResultPage page.

Post Status

Asked in February 2016
Viewed 1,513 times
Voted 10
Answered 1 times


Leave an answer

Quote of the day: live life