动态关闭ViewPart

IWorkbenchPage page = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
IViewReference f = page.findViewReference(viewID);
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().hideView(f);

关闭当前view:
PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage().close();
关闭所有view:
PlatformUI.getWorkbench().close();

你可能感兴趣的:(java,F#)