IActionDelegate reuse [message #437043] |
Wed, 21 September 2005 05:38 |
Eclipse User |
|
|
|
Originally posted by: welldamn.gmail.com
There may be some questions here that are silly, primarily because I'm not as familiar as I should be. Please assist with whatever information you can provide.
I've created context menus for a view by defining the extension in the plugin.xml file and have created the action classes which implement IActionDelegate. However, some of the actions within the context menu will be duplicated on the toolbar within the view.
1. Can I define the view toolbar actions within the plugin.xml file also or must it be done programmatically? (maybe this is the easy fix)
2. If I do it programmatically, how can I reuse the classes that implement IActionDelegate (that I've already created for the context menus defined within plugin.xml) with the actions defined in the view for use with the view's toolbar?
thanks.
|
|
|
Re: IActionDelegate reuse [message #437131 is a reply to message #437043] |
Thu, 22 September 2005 08:33 |
Eclipse User |
|
|
|
Originally posted by: fleque.users.nospam.sf.net
Hello Thomas,
Damon Thomas wrote:
> There may be some questions here that are silly, primarily because I'm not as familiar as I should be. Please assist with whatever information you can provide.
>
> I've created context menus for a view by defining the extension in the plugin.xml file and have created the action classes which implement IActionDelegate. However, some of the actions within the context menu will be duplicated on the toolbar within the view.
>
> 1. Can I define the view toolbar actions within the plugin.xml file also or must it be done programmatically? (maybe this is the easy fix)
Have a look at extension-point "org.eclipse.ui.viewActions" it might do
what you want.
> 2. If I do it programmatically, how can I reuse the classes that implement IActionDelegate (that I've already created for the context menus defined within plugin.xml) with the actions defined in the view for use with the view's toolbar?
>
You could always reuse your actions as long as they do not require
certain things that are not existent/reachable/whatever in any usecase.
Note however that viewActions have to implement IViewActionDelegate not
IActionDelegate
Regards Alex
|
|
|
Powered by
FUDForum. Page generated in 0.03177 seconds