1. I have an RCP application with one perspective and several views.
I want to give the user the option to save the current workbench with configurations about the applications and the views.
Later the user will be able to open any one of the several previously saved workbench configurations with a dialog box prompt during the start up of the application.
I saw that the workbench state is saved in the workbench.xmi file. Is it possible to save several of these types of files by the rcp and during start up load the file that the user wants? Or is there are different approach to the problem?
2 One of my team members implemented the following, in order to make sure that when the user starts a new application, the previous state is not implemented and a fresh new application is started.
But is this a good practice? Since the save state configurations that I am trying to implement uses the previously saved workbench (setSaveAndRestore, IMemento). Thus at the end I want to give the user the option to start a fresh project or load a previously saved project.
IPath location = Platform.getLocation();
IPath workbenchXml = location.addTrailingSeparator().append(".metadata").addTrailingSeparator().append(".plugins").addTrailingSeparator().append("org.eclipse.e4.workbench").addTrailingSeparator().append("workbench.xmi");
if (workbenchXml.toFile().exists())
workbenchXml.toFile().delete();