Community
Participate
Working Groups
CDT HEAD: I have a project where include path points to /root/directory and the project contains folders foo, bar and baz folders linked to /root/directory/foo, /root/directory/bar and /root/directory/baz, etc. Open include action opens header file foo/file.h as /root/directory/foo/file.h instead of opening it as a workspace resource MyProject/foo/file.h.
Created attachment 54532 [details] Bug fix.
Your fix removes the resolution of symlinks completely. Maybe this should still be used as fallback?
The code that supposedly did resolution of symlinks looked completely bogus to me. Do you think it can do something useful?
The code comes from a patch for bug 102622 to filter out duplicate pathes. I think this is still relevant. Maybe you can change your patch such that it tries to find a workspace resource using the canonicalized path when there was no match with the original path?
I tested my patch in a scenario from bug 102622. Everything works just fine due to cleverness of IWorkspaceRoot.findFilesForLocation method.
Created attachment 55379 [details] Slightly modified patch for release You are right, IWorkspaceRoot.findFilesForLocation already canonicalizes the path. I have made some changes to your patch, e.g. to check for absolute includes. Please review if this is OK for you.
Created attachment 55381 [details] Modified patch Sorry, the previous patch was the wrong one.
Your patch looks good. Thank you for doing it.
Committed to HEAD. Available in builds > 20061212.