Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » double click in common navigator
double click in common navigator [message #462250] Thu, 25 January 2007 09:02 Go to next message
Peter Maas is currently offline Peter MaasFriend
Messages: 47
Registered: July 2009
Member
I've abandoned a self written navigation class in favor of the Common Navigator.
So far I have implemented content and context menus. The Eclipse Navigator has
a double click handler running an open action of the context menu. I can't figure
out how to implement this in CNF. Thanks in advance for any hints.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Re: double click in common navigator [message #462294 is a reply to message #462250] Thu, 25 January 2007 19:49 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
Peter,

- declare the 'navigatorContent' extension point and add the
actionProvider element
or
- extend the CommonNavigator class and override the initListeners method
(CommonNavigator isn't intended to be subclassed, but this works).

Snjeza

Peter Maas wrote:
> I've abandoned a self written navigation class in favor of the Common
> Navigator.
> So far I have implemented content and context menus. The Eclipse
> Navigator has
> a double click handler running an open action of the context menu. I
> can't figure
> out how to implement this in CNF. Thanks in advance for any hints.
>
Re: double click in common navigator [message #462303 is a reply to message #462294] Fri, 26 January 2007 08:34 Go to previous messageGo to next message
Peter Maas is currently offline Peter MaasFriend
Messages: 47
Registered: July 2009
Member
Snjezana Peco schrieb:
> - declare the 'navigatorContent' extension point and add the
> actionProvider element
> or
> - extend the CommonNavigator class and override the initListeners method
> (CommonNavigator isn't intended to be subclassed, but this works).

Thanks a lot, Snjeza.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Re: double click in common navigator [message #462317 is a reply to message #462294] Fri, 26 January 2007 16:41 Go to previous messageGo to next message
Peter Maas is currently offline Peter MaasFriend
Messages: 47
Registered: July 2009
Member
Snjezana Peco schrieb:
> - declare the 'navigatorContent' extension point and add the
> actionProvider element

In the meantime i found out that the doubleclick event in
CommonNavigator is tied to a standard open action. I tried to
change this in

public void fillActionBars(IActionBars actionBars) {
super.fillActionBars(actionBars);
actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
new MyOpenAction());
}

of my ActionProvider. But nothing happens on doubleclick. The
enablement of the ActionProvider has an "instanceof" entry with
the value java.lang.Object so I think the ActionProvider should
be enabled :)

Any ideas? Thanks in advance.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Re: double click in common navigator [message #462319 is a reply to message #462317] Fri, 26 January 2007 17:43 Go to previous messageGo to next message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
Have you bound your ActionProvider to the specific content in
navigatorContent. The Open action will be called for this content only.
If you want 'dbl-click' on some node, try to extend CommonNavigator.

Snjeza

Peter Maas wrote:
> Snjezana Peco schrieb:
>> - declare the 'navigatorContent' extension point and add the
>> actionProvider element
>
> In the meantime i found out that the doubleclick event in
> CommonNavigator is tied to a standard open action. I tried to
> change this in
>
> public void fillActionBars(IActionBars actionBars) {
> super.fillActionBars(actionBars);
> actionBars.setGlobalActionHandler(ICommonActionConstants.OPE N,
> new MyOpenAction());
> }
>
> of my ActionProvider. But nothing happens on doubleclick. The
> enablement of the ActionProvider has an "instanceof" entry with
> the value java.lang.Object so I think the ActionProvider should
> be enabled :)
>
> Any ideas? Thanks in advance.
>
Re: double click in common navigator [message #462784 is a reply to message #462319] Thu, 01 February 2007 07:46 Go to previous message
Peter Maas is currently offline Peter MaasFriend
Messages: 47
Registered: July 2009
Member
Snjezana Peco schrieb:
> Have you bound your ActionProvider to the specific content in
> navigatorContent. The Open action will be called for this content only.

Snjeza,

I followed your advice and it works now, thanks.

> If you want 'dbl-click' on some node, try to extend CommonNavigator.

The docs advise against this. But retargetting the OPEN action in
ActionProvider#fillActionBars(IActionBars) works.

--
Gruesse/Regards,

Peter Maas, Aachen
E-mail "cC5tYWFzQG1hZ21hc29mdC5kZQ==\n".decode("base64")
Previous Topic:Plugin dependency
Next Topic:[DataBinding] Documenation and Examples corresponding to 3.3M4
Goto Forum:
  


Current Time: Fri Sep 20 20:29:14 GMT 2024

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

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

Back to the top