RCP/RCP

RCP ActivePage Hide and Show

반응형

IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();

IViewReference viewReference = activePage.findViewReference(ContentTreeViewer.ID);

if (viewReference == null) {

try {

activePage.showView(ContentTreeViewer.ID);

} catch (PartInitException e) {

LOGGER.error("OpenSlipView Error : " , e);

}

} else {

activePage.hideView(viewReference);

}

반응형