How to maximize and restore viewstack programatically? [message #548019] |
Tue, 20 July 2010 13:02 |
Vijay Raj Messages: 608 Registered: July 2009 |
Senior Member |
|
|
Hi,
I need a way to restore minimized view stacks on startup,
i tried
page.setPartState(reference,IWorkbenchPage.STATE_RESTORED);
but this only pops up the view then n there like a fast view,
How to restor it as it is in the perpective?
This is a working solution which i got but since all the code is Discouraged access, hence i can not use it
IWorkbenchPartReference reference = page.getReference(findView);
org.eclipse.ui.internal.Perspective persp = ((WorkbenchPage) page) .getActivePerspective();
FastViewManager fvMgr = persp.getFastViewManager();
String idForRef = fvMgr.getIdForRef((IViewReference) reference);
LayoutPart part = persp.getPresentation().findPart( idForRef, null);
if (part instanceof ContainerPlaceholder) {
ViewStack stack = (ViewStack) ((ContainerPlaceholder) part) .getRealContainer();
stack.setMinimized(false);
}
Can any body provide any other solution or is this the solution??
---------------------
why, mr. Anderson, why, why do you persist?
Because I Choose To.
Regards,
Vijay
|
|
|
Powered by
FUDForum. Page generated in 0.04937 seconds