Skip to main content



      Home
Home » Eclipse Projects » JFace » Opening A View Programatically
Opening A View Programatically [message #8924] Thu, 21 May 2009 15:39 Go to next message
Eclipse UserFriend
Hello Everyone,

I have a plugin application and want a view to be visible after the
user clicks on a button. My view class extends the ViewPart class. I
instantiated my view class in the event handling method of the button but
it never gets visible, i always have to manually open the view by going
through window,show view, other.

How can i open a view programatically?


Thanks.


Darren
Re: Opening A View Programatically [message #8966 is a reply to message #8924] Thu, 21 May 2009 17:55 Go to previous message
Eclipse UserFriend
there are two showView methods that can be reached like this:

PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActi vePage().showView

if your event handler is a IHandler then you can use HandlerUtil to get to
the methods.

--
Best Regards,

Wim Jongman
http://www.remainsoftware.com
http://www.industrial-tsi.com

"Darrren Murphy" <win1for@yahoo.com> wrote in message
news:8a031403ea0bf96aeb2d5610e6bb6d5c$1@www.eclipse.org...
> Hello Everyone,
>
> I have a plugin application and want a view to be visible after the
> user clicks on a button. My view class extends the ViewPart class. I
> instantiated my view class in the event handling method of the button but
> it never gets visible, i always have to manually open the view by going
> through window,show view, other.
> How can i open a view programatically?
>
>
> Thanks.
>
>
> Darren
>
Previous Topic:TreeViewer and SelectionProvider
Next Topic:IStructuredSelection
Goto Forum:
  


Current Time: Fri May 09 22:28:36 EDT 2025

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

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

Back to the top