Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » Actions observing selections
Actions observing selections [message #462966] Fri, 02 February 2007 15:49 Go to next message
Daniel Krügler is currently offline Daniel KrüglerFriend
Messages: 853
Registered: July 2009
Senior Member
Hello,

I have the following problem: I have an ext.pt.-declared
IViewActionDelegate (concretely: "org.eclipse.ui.popupMenus"),
which works besides one issue: Regrettably the actual action title
depends on the current selection. This is no problem once
the contributing plug-in is already active, when the selection
takes place. The problem is: The first selection in this view
does not necessarily activate that plug-in, so at this place
only the static ext. point caption is presented. This cannot
be reasonably set to the correct title without analysis of
this selection. This can also not be done by the view itself,
because it also is generically written.

Now its clear, that the action representative created by
the menu framework does have to react on selections (it allows
prefiltering possibilities, which are ext.pt. declared). There
exists name filters, but regrettably the name filter does not
have the action as argument, so that I could change its title.

Does there exists any similar approach, where I can reliably
register a selection observer configurable by the
"org.eclipse.ui.popupMenus" viewer contribution point?

I actually would hate to need to register the corresponding
plug-in as StartUp plugin. It would be sufficient, if it would be
activated when the first selection in the corresponding viewer
takes place. Since this viewer is in its own plug-in and must
not depend on the other plug-in I hope it is possible to reach
the wanted effect with a special option of the
"org.eclipse.ui.popupMenus" ext. pt.

Any ideas welcome!

Greetings from Bremen,

Daniel Krügler
Re: Actions observing selections [message #462975 is a reply to message #462966] Fri, 02 February 2007 18:55 Go to previous message
Snjezana Peco is currently offline Snjezana PecoFriend
Messages: 789
Registered: July 2009
Senior Member
Try to activate your plugin using:
Platform.getBundle("your.plugin.id").start();
during your first selection.

Snjeza

Daniel Krügler wrote:
> Hello,
>
> I have the following problem: I have an ext.pt.-declared
> IViewActionDelegate (concretely: "org.eclipse.ui.popupMenus"),
> which works besides one issue: Regrettably the actual action title
> depends on the current selection. This is no problem once
> the contributing plug-in is already active, when the selection
> takes place. The problem is: The first selection in this view
> does not necessarily activate that plug-in, so at this place
> only the static ext. point caption is presented. This cannot
> be reasonably set to the correct title without analysis of
> this selection. This can also not be done by the view itself,
> because it also is generically written.
>
> Now its clear, that the action representative created by
> the menu framework does have to react on selections (it allows
> prefiltering possibilities, which are ext.pt. declared). There
> exists name filters, but regrettably the name filter does not
> have the action as argument, so that I could change its title.
>
> Does there exists any similar approach, where I can reliably
> register a selection observer configurable by the
> "org.eclipse.ui.popupMenus" viewer contribution point?
>
> I actually would hate to need to register the corresponding
> plug-in as StartUp plugin. It would be sufficient, if it would be
> activated when the first selection in the corresponding viewer
> takes place. Since this viewer is in its own plug-in and must
> not depend on the other plug-in I hope it is possible to reach
> the wanted effect with a special option of the
> "org.eclipse.ui.popupMenus" ext. pt.
>
> Any ideas welcome!
>
> Greetings from Bremen,
>
> Daniel Krügler
>
Previous Topic:Launching error on different PC
Next Topic:Integrate a plugin in a personal RCP Application
Goto Forum:
  


Current Time: Wed Jan 15 08:02:40 GMT 2025

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

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

Back to the top