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) {
|
switch(kind) {
|
||||||
case IPathEntry.CDT_INCLUDE: {
|
case IPathEntry.CDT_INCLUDE: {
|
||||||
IIncludeEntry include = (IIncludeEntry)entries[i];
|
IIncludeEntry include = (IIncludeEntry)entries[i];
|
||||||
entry = CoreModel.newIncludeEntry(resourcePath, include.getBasePath(), include.getIncludePath(),
|
IPath baseRef = include.getBaseReference();
|
||||||
include.isSystemInclude(), include.getExclusionPatterns(), include.isExported());
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case IPathEntry.CDT_LIBRARY: {
|
case IPathEntry.CDT_LIBRARY: {
|
||||||
|
@ -651,15 +656,25 @@ public class PathEntryManager implements IPathEntryStoreListener, IElementChange
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
entry = CoreModel.newLibraryEntry(resourcePath, library.getBasePath(),
|
IPath baseRef = library.getBaseReference();
|
||||||
library.getLibraryPath(), sourcePath, library.getSourceAttachmentRootPath(),
|
if (baseRef == null || baseRef.isEmpty()) {
|
||||||
library.getSourceAttachmentPrefixMapping(), library.isExported());
|
entry = CoreModel.newLibraryEntry(resourcePath, library.getBasePath(),
|
||||||
|
library.getLibraryPath(), sourcePath, library.getSourceAttachmentRootPath(),
|
||||||
|
library.getSourceAttachmentPrefixMapping(), library.isExported());
|
||||||
|
} else {
|
||||||
|
entry = CoreModel.newLibraryRefEntry(resourcePath, baseRef, library.getLibraryPath());
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
case IPathEntry.CDT_MACRO: {
|
case IPathEntry.CDT_MACRO: {
|
||||||
IMacroEntry macro = (IMacroEntry)entries[i];
|
IMacroEntry macro = (IMacroEntry)entries[i];
|
||||||
entry = CoreModel.newMacroEntry(resourcePath, macro.getMacroName(), macro.getMacroValue(),
|
IPath baseRef = macro.getBaseReference();
|
||||||
macro.getExclusionPatterns(), macro.isExported());
|
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;
|
break;
|
||||||
}
|
}
|
||||||
case IPathEntry.CDT_OUTPUT: {
|
case IPathEntry.CDT_OUTPUT: {
|
||||||
|
|
Loading…
Add table
Reference in a new issue