Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » How to open a view from a plugin
How to open a view from a plugin [message #289663] Tue, 09 August 2005 17:15 Go to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous messageGo to next message
Eclipse UserFriend
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 Go to previous message
Eclipse UserFriend
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
Previous Topic:FileDialog in OS x
Next Topic:Eclipse Startup Sequence and Software Auto Updates
Goto Forum:
  


Current Time: Tue Sep 24 08:13:12 GMT 2024

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

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

Back to the top