In an ActionProvider of a CommonNavigator view I have retargeted
ICommonActionConstants.OPEN to an action which opens Editors
to enable opening with double-click on the CommonViewer. This
works exactly once:
- The editor is opened and becomes the active part.
- Subsequent double-clicks don't work because clicking
in the CommonViewer area doesn't make the CommonNavigator
view become the active part again.
- If I click on the title bar of the active editor the
visual appearance doesn't change because the editor
is already active. But something happens because
now a double-click in the CommonViewer area makes the
CommonNavigator view become the active part and
What happens if I click on the title bar of an already active
editor? Visually nothing but it makes a difference. Thanks
for your advice.
Peter Maas, Aachen
Could you tell us a bit more about how you setup your open action ?
I will recall here all the steps that should normally make the OPEN action work (at least, this is what I do) :
* Implementing a CommonActionProvider extension which :
** Instantiates a new IAction in its init method : openAction
** Registers the action handler in the fillActionBars method through :
Then you need to register this action provider with your navigator :
* Add a org.eclipse.ui.navigator.navigatorContent extension of type actionProvider
* Don't forget THE ENABLEMENT : you need to define a proper enablement condition otherwise it won't work
* Create a viewerActionBinding on your viewer which includes your action provider Id
Another thing is that on your open IAction I would override the isEnabled method to add your specific checks.
Hope this helps, if not please tell us a bit more about how you register your action (code snippet), and how you configure it in the plugin.xml.