Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Language IDEs » C / C++ IDE (CDT) » WORKSPACE_LOC and PROJECT_LOC path variables and linked resources
WORKSPACE_LOC and PROJECT_LOC path variables and linked resources [message #1771632] Mon, 28 August 2017 23:43 Go to next message
Faisal Tariq is currently offline Faisal TariqFriend
Messages: 33
Registered: August 2017
Member
Hello

I have the WORKSPACE_LOC AND PROJECT_LOC in the Linked Resources. I wish to see the path in my Java code. I tried

String workspace_path = ${WORKSPACE_LOC};
String project_path = $(PROJECT_LOC};

In both cases I am getting an error, i.e. the red squiggly line under WORKSPACE_LOC and PROJECT_LOC.

How does one use these? Or is there another way to determine the workspace path and project path?

Thanks

Faisal
Re: WORKSPACE_LOC and PROJECT_LOC path variables and linked resources [message #1771707 is a reply to message #1771632] Tue, 29 August 2017 17:49 Go to previous message
Faisal Tariq is currently offline Faisal TariqFriend
Messages: 33
Registered: August 2017
Member
I discovered how to do the above to get the workspace.

String workspace_path = ResourcesPlugin.getWorkspace().getRoot().getLocation().toString();

Faisal
Previous Topic:Fans tricked into overworking when anything done in Eclipse
Next Topic:Unable to get Custom Build Step to work
Goto Forum:
  


Current Time: Thu Apr 25 14:07:15 GMT 2024

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

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

Back to the top