use of org.eclipse.ui.views.IViewDescriptor in project tdi-studio-se by Talend.
the class RefreshView method refreshAll.
public static void refreshAll() {
IWorkbenchWindow workBenchWindow = PlatformUI.getWorkbench().getActiveWorkbenchWindow();
if (workBenchWindow == null) {
return;
}
IWorkbenchPage workBenchPage = workBenchWindow.getActivePage();
if (workBenchPage == null) {
return;
}
for (IViewDescriptor desc : PlatformUI.getWorkbench().getViewRegistry().getViews()) {
IViewPart viewPart = workBenchPage.findView(desc.getId());
// show the view again in order to see the change
if (viewPart != null) {
workBenchPage.hideView(viewPart);
}
}
workBenchPage.resetPerspective();
}
Aggregations