mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-04-29 19:45:01 +02:00
Check the BaseRef when saving
This commit is contained in:
parent
97ade06599
commit
74c63e682b
1 changed files with 22 additions and 7 deletions
|
@ -635,8 +635,13 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
|||
switch(kind) {
|
||||
case IPathEntry.CDT_INCLUDE: {
|
||||
IIncludeEntry include = (IIncludeEntry)entries[i];
|
||||
entry = CoreModel.newIncludeEntry(resourcePath, include.getBasePath(), include.getIncludePath(),
|
||||
include.isSystemInclude(), include.getExclusionPatterns(), include.isExported());
|
||||
IPath baseRef = include.getBaseReference();
|
||||
if (baseRef == null || baseRef.isEmpty()) {
|
||||
entry = CoreModel.newIncludeEntry(resourcePath, include.getBasePath(), include.getIncludePath(),
|
||||
include.isSystemInclude(), include.getExclusionPatterns(), include.isExported());
|
||||
} else {
|
||||
entry = CoreModel.newIncludeRefEntry(resourcePath, baseRef, include.getIncludePath());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IPathEntry.CDT_LIBRARY: {
|
||||
|
@ -651,15 +656,25 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
|||
}
|
||||
}
|
||||
}
|
||||
entry = CoreModel.newLibraryEntry(resourcePath, library.getBasePath(),
|
||||
library.getLibraryPath(), sourcePath, library.getSourceAttachmentRootPath(),
|
||||
library.getSourceAttachmentPrefixMapping(), library.isExported());
|
||||
IPath baseRef = library.getBaseReference();
|
||||
if (baseRef == null || baseRef.isEmpty()) {
|
||||
entry = CoreModel.newLibraryEntry(resourcePath, library.getBasePath(),
|
||||
library.getLibraryPath(), sourcePath, library.getSourceAttachmentRootPath(),
|
||||
library.getSourceAttachmentPrefixMapping(), library.isExported());
|
||||
} else {
|
||||
entry = CoreModel.newLibraryRefEntry(resourcePath, baseRef, library.getLibraryPath());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IPathEntry.CDT_MACRO: {
|
||||
IMacroEntry macro = (IMacroEntry)entries[i];
|
||||
entry = CoreModel.newMacroEntry(resourcePath, macro.getMacroName(), macro.getMacroValue(),
|
||||
macro.getExclusionPatterns(), macro.isExported());
|
||||
IPath baseRef = macro.getBaseReference();
|
||||
if (baseRef == null || baseRef.isEmpty()) {
|
||||
entry = CoreModel.newMacroEntry(resourcePath, macro.getMacroName(), macro.getMacroValue(),
|
||||
macro.getExclusionPatterns(), macro.isExported());
|
||||
} else {
|
||||
entry = CoreModel.newMacroRefEntry(resourcePath, baseRef, macro.getMacroName());
|
||||
}
|
||||
break;
|
||||
}
|
||||
case IPathEntry.CDT_OUTPUT: {
|
||||
|
|
Loading…
Add table
Reference in a new issue