public interface ISourceElementExtension extends ISourceElement
ISourceElement
with a number of default methods.
This interface is not intended to be referenced for purposes other than extension.
Modifier and Type | Method and Description |
---|---|
default ISourceElement |
getSourceElementAt(int position,
ISnapshot base)
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. |
default ISourceElementInfo |
getSourceElementInfo()
Returns an object holding cached structure and properties for this element.
|
default ISourceElement getSourceElementAt(int position, ISnapshot base) throws org.eclipse.core.runtime.CoreException
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.position
- a source position (0-based)base
- a snapshot on which the given position is based,
or null
if the snapshot is unknown or does not matternull
if none (including this element itself)org.eclipse.core.runtime.CoreException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourceStaleSnapshotException
- if snapshot inconsistency is detected,
i.e., this element's current structure and properties are based on
a different snapshotdefault ISourceElementInfo getSourceElementInfo() throws org.eclipse.core.runtime.CoreException
ISourceElementInfo
for this element
(never null
)org.eclipse.core.runtime.CoreException
- if this element does not exist or if an
exception occurs while accessing its corresponding resourceCopyright (c) 2014, 2020 1C-Soft LLC and others. Made available under the Eclipse Public License 2.0