Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » [CommonNavigator] double-click problem
[CommonNavigator] double-click problem [message #463830] Fri, 16 February 2007 10:32 Go to next message
Peter Maas is currently offline Peter MaasFriend
Messages: 47
Registered: July 2009
Member
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
double-click works.

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.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Re: [CommonNavigator] double-click problem [message #556106 is a reply to message #463830] Mon, 30 August 2010 19:32 Go to previous messageGo to next message
Rikard Herlitz is currently offline Rikard HerlitzFriend
Messages: 1
Registered: August 2010
Junior Member
Did you ever find a solution to this? I'm having exactly the same problem...
Re: [CommonNavigator] double-click problem [message #556431 is a reply to message #463830] Wed, 01 September 2010 10:33 Go to previous messageGo to next message
Christophe Fondacci is currently offline Christophe FondacciFriend
Messages: 95
Registered: July 2009
Location: Paris
Member
Hello Peter,

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 :
actionBars.setGlobalActionHandler(ICommonActionConstants.OPEN,openAction)


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.

Christophe.
http://www.nextep-softwares.com
Re: [CommonNavigator] double-click problem [message #1320909 is a reply to message #463830] Tue, 29 April 2014 02:33 Go to previous message
kingsun wang is currently offline kingsun wangFriend
Messages: 1
Registered: April 2014
Junior Member
Please implements the method in the EditorPart: setFocus

eg:
public void setFocus() {

		someComposite.setFocus();
}
Previous Topic:Restriction on org.eclipse.ui.internal.* classes
Next Topic:how can i add a view will be docked in another view at first time run application
Goto Forum:
  


Current Time: Tue Mar 19 05:31:26 GMT 2024

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

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

Back to the top