Michael K
Michael K

Reputation: 1180

Open another editor from the eclipse search view

I have a file which can be edited using two different editors.

In eclipses' project explorer you can open a file in a different editor from the context menu.

How can I open a search result (shown in the Search view) in a different editor?

As I am developing an own plug-in, a way to extend the Search view's context menu would be a valid solution as well.

Upvotes: 0

Views: 127

Answers (1)

greg-449
greg-449

Reputation: 111216

I don' think there is a way to get the search view to use a different editor.

You can contribute to the search view using the org.eclipse.ui.menus extension point. The view id is org.eclipse.search.ui.views.SearchView so something like:

<extension
     point="org.eclipse.ui.menus">
 <menuContribution
        allPopups="false"
        locationURI="popup:org.eclipse.search.ui.views.SearchView">
     <command
           commandId="my.command.id"
           label="Test Search View Contrib"
           style="push">
     </command>
  </menuContribution>

Upvotes: 1

Related Questions