How to open a view from a plugin [message #289663] |
Tue, 09 August 2005 17:15 |
Eclipse User |
|
|
|
Originally posted by: kruttik.a.tcs.com
Hi,
I have two plugins - Plugin A and Plugin B.
Plugin A is a n extention to a View
Plugin B is an extention to an actionSet.
On invoking Plugin B, I want to invoke my view defined in Plugin A.
|
|
|
Re: How to open a view from a plugin [message #289667 is a reply to message #289663] |
Tue, 09 August 2005 17:51 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
From the IWorkbenchPage do showView(...).
The hard part will be getting the workbench page.
You don't invoke plugins. Plugins are simply code libraries. You invoke
classes within a library. So I presume you are invoking an
IActionDelegate implementation that is defined within Plugin B. In that
case, make your IActionDelegate actually be an implimentation of
IWorkbenchWindowActionDelegate. Then your action delegate will be called
with init(IWorkbenchWindow). Save that workbench window in your action
delegate.
Then on the run of the action delegate use:
workbenchwindow.getActivePage(). This will be the active IWorkbenchPage,
and from that page you can do the showView.
Kruttik Aggarwal wrote:
> Hi,
> I have two plugins - Plugin A and Plugin B.
>
> Plugin A is a n extention to a View
> Plugin B is an extention to an actionSet.
>
> On invoking Plugin B, I want to invoke my view defined in Plugin A.
>
>
--
Thanks,
Rich Kulp
|
|
|
Re: How to open a view from a plugin [message #289677 is a reply to message #289667] |
Tue, 09 August 2005 20:51 |
Eclipse User |
|
|
|
Originally posted by: kruttik.a.tcs.com
Hi,
Thanx for the answer.
Can u tell me one more thing.
What should i do if i want to perform the reverse function,
i.e if i wantto invoke an action through a view.
let me explain.
I have a button in my view. On click of that button i want to
invoke an action class.
Can u suggest me a way...
|
|
|
Re: How to open a view from a plugin [message #289686 is a reply to message #289677] |
Tue, 09 August 2005 21:52 |
Eclipse User |
|
|
|
Originally posted by: richkulp.us.NO_SPAM.ibm.com
Just put the code into a common class and call the class from either the
action or from your view.
Kruttik Aggarwal wrote:
> Hi,
> Thanx for the answer.
>
> Can u tell me one more thing.
> What should i do if i want to perform the reverse function,
> i.e if i wantto invoke an action through a view.
>
> let me explain.
>
> I have a button in my view. On click of that button i want to invoke an
> action class.
>
> Can u suggest me a way...
>
--
Thanks,
Rich Kulp
|
|
|
Powered by
FUDForum. Page generated in 0.03322 seconds