Hello,
in my pure e4 application (eclipse plattform 4.7,) i used successful following code in my LifeCycleManager to let the user specify his workspace after first start:
@PostContextCreate
private void postContextCreate(IApplicationContext applicationContext, Display display, StatusReporter statusReporter) {
logger.info("LifeCycleManager.postContextCreate()");
// check if workspace directory has been set
Location instanceLocation = Platform.getInstanceLocation();
if (!instanceLocation.isSet()) {
//open SwitchWorkspaceDialog and let the user choose the workspace path
...
//set the new workspace
instanceLocation.set(new File(directory).toURI().toURL(), false);
}
}
After upgrading to 4.9, Platform.getInstanceLocation.isSet()
always returns true and therefore the user cant choose his own workspace. The default workspace location is always set to /MyRCPApplication/workspace/.
I deleted all existing workspaces and tried it also on a clean system.
Is it a bug or is there another way in 4.9 to change the workspace?
Thanks
Nico