mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
fix call to PathUtil.makeRelativePath()
This commit is contained in:
parent
355b875edc
commit
1d60889ad3
2 changed files with 2 additions and 2 deletions
|
@ -414,7 +414,7 @@ public class AddIncludeOnSelectionAction extends Action implements IUpdate {
|
||||||
isSystemIncludePath = true;
|
isSystemIncludePath = true;
|
||||||
} else if (projectLocation.isPrefixOf(typeLocation)
|
} else if (projectLocation.isPrefixOf(typeLocation)
|
||||||
&& projectLocation.isPrefixOf(headerLocation)) {
|
&& projectLocation.isPrefixOf(headerLocation)) {
|
||||||
includePath = PathUtil.makeRelativePath(typeLocation, headerLocation);
|
includePath = PathUtil.makeRelativePath(typeLocation, headerLocation.removeLastSegments(1));
|
||||||
}
|
}
|
||||||
if (includePath == null)
|
if (includePath == null)
|
||||||
includePath = typeLocation;
|
includePath = typeLocation;
|
||||||
|
|
|
@ -926,7 +926,7 @@ public class NewClassWizardPage extends WizardPage implements Listener {
|
||||||
systemIncludePath = true;
|
systemIncludePath = true;
|
||||||
} else {
|
} else {
|
||||||
if (projectPath.isPrefixOf(location.getPath()) && projectPath.isPrefixOf(header.getPath()))
|
if (projectPath.isPrefixOf(location.getPath()) && projectPath.isPrefixOf(header.getPath()))
|
||||||
relativePath = location.getRelativePath(header.getPath());
|
relativePath = location.getRelativePath(header.getPath().removeLastSegments(1));
|
||||||
}
|
}
|
||||||
baseClassFileName = relativePath.toString();
|
baseClassFileName = relativePath.toString();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Reference in a new issue