Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Any way to bind a System.property to a specific workspace?
Any way to bind a System.property to a specific workspace? [message #1017912] Tue, 12 March 2013 19:27 Go to next message
Terran Gilman is currently offline Terran Gilman
Messages: 67
Registered: July 2009
Member
I'm looking for a way to set a system property based on which workspace is opened. Anyone know a way to do this?
Re: Any way to bind a System.property to a specific workspace? [message #1017916 is a reply to message #1017912] Tue, 12 March 2013 19:42 Go to previous message
Devi Vara Prasad Bandaru is currently offline Devi Vara Prasad Bandaru
Messages: 98
Registered: March 2010
Location: Hyderabad
Member

On the plugin start you can do this

IWorkspaceRoot root = ResourcesPlugin.getWorkspace().getRoot();
		IProject project = root.getProject("Dummy_Project");// get an handle to dummy project  
		File projectFile = new File(project.getLocationURI());
		File workspaceFile = projectFile.getParentFile();
		if ("Condition".equals(workspaceFile.getName())) {
			// set your property here
		}


Previous Topic:Re-using FileSystemExportOperation
Next Topic:Smart Save Plugin - Testers Needed
Goto Forum:
  


Current Time: Sat Oct 25 06:25:40 GMT 2014

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

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