### Eclipse Workspace Patch 1.0 #P org.eclipse.cdt.ui Index: src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java =================================================================== RCS file: /cvsroot/tools/org.eclipse.cdt-core/org.eclipse.cdt.ui/src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java,v retrieving revision 1.17 diff -u -r1.17 CPathIncludeSymbolEntryPage.java --- src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java 10 Jul 2006 08:03:28 -0000 1.17 +++ src/org/eclipse/cdt/internal/ui/dialogs/cpaths/CPathIncludeSymbolEntryPage.java 5 Dec 2006 14:57:30 -0000 @@ -39,6 +39,8 @@ import org.eclipse.cdt.internal.ui.wizards.dialogfields.TreeListDialogField; import org.eclipse.cdt.ui.CElementContentProvider; import org.eclipse.cdt.ui.CUIPlugin; +import org.eclipse.cdt.utils.PathUtil; + import org.eclipse.core.resources.IContainer; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; @@ -894,18 +896,21 @@ if (dialog.open() == Window.OK) { newItem = dialog.getValue(); if (newItem != null && !newItem.equals("")) { //$NON-NLS-1$ + IPath newCanonicalPath = new Path(newItem); + if (newCanonicalPath.isAbsolute()) + newCanonicalPath = PathUtil.getCanonicalPath(newCanonicalPath); if (existing == null) { CPElementGroup group = getSelectedGroup(); CPElement newPath = new CPElement(fCurrCProject, IPathEntry.CDT_INCLUDE, group.getResource().getFullPath(), group.getResource()); - newPath.setAttribute(CPElement.INCLUDE, new Path(newItem)); + newPath.setAttribute(CPElement.INCLUDE, newCanonicalPath); if (!group.contains(newPath)) { addPathToResourceGroups(newPath, group, fIncludeSymPathsList.getElements()); fIncludeSymPathsList.refresh(); fIncludeSymPathsList.selectElements(new StructuredSelection(newPath)); } } else { - existing.setAttribute(CPElement.INCLUDE, new Path(newItem)); + existing.setAttribute(CPElement.INCLUDE, newCanonicalPath); updatePathOnResourceGroups(existing, fIncludeSymPathsList.getElements()); fIncludeSymPathsList.refresh(); }