Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Plugin Development Environment (PDE) » View's manipulation
View's manipulation [message #894230] Sat, 07 July 2012 22:13 Go to next message
Cristina Murillo is currently offline Cristina MurilloFriend
Messages: 25
Registered: December 2011
Junior Member

I would like to know if there is a way to hide/show a view in a customized perspective.

Based on parameters selected by the user, I need to show a different view and hide the one that I will not need.

Thank you,
Re: View's manipulation [message #894446 is a reply to message #894230] Mon, 09 July 2012 09:31 Go to previous message
Alexander Haag is currently offline Alexander HaagFriend
Messages: 116
Registered: July 2009
Senior Member
Hi Christina,

you can always show /hide views using the active Page (IWorkbenchpage)

To get it your application must be up and running.
After getting the activePage you just need to call showView() or hideView() using the ViewId (see code below). The same will work for editors using corresponding methods.

Hope this helps

private IWorkbenchPage getActivePage()
IWorkbench workbench = PlatformUI.getWorkbench();
IWorkbenchWindow window = workbench.getActiveWorkbenchWindow();
if (window != null)
   return window.getActivePage();
return null;

Previous Topic:Compare with
Next Topic:PDE doesn't find source code when debugging
Goto Forum:

Current Time: Tue Nov 13 02:14:04 GMT 2018

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

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

Back to the top