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 Murillo
Messages: 25
Registered: December 2011
Junior Member
Hi,

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,
Cristina
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 Haag
Messages: 114
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
Alex


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: Fri Oct 24 07:17:38 GMT 2014

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

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