Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 353498

Summary: "WorkspaceDirPath" variable description should be updated.
Product: [Tools] CDT Reporter: Yevgeny Shifrin <yevshif>
Component: cdt-coreAssignee: Project Inbox <cdt-core-inbox>
Status: NEW --- QA Contact: Jonah Graham <jonah>
Severity: normal    
Priority: P3    
Version: 8.0   
Target Milestone: ---   
Hardware: PC   
OS: Linux   
Whiteboard:
Bug Depends on:    
Bug Blocks: 275779    

Description Yevgeny Shifrin CLA 2011-08-01 09:55:50 EDT
Build Identifier: 20110615-0604

Hi,

I have the following file structure:
1) workspace location: /home/yevgenys/eclipse_workspaces/cdt8.0.0/temp2
2) directory location which I want to add as an include path: /home/yevgenys/eclipse_workspaces/cdt8.0.0/dummy_include_path

I don't want to use absolute path. I defined it: ${workspace_loc}/../dummy_include_path

After pressing ok, it was change to //../dummy_include_path and became "workspace path". 

Am I missing something?

Thanks,
Yevgeny

Reproducible: Always
Comment 1 Andrew Gvozdev CLA 2011-08-01 13:24:13 EDT
Where do you define that, in Paths&Symbols? Path starting with ${workspace_loc} may be treated as workspace path, better use ${WorkspaceDirPath}.
Comment 2 Yevgeny Shifrin CLA 2011-08-02 03:41:01 EDT
Hi,

Thank you for your response. Using "WorkspaceDirPath" seems to work :)

It seems very confusing the difference between "workspace_loc" and "WorkspaceDirPath" variables.

"workspace_loc" description: 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.

"WorkspaceDirPath" description: <not available>

I think description should be updated, because this is really confusing. I do not understand the "argument" part in "workspace_loc" description.

Because using "WorkspaceDirPath" is working, lowing priority to normal.

Thanks,
Yevgeny
Comment 3 Andrew Gvozdev CLA 2011-08-02 18:19:55 EDT
The difference is that ${WorkspaceDirPath} is MBS variable but ${workspace_loc} is defined by eclipse platform. Here is how argument is supposed to be used - ${workspace_loc:/project/path-in-the-project}. Note that this expression handles properly linked files and folders as well.
But ${workspace_loc}/../dummy_include_path should also work which makes this report a bug.
Comment 4 Yevgeny Shifrin CLA 2012-02-08 04:07:23 EST
Hi guys,

Is this bug specific for CDT? Maybe its component should be platform?

Thanks,
Yevgeny
Comment 5 Andrew Gvozdev CLA 2012-02-08 09:14:39 EST
${workspace_loc} is variable provided by Platform. I suggest to open a separate bug for it (to clarify description including arguments usage.)
${WorkspaceDirPath} is CDT variable and is not documented, as well as other MBS variables. We can use this bug for that.
Comment 6 Yevgeny Shifrin CLA 2012-02-08 09:36:53 EST
Hi,

I opened https://bugs.eclipse.org/bugs/show_bug.cgi?id=370956 on platform component for "workspace_loc" problem.

Thanks,
Yevgeny