org.eclipse.cdt.core
Interface IPositionTrackerManager

All Known Implementing Classes:
PositionTrackerManager

public interface IPositionTrackerManager

An interface to manage the position tracking. It allows for mapping character offsets from a file previously stored on disk to the offset in the current document for the file.

This interface is not intended to be implemented by clients.

EXPERIMENTAL. This interface has been added as part of a work in progress. There is no guarantee that this API will work or that it will remain the same. Please do not use this API without consulting with the CDT team.

Since:
4.0

Method Summary
 IPositionConverter findPositionConverter(org.eclipse.core.resources.IFile file, long timestamp)
          Returns the position converter suitable for mapping character offsets of the given file/timestamp to the current version of it.
 IPositionConverter findPositionConverter(org.eclipse.core.runtime.IPath fullPathOrExternalLocation, long timestamp)
          Returns the position tracker suitable for mapping character offsets of the given external file/timestamp to the current version of it.
 IPositionConverter findPositionConverter(org.eclipse.cdt.core.model.ITranslationUnit tu, long timestamp)
          Returns the position converter suitable for mapping character offsets of the given translation unit to the current version of it.
 

Method Detail

findPositionConverter

IPositionConverter findPositionConverter(org.eclipse.cdt.core.model.ITranslationUnit tu,
                                         long timestamp)
Returns the position converter suitable for mapping character offsets of the given translation unit to the current version of it.

Parameters:
file - a file for which the position adapter is requested.
timestamp - identifies the version of the file stored on disk.
Returns:
the requested position converter or null.

findPositionConverter

IPositionConverter findPositionConverter(org.eclipse.core.resources.IFile file,
                                         long timestamp)
Returns the position converter suitable for mapping character offsets of the given file/timestamp to the current version of it.

Parameters:
file - a file for which the position adapter is requested.
timestamp - identifies the version of the file stored on disk.
Returns:
the requested position converter or null.

findPositionConverter

IPositionConverter findPositionConverter(org.eclipse.core.runtime.IPath fullPathOrExternalLocation,
                                         long timestamp)
Returns the position tracker suitable for mapping character offsets of the given external file/timestamp to the current version of it.

The method can be used for resources by supplying the full path. However, it does not work if you supply the location of a resource.

Parameters:
externalLocationOrFullPath - an external location for which the position adapter is requested.
timestamp - identifies the version of the file stored on disk.
Returns:
the requested position converter or null.