Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 353113 - BuildDescription class does not behave properly for remote projects
Summary: BuildDescription class does not behave properly for remote projects
Status: RESOLVED FIXED
Alias: None
Product: CDT
Classification: Tools
Component: cdt-build-managed (show other bugs)
Version: 7.0.2   Edit
Hardware: All All
: P3 normal (vote)
Target Milestone: 7.0.3   Edit
Assignee: Chris Recoskie CLA
QA Contact: Chris Recoskie CLA
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-07-26 10:12 EDT by Chris Recoskie CLA
Modified: 2012-03-23 14:58 EDT (History)
3 users (show)

See Also:


Attachments
patch (2.44 KB, patch)
2011-07-26 10:15 EDT, Chris Recoskie CLA
recoskie: iplog-
Details | Diff
updated patch with fixed copyright (2.85 KB, patch)
2011-07-26 13:04 EDT, Chris Recoskie CLA
recoskie: iplog-
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Chris Recoskie CLA 2011-07-26 10:12:24 EDT
A couple of interrelated issues for which I'm attaching a patch:

 - BuildDescription.calcResourceLocation(IResource) should use EFSExtensionManager to get the path associated with the resource.  It was trying to take the workspace relative path for the resource and append it to the workspace root location, but that doesn't work when your resources do not in the tree under the workspace directory.  This might be problematic for linked resources too, but I noticed it with a remote EFS project.

- getURIForLocation(IPath location) ends up throwing URISyntaxExceptions, because it tries to then take this path and shove it into a URI directly.  Since it was a local path, you can't do this.  Fixing the above problem avoids this, but this code should still be cleaned up to use EFSExtensionManager to construct URIs, rather than doing it directly.
Comment 1 Chris Recoskie CLA 2011-07-26 10:15:13 EDT
Created attachment 200360 [details]
patch
Comment 2 Vivian Kong CLA 2011-07-26 10:26:18 EDT
(In reply to comment #1)
> Created attachment 200360 [details]
> patch

Please update copyright year as well.  Thanks.
Comment 3 Chris Recoskie CLA 2011-07-26 13:04:28 EDT
Created attachment 200379 [details]
updated patch with fixed copyright
Comment 4 Chris Recoskie CLA 2011-07-26 17:11:53 EDT
Applied to cdt_7_0, cdt_8_0, and master.
Comment 5 CDT Genie CLA 2012-03-23 14:58:10 EDT
*** cdt git genie on behalf of Chris Recoskie ***

    Bug 353113 - BuildDescription class does not behave properly for remote
    projects

[*] http://git.eclipse.org/c/cdt/org.eclipse.cdt.git/commit/?id=79fc7de8028144434f8e7d1bcea741548b117fa7