CTabFolder 最大最小化

WorkbenchPage page = (WorkbenchPage) this.getWindowConfigurer().getWindow()
                .getActivePage();
LayoutPart part = page.getPerspectivePresentation().findPart(CDTPlugin.CDTView, null);
ViewPane vp = (ViewPane) part;
final ViewStack vs= (ViewStack) vp.getContainer();
TabbedStackPresentation tp = (TabbedStackPresentation) vs.getTestPresentation();
//tp.showMinMax(false);
final ViewSashContainer container = (ViewSashContainer) vs.getContainer();
container.remove(vs);
container.add(vs, IPageLayout.LEFT, 0.3f, null);
DefaultTabFolder tf = (DefaultTabFolder) tp.getTabFolder();
tf.addListener(new TabFolderListener(){
    @Override
    public void handleEvent(TabFolderEvent e) {
        System.out.println(e.type);
        //TabFolderEvent.EVENT_MAXIMIZE;//7
        //TabFolderEvent.EVENT_MINIMIZE;//5
        if(5==TabFolderEvent.EVENT_MINIMIZE){
            //container.remove(vs);
        }
    }}
);

原文地址:https://www.cnblogs.com/xxonehjh/p/2880957.html