Package org.eclipse.cdt.core.index

# Class ResourceContainerRelativeLocationConverter

java.lang.Object
org.eclipse.cdt.core.index.ResourceContainerRelativeLocationConverter

All Implemented Interfaces:
  `IIndexLocationConverter`

public class ResourceContainerRelativeLocationConverter extends Object implements IIndexLocationConverter
A location converter for converting project resource locations to be relative to a specified container. Resources outside of the associated project will not be converted (ignored).
This location converter is internal-representation-compatible with URIRelativeLocationConverter

## Field Summary

Fields
Modifier and Type
Field
Description
`protected org.eclipse.core.runtime.IPath`
`fullPath`
`protected org.eclipse.core.resources.IWorkspaceRoot`
`root`

## Constructor Summary

Constructors
Constructor
Description
`ResourceContainerRelativeLocationConverter(org.eclipse.core.resources.IContainer container)`

## Method Summary

Modifier and Type
Method
Description
`IIndexFileLocation`
`fromInternalFormat(String raw)`
Convert a raw string in an internal IIndexFragment implementation specific format to an IIndexFileLocation or null if the internal format could not be translated.
`String`
`toInternalFormat(IIndexFileLocation location)`
Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

## Field Details

### root

protected org.eclipse.core.resources.IWorkspaceRoot root

### fullPath

protected org.eclipse.core.runtime.IPath fullPath

## Constructor Details

### ResourceContainerRelativeLocationConverter

public ResourceContainerRelativeLocationConverter(org.eclipse.core.resources.IContainer container)

Parameters:
  `container` - the resource container to convert relative to

## Method Details

### fromInternalFormat

public IIndexFileLocation fromInternalFormat(String raw)
Description copied from interface: `IIndexLocationConverter`
Convert a raw string in an internal IIndexFragment implementation specific format to an IIndexFileLocation or null if the internal format could not be translated.

Specified by:
  `fromInternalFormat` in interface `IIndexLocationConverter`

### toInternalFormat

public String toInternalFormat(IIndexFileLocation location)
Description copied from interface: `IIndexLocationConverter`
Convert a IIndexFileLocation to the internal IIndexFragment implementation specific format or null if the location could not be translated.

Specified by:
  `toInternalFormat` in interface `IIndexLocationConverter`
Returns:
  an internal representation for the location specified