Interface ICallLocation
- All Superinterfaces:
org.eclipse.core.runtime.IAdaptable
- All Known Implementing Classes:
CallLocation
public interface ICallLocation
extends org.eclipse.core.runtime.IAdaptable
Represents a call and the associated location.
-
Field Summary
Modifier and TypeFieldDescriptionstatic final int
Indicates that the line number of the call is unknown. -
Method Summary
Modifier and TypeMethodDescriptiondefault <T> T
getAdapter
(Class<T> adapter) Returns the underlying model element representing the callee.Returns the underlying model element representing the caller.Returns the text range of the call.Returns the textual representation of the call.default CallTextInfo
Returns the call text info for this call location.int
Returns the line number of the call.Returns the snapshot on which this call location is based.
-
Field Details
-
UNKOWN_LINE_NUMBER
static final int UNKOWN_LINE_NUMBERIndicates that the line number of the call is unknown.- See Also:
-
-
Method Details
-
getAdapter
Default implementation of this method in
ICallLocation
returns thecaller
if it is an instance of the given class. As a fallback, it delegates to the Platform's adapter manager.- Specified by:
getAdapter
in interfaceorg.eclipse.core.runtime.IAdaptable
-
getCaller
Object getCaller()Returns the underlying model element representing the caller.- Returns:
- the caller element, or
null
if unknown
-
getCallee
Object getCallee()Returns the underlying model element representing the callee.- Returns:
- the callee element, or
null
if unknown
-
getCallTextInfo
Returns the call text info for this call location.Default implementation returns a new instance of the call text info based on the information from this call location.
- Returns:
- the call text info (never
null
)
-
getCallText
String getCallText()Returns the textual representation of the call.- Returns:
- the text of the call (never
null
)
-
getCallRange
TextRange getCallRange()Returns the text range of the call.- Returns:
- the text range of the call, or
null
if unknown
-
getLineNumber
int getLineNumber()Returns the line number of the call. Note that the first line has the line number 0.- Returns:
- the zero-based line number of the call,
or
UNKOWN_LINE_NUMBER
if unknown
-
getSnapshot
ISnapshot getSnapshot()Returns the snapshot on which this call location is based.- Returns:
- the base snapshot for the call location,
or
null
if unknown
-