Interface ISourceElementImpl

All Superinterfaces:
IElement, IElementImpl, ISourceElement
All Known Subinterfaces:
ISourceConstructImpl, ISourceConstructImplExtension, ISourceConstructImplSupport, ISourceElementImplSupport, ISourceFileImpl, ISourceFileImplExtension, ISourceFileImplSupport
All Known Implementing Classes:
BaseSourceFile, FsSourceFile, SourceConstruct, SourceFile, WorkspaceSourceFile

public interface ISourceElementImpl extends IElementImpl, ISourceElement
All ISourceElements must implement this interface.
Restriction:
This interface is not intended to be extended by clients.
  • Method Details

    • getSourceElementAt_

      ISourceElement getSourceElementAt_(int position, IContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
      Returns the smallest element within this element that includes the given source position, or null if the given position is not within the source range of this element. If no finer grained element is found at the position, this element itself is returned.

      Implementations are encouraged to support the following standard options, which may be specified in the given context:

      • BASE_SNAPSHOT - A snapshot on which the given position is based, or null if the snapshot is unknown or does not matter.
      Parameters:
      position - a source position (0-based)
      context - the operation context (not null)
      monitor - a progress monitor, or null if progress reporting is not desired. The caller must not rely on IProgressMonitor.done() having been called by the receiver
      Returns:
      the innermost element enclosing the given source position, or null if none (including this element itself)
      Throws:
      org.eclipse.core.runtime.CoreException - if this element does not exist or if an exception occurs while accessing its corresponding resource
      StaleSnapshotException - if snapshot inconsistency is detected, i.e., this element's current structure and properties are based on a different snapshot
      org.eclipse.core.runtime.OperationCanceledException - if this method is canceled
    • getSourceElementInfo_

      ISourceElementInfo getSourceElementInfo_(IContext context, org.eclipse.core.runtime.IProgressMonitor monitor) throws org.eclipse.core.runtime.CoreException
      Returns an object holding cached structure and properties for this element.
      Parameters:
      context - the operation context (not null)
      monitor - a progress monitor, or null if progress reporting is not desired. The caller must not rely on IProgressMonitor.done() having been called by the receiver
      Returns:
      an ISourceElementInfo for this element (never null)
      Throws:
      org.eclipse.core.runtime.CoreException - if this element does not exist or if an exception occurs while accessing its corresponding resource
      org.eclipse.core.runtime.OperationCanceledException - if this method is canceled