public abstract class AbstractRegionAccess extends AbstractTextSegment implements ITextRegionAccess
Modifier and Type | Class and Description |
---|---|
static class |
AbstractRegionAccess.Builder |
EMPTY_REGION
Modifier | Constructor and Description |
---|---|
protected |
AbstractRegionAccess(AbstractRegionAccess.Builder builder) |
Modifier and Type | Method and Description |
---|---|
IHiddenRegion |
getFirstRegionInFile() |
AbstractElement |
getInvokingGrammarElement(org.eclipse.emf.ecore.EObject obj) |
int |
getOffset() |
XtextResource |
getResource() |
abstract java.lang.String |
getText() |
java.lang.String |
getText(int offset,
int length) |
ITextRegionAccess |
getTextRegionAccess() |
ISemanticRegion |
immediatelyFollowingKeyword(org.eclipse.emf.ecore.EObject owner,
java.lang.String keyword) |
ISemanticRegion |
immediatelyFollowingKeyword(ISequentialRegion token,
java.lang.String keyword) |
ISemanticRegion |
immediatelyPrecedingKeyword(org.eclipse.emf.ecore.EObject owner) |
ISemanticRegion |
immediatelyPrecedingKeyword(org.eclipse.emf.ecore.EObject owner,
java.lang.String keyword) |
ISemanticRegion |
immediatelyPrecedingKeyword(ISequentialRegion token) |
ISemanticRegion |
immediatelyPrecedingKeyword(ISequentialRegion token,
java.lang.String keyword) |
protected java.util.Map<? extends org.eclipse.emf.ecore.EObject,? extends AbstractEObjectTokens> |
initMap() |
boolean |
isMultiline(org.eclipse.emf.ecore.EObject object) |
IHiddenRegion |
leadingHiddenRegion(org.eclipse.emf.ecore.EObject owner) |
ITextSegment |
regionForEObject(org.eclipse.emf.ecore.EObject object) |
ISemanticRegion |
regionForFeature(org.eclipse.emf.ecore.EObject owner,
org.eclipse.emf.ecore.EStructuralFeature feat) |
ISemanticRegion |
regionForKeyword(org.eclipse.emf.ecore.EObject owner,
java.lang.String keyword) |
ISemanticRegion |
regionForRuleCallTo(org.eclipse.emf.ecore.EObject owner,
AbstractRule rule) |
java.util.List<ISemanticRegion> |
regionsForKeywords(org.eclipse.emf.ecore.EObject owner,
java.lang.String... keywords) |
java.util.List<ISemanticRegion> |
regionsForRuleCallsTo(org.eclipse.emf.ecore.EObject owner,
AbstractRule... rule) |
java.lang.String |
toString() |
IHiddenRegion |
trailingHiddenRegion(org.eclipse.emf.ecore.EObject owner) |
compareTo, contains, contains, equals, getEndOffset, getIndentation, getLineCount, hashCode, isMultiline, merge, splitIntoLines
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
expandRegionsByLines, hasSyntaxError, hasSyntaxError, indentationRegion
getLength
protected AbstractRegionAccess(AbstractRegionAccess.Builder builder)
public IHiddenRegion getFirstRegionInFile()
getFirstRegionInFile
in interface ITextRegionAccess
IHiddenRegion
inside the linked list of alternating IHiddenRegion
s and
ISemanticRegion
s.public AbstractElement getInvokingGrammarElement(org.eclipse.emf.ecore.EObject obj)
getInvokingGrammarElement
in interface ITextRegionAccess
RuleCall
or the assigned Action
that led to the construction of this EObject.public int getOffset()
getOffset
in interface ITextRegion
public XtextResource getResource()
getResource
in interface ITextRegionAccess
public abstract java.lang.String getText()
getText
in interface ITextSegment
getText
in class AbstractTextSegment
public java.lang.String getText(int offset, int length)
getText
in interface ITextRegionAccess
public ITextRegionAccess getTextRegionAccess()
getTextRegionAccess
in interface ITextSegment
public ISemanticRegion immediatelyFollowingKeyword(org.eclipse.emf.ecore.EObject owner, java.lang.String keyword)
immediatelyFollowingKeyword
in interface ITextRegionAccess
public ISemanticRegion immediatelyFollowingKeyword(ISequentialRegion token, java.lang.String keyword)
immediatelyFollowingKeyword
in interface ITextRegionAccess
public ISemanticRegion immediatelyPrecedingKeyword(org.eclipse.emf.ecore.EObject owner)
immediatelyPrecedingKeyword
in interface ITextRegionAccess
public ISemanticRegion immediatelyPrecedingKeyword(org.eclipse.emf.ecore.EObject owner, java.lang.String keyword)
immediatelyPrecedingKeyword
in interface ITextRegionAccess
public ISemanticRegion immediatelyPrecedingKeyword(ISequentialRegion token)
immediatelyPrecedingKeyword
in interface ITextRegionAccess
public ISemanticRegion immediatelyPrecedingKeyword(ISequentialRegion token, java.lang.String keyword)
immediatelyPrecedingKeyword
in interface ITextRegionAccess
protected java.util.Map<? extends org.eclipse.emf.ecore.EObject,? extends AbstractEObjectTokens> initMap()
public boolean isMultiline(org.eclipse.emf.ecore.EObject object)
isMultiline
in interface ITextRegionAccess
public ITextSegment regionForEObject(org.eclipse.emf.ecore.EObject object)
regionForEObject
in interface ITextRegionAccess
public IHiddenRegion leadingHiddenRegion(org.eclipse.emf.ecore.EObject owner)
leadingHiddenRegion
in interface ITextRegionAccess
IHiddenRegion
that precedes the EObject's first ISemanticRegion
.ITextRegionAccess.trailingHiddenRegion(EObject)
public ISemanticRegion regionForFeature(org.eclipse.emf.ecore.EObject owner, org.eclipse.emf.ecore.EStructuralFeature feat)
regionForFeature
in interface ITextRegionAccess
ISemanticRegion
that represents the value of owner.eGet(feature). May be null.public ISemanticRegion regionForKeyword(org.eclipse.emf.ecore.EObject owner, java.lang.String keyword)
regionForKeyword
in interface ITextRegionAccess
ISemanticRegion
that represent 'keyword' and directly belongs to the provided
'EObject'. Keywords of child-EObjects are not considered. May be null.public ISemanticRegion regionForRuleCallTo(org.eclipse.emf.ecore.EObject owner, AbstractRule rule)
regionForRuleCallTo
in interface ITextRegionAccess
ISemanticRegion
that represent a RuleCall to the provided AbstractRule and directly
belongs to the provided 'EObject'. RuleCalls of child-EObjects are not considered. May be null.public java.util.List<ISemanticRegion> regionsForKeywords(org.eclipse.emf.ecore.EObject owner, java.lang.String... keywords)
regionsForKeywords
in interface ITextRegionAccess
ISemanticRegion
s that represent one of the provided 'keyword's and directly belong to the
provided 'EObject'. Keywords of child-EObjects are not considered.public java.util.List<ISemanticRegion> regionsForRuleCallsTo(org.eclipse.emf.ecore.EObject owner, AbstractRule... rule)
regionsForRuleCallsTo
in interface ITextRegionAccess
ISemanticRegion
s that represent a RuleCall to one of the provided AbstractRules and directly
belong to the provided 'EObject'. RuleCalls of child-EObjects are not considered. May be null.public java.lang.String toString()
toString
in class java.lang.Object
public IHiddenRegion trailingHiddenRegion(org.eclipse.emf.ecore.EObject owner)
trailingHiddenRegion
in interface ITextRegionAccess
IHiddenRegion
that follows after the EObject's last ISemanticRegion
.ITextRegionAccess.leadingHiddenRegion(EObject)