1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Bug 419915 - Organize includes adds wrong path prefix

Set the device id to null in the include path because, as the javadoc
for removeFirstSegments says, the device id is preserved.

Change-Id: I1f57d1ff7133326b306451b22a1ce7665aec3d85
Signed-off-by: Marc-Andre Laperle <marc-andre.laperle@ericsson.com>
Reviewed-on: https://git.eclipse.org/r/17555
Reviewed-by: Sergey Prigogin <eclipse.sprigogin@gmail.com>
This commit is contained in:
Marc-Andre Laperle 2013-10-20 02:00:57 -04:00
parent f4ed32d9b2
commit b0ea093470

View file

@ -131,7 +131,7 @@ public class InclusionContext {
!fCurrentDirectory.isPrefixOf(fullPath)) {
return null;
}
shortestInclude = fullPath.removeFirstSegments(fCurrentDirectory.segmentCount()).toString();
shortestInclude = fullPath.setDevice(null).removeFirstSegments(fCurrentDirectory.segmentCount()).toString();
}
include = new IncludeInfo(shortestInclude, isSystem);
// Don't put an include to fullPath to fIncludeResolutionCache since it may be wrong