Package org.eclipse.cdt.core.browser
Class TypeReference
java.lang.Object
org.eclipse.cdt.core.browser.TypeReference
- All Implemented Interfaces:
ITypeReference
- Restriction:
- This class is not intended to be subclassed by clients.
- Restriction:
- This class is not intended to be instantiated by clients.
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionTypeReference(IWorkingCopy workingCopy, org.eclipse.core.resources.IProject project) TypeReference(IWorkingCopy workingCopy, org.eclipse.core.resources.IProject project, int offset, int length) TypeReference(org.eclipse.core.resources.IResource resource, org.eclipse.core.resources.IProject project) TypeReference(org.eclipse.core.resources.IResource resource, org.eclipse.core.resources.IProject project, int offset, int length) TypeReference(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject project) TypeReference(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject project, int offset, int length) -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturns the CElements located at the stored offset and length, ornullif not found.intReturns the length.org.eclipse.core.runtime.IPathReturns the absolute path in the local file system to this reference, or null if no path can be determined.intReturns the offset.org.eclipse.core.runtime.IPathgetPath()Returns the full, absolute path of this reference relative to the workspace, or null if no path can be determined.org.eclipse.core.resources.IProjectReturns the project.org.eclipse.core.runtime.IPathgetRelativeIncludePath(org.eclipse.core.resources.IProject project) Gets the path for this location, relative to one of the given project's include paths.org.eclipse.core.runtime.IPathgetRelativePath(org.eclipse.core.runtime.IPath relativeToPath) Gets the path for this location, relative to the given path.org.eclipse.core.resources.IResourceReturns the resource.Returns a translation unit for this location.Returns the working copy.inthashCode()booleantoString()
-
Field Details
-
offsetIsLineNumber
public boolean offsetIsLineNumber
-
-
Constructor Details
-
TypeReference
public TypeReference(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject project, int offset, int length) -
TypeReference
public TypeReference(org.eclipse.core.resources.IResource resource, org.eclipse.core.resources.IProject project, int offset, int length) -
TypeReference
public TypeReference(IWorkingCopy workingCopy, org.eclipse.core.resources.IProject project, int offset, int length) -
TypeReference
public TypeReference(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject project) -
TypeReference
public TypeReference(org.eclipse.core.resources.IResource resource, org.eclipse.core.resources.IProject project) -
TypeReference
-
-
Method Details
-
getPath
public org.eclipse.core.runtime.IPath getPath()Description copied from interface:ITypeReferenceReturns the full, absolute path of this reference relative to the workspace, or null if no path can be determined.- Specified by:
getPathin interfaceITypeReference
-
getLocation
public org.eclipse.core.runtime.IPath getLocation()Description copied from interface:ITypeReferenceReturns the absolute path in the local file system to this reference, or null if no path can be determined.- Specified by:
getLocationin interfaceITypeReference
-
getResource
public org.eclipse.core.resources.IResource getResource()Description copied from interface:ITypeReferenceReturns the resource.- Specified by:
getResourcein interfaceITypeReference
-
getWorkingCopy
Description copied from interface:ITypeReferenceReturns the working copy.- Specified by:
getWorkingCopyin interfaceITypeReference
-
getProject
public org.eclipse.core.resources.IProject getProject()Description copied from interface:ITypeReferenceReturns the project.- Specified by:
getProjectin interfaceITypeReference
-
getTranslationUnit
Description copied from interface:ITypeReferenceReturns a translation unit for this location.- Specified by:
getTranslationUnitin interfaceITypeReference
-
getCElements
Description copied from interface:ITypeReferenceReturns the CElements located at the stored offset and length, ornullif not found.- Specified by:
getCElementsin interfaceITypeReference
-
getOffset
public int getOffset()Description copied from interface:ITypeReferenceReturns the offset.- Specified by:
getOffsetin interfaceITypeReference
-
getLength
public int getLength()Description copied from interface:ITypeReferenceReturns the length.- Specified by:
getLengthin interfaceITypeReference
-
getRelativeIncludePath
public org.eclipse.core.runtime.IPath getRelativeIncludePath(org.eclipse.core.resources.IProject project) Description copied from interface:ITypeReferenceGets the path for this location, relative to one of the given project's include paths.- Specified by:
getRelativeIncludePathin interfaceITypeReference- Parameters:
project- the project to use as a reference.- Returns:
- The path to this location, relative to the longest matching include path in the given project.
-
getRelativePath
public org.eclipse.core.runtime.IPath getRelativePath(org.eclipse.core.runtime.IPath relativeToPath) Description copied from interface:ITypeReferenceGets the path for this location, relative to the given path.- Specified by:
getRelativePathin interfaceITypeReference- Parameters:
relativeToPath- the path to use as a reference.- Returns:
- The path to this location, relative to the given path.
-
toString
-
hashCode
public int hashCode() -
equals
-
isLineNumber
public boolean isLineNumber()- Specified by:
isLineNumberin interfaceITypeReference
-