I just changed the platform of one of our applications from E3 to E4 (mistake, I know).
Now suddenly the application stores and restores views. Which is annoying because the views need a database connection that they can't get when the application first starts.
I know I can set the restorable flag in the view definition of the org.eclipse.ui.views
extension point to false. However the plug-in is used by a lot of E3 application, and while the flag was obviously not used to restore the view, it might change the behavior of the other applications if I change it.
Is there a way to disable this flag programmatically? Or maybe disable restoring of the GUI entirely?
You can use the -clearPersistedState
option on startup or in the rcp.ini file to clear the persisted application model during initialization. This means that the RCP will always start using the design in the Application.e4xmi (and fragments).
You can also use the -persistState false
option to stop the RCP saving the application state during shutdown.