I had an e3 rcp app. When I close it and reopen it all opened views are closed. After updating app to e4 and after close than open app the views are still opened. Any idea how to close these views?
Iv tried to implement something like this but its not working
`
public void closeActiveViews() {
try {
IWorkbenchPage activePage = PlatformUI.getWorkbench().getActiveWorkbenchWindow().getActivePage();
if (activePage != null) {
IViewReference[] views = activePage.getViewReferences();
if (views != null) {
for (IViewReference view : views) {
activePage.hideView(view.getView(false));
}
}
}
} catch (Exception exception) {
log.error("Could not hide views ", exception);
System.exit(1);
}
}
`