Class NodeHidden
- java.lang.Object
-
- org.eclipse.xtext.formatting2.regionaccess.internal.AbstractTextSegment
-
- org.eclipse.xtext.formatting2.regionaccess.internal.NodeRegion
-
- org.eclipse.xtext.formatting2.regionaccess.internal.NodeHidden
-
- All Implemented Interfaces:
java.lang.Comparable<ITextSegment>,IHiddenRegionPart,ITextSegment,org.eclipse.xtext.util.ITextRegion
- Direct Known Subclasses:
NodeComment,NodeWhitespace
public class NodeHidden extends NodeRegion implements IHiddenRegionPart
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedNodeHidden(NodeHiddenRegion hidden, INode node)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description HiddenRegionPartAssociationgetAssociation()AbstractRulegetGrammarElement()IHiddenRegiongetHiddenRegion()IHiddenRegionPartgetNextHiddenPart()IHiddenRegionPartgetPreviousHiddenPart()protected voidsetAssociation(HiddenRegionPartAssociation association)-
Methods inherited from class org.eclipse.xtext.formatting2.regionaccess.internal.NodeRegion
getLength, getNode, getOffset, getTextRegionAccess, toString
-
Methods inherited from class org.eclipse.xtext.formatting2.regionaccess.internal.AbstractTextSegment
compareTo, contains, contains, equals, getEndOffset, getLineCount, getLineRegions, getText, hashCode, isMultiline, merge, replaceWith
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.eclipse.xtext.util.ITextRegion
contains, contains, getLength, getOffset
-
Methods inherited from interface org.eclipse.xtext.formatting2.regionaccess.ITextSegment
getEndOffset, getLineCount, getLineRegions, getText, getTextRegionAccess, isMultiline, merge, replaceWith
-
-
-
-
Constructor Detail
-
NodeHidden
protected NodeHidden(NodeHiddenRegion hidden, INode node)
-
-
Method Detail
-
getGrammarElement
public AbstractRule getGrammarElement()
- Specified by:
getGrammarElementin interfaceIHiddenRegionPart- Overrides:
getGrammarElementin classNodeRegion- Returns:
- The grammar element the parser used to parse this
IWhitespaceorIComment. This should be anTerminalRulefor tokens the grammar defined as 'hidden'. May be another grammar element if the construction of theITextRegionAccesshas been customized.
-
getHiddenRegion
public IHiddenRegion getHiddenRegion()
- Specified by:
getHiddenRegionin interfaceIHiddenRegionPart- Returns:
- the
IHiddenRegionthisIWhitespaceorICommentis a member of.
-
getNextHiddenPart
public IHiddenRegionPart getNextHiddenPart()
- Specified by:
getNextHiddenPartin interfaceIHiddenRegionPart- Returns:
- The next following
IWhitespaceorICommentinside the sameIHiddenRegion. Null if the currentIHiddenRegionPartis the last element inside itsIHiddenRegion.
-
getPreviousHiddenPart
public IHiddenRegionPart getPreviousHiddenPart()
- Specified by:
getPreviousHiddenPartin interfaceIHiddenRegionPart- Returns:
- The leading
IWhitespaceorICommentinside the sameIHiddenRegion. Null if the currentIHiddenRegionPartis the first element inside itsIHiddenRegion.
-
setAssociation
protected void setAssociation(HiddenRegionPartAssociation association)
-
getAssociation
public HiddenRegionPartAssociation getAssociation()
- Specified by:
getAssociationin interfaceIHiddenRegionPart- Returns:
- A hint whether the whitespace or comment belongs to the previous or next semantic element or neither of them.
- See Also:
for custom behaviour.
-
-