Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » how to add IWorkbenchWindowActionDelegate programmatically ?
how to add IWorkbenchWindowActionDelegate programmatically ? [message #437626] Fri, 30 September 2005 11:22 Go to next message
Eclipse UserFriend
Originally posted by: gkurien.icope.com

hi,

i have a IWorkbenchWindowActionDelegate that i dont intend to use thru the
plugin.xml file..
know i want to know how to add my IWorkbenchWindowActionDelegate to the
menu ?


there is one more thing i want to know ,
if i get a file instance from my menu which extends Action ..then how do i
pass the file to my required View ?

atleast is there any way to pass a file instance from a menuItem to the
required View ....pls help me on this ..i have been stuck on this problem
for some time now...
Re: how to add IWorkbenchWindowActionDelegate programmatically ? [message #437697 is a reply to message #437626] Sun, 02 October 2005 20:05 Go to previous messageGo to next message
Stefan Zugal is currently offline Stefan ZugalFriend
Messages: 59
Registered: July 2009
Member
You can add get the view by
MyPlugin.getDefault().getWorkbench().getActiveWorkbenchWindo w().getActivePage().findView(VIEW_ID);
and then send the view a message with the file.

Regards,
Stefan

> hi,
>
> i have a IWorkbenchWindowActionDelegate that i dont intend to use thru
> the plugin.xml file..
> know i want to know how to add my IWorkbenchWindowActionDelegate to the
> menu ?
>
>
> there is one more thing i want to know ,
> if i get a file instance from my menu which extends Action ..then how do
> i pass the file to my required View ?
>
> atleast is there any way to pass a file instance from a menuItem to the
> required View ....pls help me on this ..i have been stuck on this
> problem for some time now...
>
>
Re: how to add IWorkbenchWindowActionDelegate programmatically ? [message #437701 is a reply to message #437697] Mon, 03 October 2005 04:22 Go to previous messageGo to next message
Eclipse UserFriend
Originally posted by: gkurien.icope.com

thanx but i still dint get how to add a IWorkbenchWindowActionDelegate
programmatically to a menuManager ?
Re: how to add IWorkbenchWindowActionDelegate programmatically ? [message #437801 is a reply to message #437701] Wed, 05 October 2005 05:47 Go to previous message
Eclipse UserFriend
Originally posted by: welldamn.gmail.com

For the actions you've defined that are going to be added to the menuManager, simply instantiate with a new object you've created, e.g:

Action action = new YourNewObject();

"YourNewObject" will extend Action and implement IWorkbenchWindowActionDelegate.
Previous Topic:Feature basics..
Next Topic:make eclipse more verbose?
Goto Forum:
  


Current Time: Sun Dec 08 09:39:58 GMT 2024

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

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

Back to the top