| 
| Actions observing selections [message #462966] | Fri, 02 February 2007 10:49  |  | 
| Eclipse User  |  |  |  |  | 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 13:55  |  | 
| Eclipse User  |  |  |  |  | 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
 >
 |  |  |  | 
Powered by 
FUDForum. Page generated in 0.03454 seconds