Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Newcomers » Newcomers » Path and build variable syntax
Path and build variable syntax [message #1815958] Wed, 16 October 2019 02:18 Go to next message
Andrew McLaren is currently offline Andrew McLarenFriend
Messages: 2
Registered: November 2013
Junior Member
Hi all,

I'm a user of Eclipse, but at arms length via TI's Code Composer Studio (CCS).

I've been investigating the use of build and path variables to reduce some hard coded definitions, but have a question regarding how these variables are dereferenced., and have found no details anywhere describing this. The specific examples I was looking at were appending relative path information to the workspace_loc variable.

There is the standard ${variable} form, which is fairly obvious (for example "${workspace_loc}/<relative_path>"). However there is also the form which (for example) CSS generates when adding a library search path to the linker, of the form "${workspace_loc:/<path>}". I haven't found any detail anywhere of exactly what this syntax means. "${workspace_loc:/<path>}", "${workspace_loc}/<path>", "${workspace_loc:}/<path>" all seem to evaluate exactly the same.

Is there a description somewhere of what the ${<variable>:<something>} actually means and/or expands to.

Thanks for any clarification

Andrew
Re: Path and build variable syntax [message #1815962 is a reply to message #1815958] Wed, 16 October 2019 05:25 Go to previous message
Ed Merks is currently online Ed MerksFriend
Messages: 33137
Registered: July 2009
Senior Member
Try to use then in any Launch Configuration. Create any old one for testing (Run -> Run Configurations...); perhaps a simple Java application from which you can print out the arguments from main(). On the Arguments page there are Variables... buttons. Here these are descriptions for the variables, i.e., work workspace_loc it says:

Returns the absolute file system path of the workspace root. When an argument is specified, the absolute file system path of the resource identified by a workspace relative path is returned.

So one important difference between ${workspace_loc}/project/path/file.extension and ${workspace_loc:/project/path/file.extension} is that the former assumes the file is physically in the workspace's root folder whereas the latter works even if the project is elsewhere in the file system, e.g., a Git clone not physically nested in the workspace.

I'm not sure there is documentation elsewhere; all these variables are contributed via extensions in some plugin.xml...


Ed Merks
Professional Support: https://www.macromodeling.com/
Previous Topic:Eclipse UI freezes after installing subclipse
Next Topic:Losing Saved Perspectives - Please Help!
Goto Forum:
  


Current Time: Fri Apr 19 09:13:35 GMT 2024

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

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

Back to the top