Hi,
I want to use the standard action groups from the
org.eclipse.jdt.ui.actions package. My problem is that I want to set different
selection provider (different selection) for the different actions. I noticed
that these actions use the IViewSite.getSelectionProvider() method to get the
selection provider. I can set one of the selection providers to the site, but
then all the actions will use it, and it's not what I need.
Is there a way to set different selection/selection
provider for some of the actions/action groups (RefactoringActionGroup for
example)? I tryed the ActionGroup.setContext(ActionContext) method, which
has get/setSelection methods, but it doesn't seem to do the job. The only
thing that comes to my mind is to make a 'dummy' ViewPart, which is used only to
be passed to the action groups constructors, and which returns the required
selection provider by its getSelectionProvider method, but it seems like an
unnecessary waste of resources.
Any ideas or suggestions are very much
appreciated.
TIA
Regards, Stefan
Take a moment - be
inspired.
|