Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Switching Workspace problem
Switching Workspace problem [message #1708654] Fri, 18 September 2015 12:22
Jeevan Rex is currently offline Jeevan RexFriend
Messages: 80
Registered: March 2015
Location: Bangalore
Member
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
Previous Topic:Solve 'major version should be incremented'
Next Topic:Workflow for Gerrit Code reviews in Platform UI
Goto Forum:
  


Current Time: Thu Jan 23 12:01:05 GMT 2025

Powered by FUDForum. Page generated in 0.03291 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top