diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java index 047d20e7a4d..28a3177febf 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElement.java @@ -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; } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java index c6b3555e24d..f65d13511d2 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPElementLabelProvider.java @@ -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()) { diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java index ca6a132a3ce..e0d2d7a2aa3 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java @@ -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; } } diff --git a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java index eeddc2dfed2..8c068a7124a 100644 --- a/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java +++ b/core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathLibraryEntryPage.java @@ -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;