WorkbenchWindow wbw = (WorkbenchWindow) getPage().getWorkbenchWindow();
if (wbw == null || wbw.getShell() == null)
return;
ITrimManager tbm = wbw.getTrimManager();
Perspective perspective = getPage().getActivePerspective();
FastViewManager fvm = perspective.getFastViewManager();
ILayoutContainer root = getContainer();
// We go up one more level when maximizing an editor stack
// so that we 'zoom' the editor area
boolean restoringEditorArea = false;
if (root instanceof EditorSashContainer) {
root = ((EditorSashContainer) root).getContainer();
restoringEditorArea = true;
}
// This is a compound operation
fvm.deferUpdates(true);
LayoutPart[] children = root.getChildren();
for (int i = 0; i < children.length; i++) {
if (children[i] != this) {
IWindowTrim trim = tbm.getTrim(children[i].getID());
if (trim == null)
continue;
if (trim instanceof ViewStackTrimToolBar) {
ViewStackTrimToolBar vstb = (ViewStackTrimToolBar) trim;