Interface IHiddenRegion
-
- All Superinterfaces:
java.lang.Comparable<ITextSegment>,ISequentialRegion,org.eclipse.xtext.util.ITextRegion,ITextSegment
- All Known Implementing Classes:
AbstractHiddenRegion,NodeHiddenRegion,StringHiddenRegion
public interface IHiddenRegion extends ISequentialRegion
Represents and groups all
IWhitespaceandcommentsbetween twosemantic regions. May be empty.- Since:
- 2.8
- See Also:
IComment,IWhitespace,ISemanticRegion,ITextRegionAccess
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description booleancontainsComment()java.util.List<ITextSegment>getAlternatingMergedSpaceAndComments()java.util.List<ITextSegment>getMergedSpaces()java.util.List<IHiddenRegionPart>getParts()booleanisUndefined()-
Methods inherited from interface org.eclipse.xtext.formatting2.regionaccess.ISequentialRegion
getNextHiddenRegion, getNextSemanticRegion, getNextSequentialRegion, getPreviousHiddenRegion, getPreviousSemanticRegion, getPreviousSequentialRegion, immediatelyFollowing, immediatelyPreceding
-
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
-
-
-
-
Method Detail
-
containsComment
boolean containsComment()
- Returns:
- true, if
getParts()contains at least oneIComment.
-
getParts
java.util.List<IHiddenRegionPart> getParts()
- Returns:
- all
white spacesandcommentsthat belong to thisIHiddenRegion.
-
isUndefined
boolean isUndefined()
- Returns:
- true, if there is no information about whitespace in this
IHiddenRegion. This is the case if there is no node model for this HiddenRegion. There may be no node model during serialization if a semantic model has been constructed or modified programmatically.
-
getAlternatingMergedSpaceAndComments
java.util.List<ITextSegment> getAlternatingMergedSpaceAndComments()
- Returns:
- returns a list that starts with whitespace, ends with whitespace and contains a sequence of strictly alternating whitespace- and comment-regions.
-
getMergedSpaces
java.util.List<ITextSegment> getMergedSpaces()
-
-