Search code examples
javaeclipsercpperspective

Eclipse RCP setSaveAndRestore state is not working


I am working on an RCP application just similar to eclipse with some added features, I am trying to make the RCP to save its last state (mainly its perspective and perspective configuration)

public void initialize(IWorkbenchConfigurer configurer) {
    super.initialize(configurer);

    getWorkbenchConfigurer().setSaveAndRestore(true);

    IDE.registerAdapters();

But it`s not affecting the RCP at all, as the application resets to its default state after each restart.

any suggestions?

Thanks


Solution

  • Make sure you are not specifying the -clearPersistedState or -persistState false arguments when you run the RCP. Both these will clear (or not save) the RCP state.