Perspective persp = wp.getActivePerspective();
// If we're making a fast view then use the new mechanism directly
boolean useNewMinMax = Perspective.useNewMinMax(persp);
if (useNewMinMax) {
IViewReference ref = persp.getViewReference(viewId, null);
if (ref == null)
return;
persp.getFastViewManager().addViewReference(FastViewBar.FASTVIEWBAR_ID, -1, ref, true);
wp.activate(ref.getPart(true));
return;
}
IViewReference ref = wp.findViewReference(viewId);
if (ref == null) {
IViewPart part = wp.showView(viewId, null, IWorkbenchPage.VIEW_CREATE);
ref = (IViewReference)wp.getReference(part);
}
if (!wp.isFastView(ref)) {
wp.addFastView(ref);
}
wp.activate(ref.getPart(true));
} else {
activePage.showView(viewId);
}
}