1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-07-01 06:05:24 +02:00
David Inglis 2004-06-07 18:18:16 +00:00
parent e0af51b73c
commit 35fa250ece
4 changed files with 19 additions and 8 deletions

View file

@ -167,14 +167,14 @@ public class CPElement {
return CoreModel.newIncludeRefEntry(fPath, baseRef, include); return CoreModel.newIncludeRefEntry(fPath, baseRef, include);
} }
return CoreModel.newIncludeEntry(fPath, base, include, ((Boolean)getAttribute(SYSTEM_INCLUDE)).booleanValue(), return CoreModel.newIncludeEntry(fPath, base, include, ((Boolean)getAttribute(SYSTEM_INCLUDE)).booleanValue(),
exclusionPattern); exclusionPattern, isExported());
case IPathEntry.CDT_MACRO : case IPathEntry.CDT_MACRO :
String macroName = (String)getAttribute(MACRO_NAME); String macroName = (String)getAttribute(MACRO_NAME);
String macroValue = (String)getAttribute(MACRO_VALUE); String macroValue = (String)getAttribute(MACRO_VALUE);
if (!baseRef.isEmpty()) { if (!baseRef.isEmpty()) {
return CoreModel.newMacroRefEntry(fPath, baseRef, macroName); return CoreModel.newMacroRefEntry(fPath, baseRef, macroName);
} }
return CoreModel.newMacroEntry(fPath, macroName, macroValue, exclusionPattern); return CoreModel.newMacroEntry(fPath, macroName, macroValue, exclusionPattern, isExported());
default : default :
return null; return null;
} }

View file

@ -232,16 +232,20 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
private void addBaseString(IPath endPath, CPElement cpentry, StringBuffer str) { private void addBaseString(IPath endPath, CPElement cpentry, StringBuffer str) {
IPath baseRef = (IPath)cpentry.getAttribute(CPElement.BASE_REF); IPath baseRef = (IPath)cpentry.getAttribute(CPElement.BASE_REF);
if (!baseRef.isEmpty()) { if (!baseRef.isEmpty()) {
if (endPath != null) {
str.append(endPath.toOSString());
}
str.append(" - ("); //$NON-NLS-1$
if (baseRef.isAbsolute()) { if (baseRef.isAbsolute()) {
// str.append("From project "); // str.append("From project ");
str.append(baseRef); IPath path = baseRef;
if (endPath != null) {
path = path.append(endPath);
}
str.append(path.makeRelative().toOSString());
} else { } else {
// str.append("From contribution "); // str.append("From contribution ");
IPathEntryContainer container; IPathEntryContainer container;
if (endPath != null) {
str.append(endPath.toOSString());
}
str.append(" - ("); //$NON-NLS-1$
try { try {
container = CoreModel.getPathEntryContainer(baseRef, cpentry.getCProject()); container = CoreModel.getPathEntryContainer(baseRef, cpentry.getCProject());
if (container != null) { if (container != null) {
@ -249,8 +253,8 @@ class CPElementLabelProvider extends LabelProvider implements IColorProvider {
} }
} catch (CModelException e1) { } catch (CModelException e1) {
} }
str.append(')');
} }
str.append(')');
} else { } else {
IPath path = (IPath)cpentry.getAttribute(CPElement.BASE); IPath path = (IPath)cpentry.getAttribute(CPElement.BASE);
if (!path.isEmpty()) { if (!path.isEmpty()) {

View file

@ -496,6 +496,9 @@ public class CPathIncludeSymbolEntryPage extends CPathBasePage {
if (elem instanceof CPElement) { if (elem instanceof CPElement) {
CPElement element = (CPElement)selected.get(0); CPElement element = (CPElement)selected.get(0);
if (element.getParentContainer() == null && element.getInherited() == null) { 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; return element.getEntryKind() == IPathEntry.CDT_INCLUDE || element.getEntryKind() == IPathEntry.CDT_MACRO;
} }
} }

View file

@ -271,6 +271,10 @@ public class CPathLibraryEntryPage extends CPathBasePage {
if (curr.getParentContainer() != null) { if (curr.getParentContainer() != null) {
return false; return false;
} }
IPath base_ref = (IPath)curr.getAttribute(CPElement.BASE_REF);
if (base_ref != null && !base_ref.equals(Path.EMPTY))
return false;
} }
} }
return true; return true;