Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » JFace » Opening A View Programatically
Opening A View Programatically [message #8924] Thu, 21 May 2009 19:39 Go to next message
Kap Pak is currently offline Kap PakFriend
Messages: 52
Registered: July 2009
Member
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 21:55 Go to previous message
Wim Jongman is currently offline Wim JongmanFriend
Messages: 493
Registered: July 2009
Senior Member

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: Thu Dec 26 15:36:26 GMT 2024

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

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

Back to the top