Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Rich Client Platform (RCP) » How to maximize and restore viewstack programatically?
How to maximize and restore viewstack programatically? [message #548019] Tue, 20 July 2010 13:02
Vijay RajFriend
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
Previous Topic:Adding classes to startup.jar to get around JNI problems
Next Topic:disabling "new..." wizards
Goto Forum:
  


Current Time: Thu Mar 28 18:22:55 GMT 2024

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

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

Back to the top