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

    Fields
    Modifier and Type
    Field
    Description
    static final int
    Indicates that the line number of the call is unknown.
  • Method Summary

    Modifier and Type
    Method
    Description
    default <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

  • Method Details

    • getAdapter

      default <T> T getAdapter(Class<T> adapter)

      Default implementation of this method in ICallLocation returns the caller if it is an instance of the given class. As a fallback, it delegates to the Platform's adapter manager.

      Specified by:
      getAdapter in interface org.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

      default CallTextInfo 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