Skip to main content


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 GilmanFriend
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 BandaruFriend
Messages: 100
Registered: March 2010
Location: Hyderabad
Senior 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: Tue Mar 19 10:36:29 GMT 2024

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

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

Back to the top