Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Label and Icon for searchResultViewPage(Is it possible to change the label and icon of the eclipse Search View?)
Label and Icon for searchResultViewPage [message #1849437] Thu, 20 January 2022 04:43 Go to next message
Joseph Adriane Cabrera is currently offline Joseph Adriane CabreraFriend
Messages: 5
Registered: January 2022
Junior Member
Hello Eclipse Platform Team,
Good day.

We have implemented the searchResultViewPage that displays the results of a search.
Currently, the result view page uses the eclipse's default SearchView with the Search label and the flashlight icon.

Upon checking the documentation for the org.eclipse.search.searchResultViewPages extension point,
there are fields to change the label and icon.
Quote:

<!ELEMENT viewPage EMPTY>
<!ATTLIST viewPage
searchResultClass CDATA #REQUIRED
class CDATA #REQUIRED
id CDATA #REQUIRED
label CDATA #IMPLIED
icon CDATA #IMPLIED

helpContextId CDATA #IMPLIED>

searchResultClass - The fully qualified class name of the ISearchResult implementation this search result page supposed to show.
class - the fully qualified class name implementing this search result page. The class must implement org.eclipse.search.ui.ISearchResultPage.
id - the id, typically the same as the fully qualified class name
label - a translatable label that can be used in the search result page to list all available search result views. It is currently not used but might be in the future.
icon - an icon that can be used in the search result page in a list of all available search result views. It is currently not used but might be in the future.



However upon trying (adding the label and icon fields in the plugin.xml), our icon and label could not be seen.
It is also mentioned in the documentation that this is not yet available.

With this, it seems that there is no way to set our own label and icon for the searchResultViewPage.
Is my understanding correct?

Thank you very much.

Best regards,
Joseph
Re: Label and Icon for searchResultViewPage [message #1849464 is a reply to message #1849437] Thu, 20 January 2022 16:31 Go to previous messageGo to next message
Rolf Theunissen is currently offline Rolf TheunissenFriend
Messages: 260
Registered: April 2012
Senior Member
Hello,

The label and icon in the extension will not update the icon and label of the tab of the search view. The label can is provided with ISearchResultPage#getLabel() and show on the results page. There is no code to have an icon on the results page.

If you want to change the view, you should use the org.eclipse.ui.views extension point to make another instance of the Search View with your customizations.
Re: Label and Icon for searchResultViewPage [message #1849557 is a reply to message #1849464] Tue, 25 January 2022 09:44 Go to previous message
Joseph Adriane Cabrera is currently offline Joseph Adriane CabreraFriend
Messages: 5
Registered: January 2022
Junior Member
Hello Rolf,

Quote:
The label and icon in the extension will not update the icon and label of the tab of the search view. The label can is provided with ISearchResultPage#getLabel() and show on the results page. There is no code to have an icon on the results page.

Thank you for the confirmation.

Quote:
If you want to change the view, you should use the org.eclipse.ui.views extension point to make another instance of the Search View with your customizations.

This worked for me.
Since I could not extend my view from the SearchView, I just extended my view from the PageBookView and implemented the ISearchResultViewPart.

Thanks again :)
Previous Topic:How to install IBM Liberty Developer tools 21.0.0.10 or later in Eclipse
Next Topic:Eclipse dumps core in libglib.so on Ubuntu when left idle after start
Goto Forum:
  


Current Time: Fri Apr 26 19:04:14 GMT 2024

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

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

Back to the top