From 65ff00c6073da67ab0ae5e474dea87c9acf25a93 Mon Sep 17 00:00:00 2001 From: Andrew Ferguson Date: Thu, 21 Feb 2008 17:19:45 +0000 Subject: [PATCH] Fix documentation, schema fix is contributed by Tim Kelly (Nokia) --- .../cdt/core/index/URIRelativeLocationConverter.java | 11 +++++++---- core/org.eclipse.cdt.core/schema/CIndex.exsd | 4 ++-- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/URIRelativeLocationConverter.java b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/URIRelativeLocationConverter.java index c45e16dab10..a562589bb5a 100644 --- a/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/URIRelativeLocationConverter.java +++ b/core/org.eclipse.cdt.core/parser/org/eclipse/cdt/core/index/URIRelativeLocationConverter.java @@ -17,20 +17,23 @@ import org.eclipse.core.filesystem.URIUtil; /** * A IIndexLocationConverter for converting relative paths within an index, by prefixing them - * with the supplied base URI + * with the supplied base URI.

+ * Note: The supplied base URI must end with a forward slash *
* This location converter is internal-representation-compatible with ResourceContainerRelativeLocationConverter + * @since 4.0 */ /* - * Internal representation is uri relative path (non encoded form) + * The associated internal PDOM representation is the relative path (non encoded form) */ public class URIRelativeLocationConverter implements IIndexLocationConverter { private URI baseURI; /** * Constructs an URIRelativeLocationConverter which will relative paths - * by prefixing the supplied base URI - * @param baseURI + * by prefixing the supplied base URI. + * @param baseURI the URI which will form the absolute base that relative paths + * are concatenated to. Note: It must end with a forward slash. */ public URIRelativeLocationConverter(URI baseURI) { this.baseURI = baseURI; diff --git a/core/org.eclipse.cdt.core/schema/CIndex.exsd b/core/org.eclipse.cdt.core/schema/CIndex.exsd index 3525095e945..8c02bba8c74 100644 --- a/core/org.eclipse.cdt.core/schema/CIndex.exsd +++ b/core/org.eclipse.cdt.core/schema/CIndex.exsd @@ -136,8 +136,8 @@ public class AcmeSDKProvider implements IReadOnlyPDOMProvider { return AcmeNature.isAcmeProject(project); } - public IPDOMDescriptor[] getDescriptors(ICProject cproject, ICConfigurationDescription config) { - final IPath sdkBase = AcmeSDKAPI.getSDKBase(cproject, config); + public IPDOMDescriptor[] getDescriptors(ICConfigurationDescription config) { + final IPath sdkBase = AcmeSDKAPI.getSDKBase(config); return new IPDOMDescriptor[] { new IPDOMDescriptor() { public IIndexLocationConverter getIndexLocationConverter() { return new URIRelativeLocationConverter(URIUtil.toURI(sdkBase));