Hi,
I have a eclipse based e3 application and in it Switch Workspace isn't working properly. Whenever I do that, it switches to the same workspace and not going to the new one.
Before restart is called they are setting a System property for eclipse.exitdata the -data workspace location as variable. But after restart that System variable gets wiped out. In new workspace they are calling
PlatformUI.createAndRunWorkbench(display, new ApplicationWorkbenchAdvisor());
which internally gets the location from an InternalPlatform class location variable. That InternalPlatform is a .class file and I don't have access to edit it. In InternalPlatform this is the code
public Location getInstanceLocation() {
assertInitialized();
return (Location) instanceLocation.getService();
}
/**
* @see Platform#getLocation()
*/
public IPath getLocation() throws IllegalStateException {
if (cachedInstanceLocation == null) {
Location location = getInstanceLocation();
if (location == null)
return null;
// This makes the assumption that the instance location is a file: URL
File file = new File(location.getURL().getFile());
cachedInstanceLocation = new Path(file.toString());
}
return cachedInstanceLocation;
}
In this Location location = getInstanceLocation(); gets the workspace location. How and where can i change this variable? Or is there any other way to pass variable for switch workspace? How does switch workspace works in the code? Can some one help me fix this.
Thank you
Jeevan