Package org.eclipse.xtext.formatting2
Interface IHiddenRegionFormatter
-
- All Known Implementing Classes:
AbstractHiddenRegionFormatter,DoubleHiddenRegionFormatter,SingleHiddenRegionFormatter
public interface IHiddenRegionFormatterAnIHiddenRegionFormatteris used to build a formatting setting for a hidden region.- Since:
- 2.7
- See Also:
IHiddenRegionFormatting- Noextend:
- This interface is not intended to be extended by clients.
- Noimplement:
- This interface is not intended to be implemented by clients.
-
-
Field Summary
Fields Modifier and Type Field Description static intHIGH_PRIORITYstatic intLOW_PRIORITYstatic intNORMAL_PRIORITY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidautowrap()Configure autowrap.voidautowrap(int triggerLength)Configure autowrap.FormatterRequestgetRequest()Returns teh current formatter request and allows to read configuration settings.voidhighPriority()When merging, treat this configuration with a high priority.voidindent()voidlowPriority()When merging, treat this configuration with a low priority.voidnewLine()Forces a line break in this hidden region.voidnoAutowrap()Suppresses auto wrap in this hidden region.voidnoIndentation()Resets the indentation level to zero.voidnoSpace()Format this hidden region with using no space (zero characters).voidoneSpace()One space is added at this hidden region.voidsetNewLines(int newLines)Forces the number of newlines in this hidden region.voidsetNewLines(int minNewLines, int defaultNewLines, int maxNewLines)Configures the given new lines for this hidden region.voidsetOnAutowrap(IAutowrapFormatter formatter)Callback if autowrapping was applied.voidsetPriority(int priority)Sets the priority of this formatting configuration.voidsetSpace(java.lang.String space)The given space is used for this hidden region.
-
-
-
Field Detail
-
HIGH_PRIORITY
static final int HIGH_PRIORITY
- See Also:
- Constant Field Values
-
LOW_PRIORITY
static final int LOW_PRIORITY
- See Also:
- Constant Field Values
-
NORMAL_PRIORITY
static final int NORMAL_PRIORITY
- See Also:
- Constant Field Values
-
-
Method Detail
-
autowrap
void autowrap()
Configure autowrap. Same asautowrap(0).
-
autowrap
void autowrap(int triggerLength)
Configure autowrap. The triggerLength allows to shift the wrapping point beyond its actual position in the file. If a line has multiple wrapping points it will scan backwards for the first autowrapped region. The triggerLength moves this region logically such it will be found earlier.
-
noAutowrap
void noAutowrap()
Suppresses auto wrap in this hidden region.
-
setOnAutowrap
void setOnAutowrap(IAutowrapFormatter formatter)
Callback if autowrapping was applied.
-
getRequest
FormatterRequest getRequest()
Returns teh current formatter request and allows to read configuration settings.
-
highPriority
void highPriority()
When merging, treat this configuration with a high priority.- See Also:
lowPriority(),HIGH_PRIORITY
-
lowPriority
void lowPriority()
When merging, treat this configuration with a low priority.- See Also:
highPriority(),LOW_PRIORITY
-
setPriority
void setPriority(int priority)
Sets the priority of this formatting configuration. Used when two configurations should be merged. The priority of this formatter; the default value isNORMAL_PRIORITY.
-
noIndentation
void noIndentation()
Resets the indentation level to zero.
-
indent
void indent()
-
newLine
void newLine()
Forces a line break in this hidden region. Same assetNewLines(1).
-
setNewLines
void setNewLines(int newLines)
Forces the number of newlines in this hidden region. Same assetNewLines(nl, nl, nl)
-
setNewLines
void setNewLines(int minNewLines, int defaultNewLines, int maxNewLines)Configures the given new lines for this hidden region. Keeps the current configuration if it is in the valid boundaries ofminNewLinesandmaxNewLines. AppliesdefaultNewLinesotherwise.
-
noSpace
void noSpace()
Format this hidden region with using no space (zero characters). Same assetSpace("").
-
oneSpace
void oneSpace()
One space is added at this hidden region. Same assetSpace(" ").
-
setSpace
void setSpace(java.lang.String space)
The given space is used for this hidden region.
-
-