mirror of
https://github.com/eclipse-cdt/cdt
synced 2025-06-30 21:55:31 +02:00
This commit is contained in:
parent
e0af51b73c
commit
35fa250ece
4 changed files with 19 additions and 8 deletions
|
@ -167,14 +167,14 @@ public class CPElement {
|
|||
return CoreModel.newIncludeRefEntry(fPath, baseRef, include);
|
||||
}
|
||||
return CoreModel.newIncludeEntry(fPath, base, include, ((Boolean)getAttribute(SYSTEM_INCLUDE)).booleanValue(),
|
||||
exclusionPattern);
|
||||
exclusionPattern, isExported());
|
||||
case IPathEntry.CDT_MACRO :
|
||||
String macroName = (String)getAttribute(MACRO_NAME);
|
||||
String macroValue = (String)getAttribute(MACRO_VALUE);
|
||||
if (!baseRef.isEmpty()) {
|
||||
return CoreModel.newMacroRefEntry(fPath, baseRef, macroName);
|
||||
}
|
||||
return CoreModel.newMacroEntry(fPath, macroName, macroValue, exclusionPattern);
|
||||
return CoreModel.newMacroEntry(fPath, macroName, macroValue, exclusionPattern, isExported());
|
||||
default :
|
||||
return null;
|
||||
}
|
||||
|
|
|
@ -232,16 +232,20 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
|
|||
private void addBaseString(IPath endPath, CPElement cpentry, StringBuffer str) {
|
||||
IPath baseRef = (IPath)cpentry.getAttribute(CPElement.BASE_REF);
|
||||
if (!baseRef.isEmpty()) {
|
||||
if (endPath != null) {
|
||||
str.append(endPath.toOSString());
|
||||
}
|
||||
str.append(" - ("); //$NON-NLS-1$
|
||||
if (baseRef.isAbsolute()) {
|
||||
// str.append("From project ");
|
||||
str.append(baseRef);
|
||||
IPath path = baseRef;
|
||||
if (endPath != null) {
|
||||
path = path.append(endPath);
|
||||
}
|
||||
str.append(path.makeRelative().toOSString());
|
||||
} else {
|
||||
// str.append("From contribution ");
|
||||
IPathEntryContainer container;
|
||||
if (endPath != null) {
|
||||
str.append(endPath.toOSString());
|
||||
}
|
||||
str.append(" - ("); //$NON-NLS-1$
|
||||
try {
|
||||
container = CoreModel.getPathEntryContainer(baseRef, cpentry.getCProject());
|
||||
if (container != null) {
|
||||
|
@ -249,8 +253,8 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
|
|||
}
|
||||
} catch (CModelException e1) {
|
||||
}
|
||||
str.append(')');
|
||||
}
|
||||
str.append(')');
|
||||
} else {
|
||||
IPath path = (IPath)cpentry.getAttribute(CPElement.BASE);
|
||||
if (!path.isEmpty()) {
|
||||
|
|
|
@ -496,6 +496,9 @@ public class CPathIncludeSymbolEntryPage extends CPathBasePage {
|
|||
if (elem instanceof CPElement) {
|
||||
CPElement element = (CPElement)selected.get(0);
|
||||
if (element.getParentContainer() == null && element.getInherited() == null) {
|
||||
IPath base_ref = (IPath)element.getAttribute(CPElement.BASE_REF);
|
||||
if (base_ref != null && !base_ref.equals(Path.EMPTY))
|
||||
return false;
|
||||
return element.getEntryKind() == IPathEntry.CDT_INCLUDE || element.getEntryKind() == IPathEntry.CDT_MACRO;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -271,6 +271,10 @@ public class CPathLibraryEntryPage extends CPathBasePage {
|
|||
if (curr.getParentContainer() != null) {
|
||||
return false;
|
||||
}
|
||||
IPath base_ref = (IPath)curr.getAttribute(CPElement.BASE_REF);
|
||||
if (base_ref != null && !base_ref.equals(Path.EMPTY))
|
||||
return false;
|
||||
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
Loading…
Add table
Reference in a new issue