Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » Any way to bind a to a specific workspace?
Any way to bind a 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
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 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: Thu Oct 22 17:56:28 GMT 2020

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

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

Back to the top