public class TypeReference extends Object implements ITypeReference
Modifier and Type | Field and Description |
---|---|
boolean |
offsetIsLineNumber |
Constructor and Description |
---|
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) |
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(IWorkingCopy workingCopy,
org.eclipse.core.resources.IProject project) |
TypeReference(IWorkingCopy workingCopy,
org.eclipse.core.resources.IProject project,
int offset,
int length) |
Modifier and Type | Method and Description |
---|---|
boolean |
equals(Object obj) |
ICElement[] |
getCElements()
Returns the CElements located at the stored offset and length,
or
null if not found. |
int |
getLength()
Returns the length.
|
org.eclipse.core.runtime.IPath |
getLocation()
Returns the absolute path in the local file system
to this reference, or null if no path can be
determined.
|
int |
getOffset()
Returns the offset.
|
org.eclipse.core.runtime.IPath |
getPath()
Returns the full, absolute path of this reference
relative to the workspace, or null if no path can be
determined.
|
org.eclipse.core.resources.IProject |
getProject()
Returns the project.
|
org.eclipse.core.runtime.IPath |
getRelativeIncludePath(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.IPath |
getRelativePath(org.eclipse.core.runtime.IPath relativeToPath)
Gets the path for this location, relative to the
given path.
|
org.eclipse.core.resources.IResource |
getResource()
Returns the resource.
|
ITranslationUnit |
getTranslationUnit()
Returns a translation unit for this location.
|
IWorkingCopy |
getWorkingCopy()
Returns the working copy.
|
int |
hashCode() |
boolean |
isLineNumber() |
String |
toString() |
public TypeReference(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject project, int offset, int length)
public TypeReference(org.eclipse.core.resources.IResource resource, org.eclipse.core.resources.IProject project, int offset, int length)
public TypeReference(IWorkingCopy workingCopy, org.eclipse.core.resources.IProject project, int offset, int length)
public TypeReference(org.eclipse.core.runtime.IPath path, org.eclipse.core.resources.IProject project)
public TypeReference(org.eclipse.core.resources.IResource resource, org.eclipse.core.resources.IProject project)
public TypeReference(IWorkingCopy workingCopy, org.eclipse.core.resources.IProject project)
public org.eclipse.core.runtime.IPath getPath()
ITypeReference
getPath
in interface ITypeReference
public org.eclipse.core.runtime.IPath getLocation()
ITypeReference
getLocation
in interface ITypeReference
public org.eclipse.core.resources.IResource getResource()
ITypeReference
getResource
in interface ITypeReference
public IWorkingCopy getWorkingCopy()
ITypeReference
getWorkingCopy
in interface ITypeReference
public org.eclipse.core.resources.IProject getProject()
ITypeReference
getProject
in interface ITypeReference
public ITranslationUnit getTranslationUnit()
ITypeReference
getTranslationUnit
in interface ITypeReference
public ICElement[] getCElements()
ITypeReference
null
if not found.getCElements
in interface ITypeReference
public int getOffset()
ITypeReference
getOffset
in interface ITypeReference
public int getLength()
ITypeReference
getLength
in interface ITypeReference
public org.eclipse.core.runtime.IPath getRelativeIncludePath(org.eclipse.core.resources.IProject project)
ITypeReference
getRelativeIncludePath
in interface ITypeReference
project
- the project to use as a reference.public org.eclipse.core.runtime.IPath getRelativePath(org.eclipse.core.runtime.IPath relativeToPath)
ITypeReference
getRelativePath
in interface ITypeReference
relativeToPath
- the path to use as a reference.public boolean isLineNumber()
isLineNumber
in interface ITypeReference
Copyright (c) IBM Corp. and others 2004, 2020. All Rights Reserved.