Class DoubleHiddenRegionFormatter
- java.lang.Object
-
- org.eclipse.xtext.formatting2.internal.AbstractHiddenRegionFormatter
-
- org.eclipse.xtext.formatting2.internal.DoubleHiddenRegionFormatter
-
- All Implemented Interfaces:
IHiddenRegionFormatter
public class DoubleHiddenRegionFormatter extends AbstractHiddenRegionFormatter
- Since:
- 2.9
-
-
Field Summary
-
Fields inherited from interface org.eclipse.xtext.formatting2.IHiddenRegionFormatter
HIGH_PRIORITY, LOW_PRIORITY, NORMAL_PRIORITY
-
-
Constructor Summary
Constructors Constructor Description DoubleHiddenRegionFormatter(IHiddenRegionFormatting first, IHiddenRegionFormatting second)
-
Method Summary
All Methods Instance Methods Concrete 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.voidindent()voidnoAutowrap()Suppresses auto wrap in this hidden region.voidnoIndentation()Resets the indentation level to zero.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.-
Methods inherited from class org.eclipse.xtext.formatting2.internal.AbstractHiddenRegionFormatter
highPriority, lowPriority, newLine, noSpace, oneSpace, setNewLines
-
-
-
-
Constructor Detail
-
DoubleHiddenRegionFormatter
public DoubleHiddenRegionFormatter(IHiddenRegionFormatting first, IHiddenRegionFormatting second)
-
-
Method Detail
-
autowrap
public void autowrap()
Description copied from interface:IHiddenRegionFormatterConfigure autowrap. Same asautowrap(0).
-
autowrap
public void autowrap(int triggerLength)
Description copied from interface:IHiddenRegionFormatterConfigure 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.
-
getRequest
public FormatterRequest getRequest()
Description copied from interface:IHiddenRegionFormatterReturns teh current formatter request and allows to read configuration settings.
-
indent
public void indent()
-
noAutowrap
public void noAutowrap()
Description copied from interface:IHiddenRegionFormatterSuppresses auto wrap in this hidden region.
-
noIndentation
public void noIndentation()
Description copied from interface:IHiddenRegionFormatterResets the indentation level to zero.
-
setNewLines
public void setNewLines(int minNewLines, int defaultNewLines, int maxNewLines)Description copied from interface:IHiddenRegionFormatterConfigures the given new lines for this hidden region. Keeps the current configuration if it is in the valid boundaries ofminNewLinesandmaxNewLines. AppliesdefaultNewLinesotherwise.
-
setOnAutowrap
public void setOnAutowrap(IAutowrapFormatter formatter)
Description copied from interface:IHiddenRegionFormatterCallback if autowrapping was applied.
-
setPriority
public void setPriority(int priority)
Description copied from interface:IHiddenRegionFormatterSets the priority of this formatting configuration. Used when two configurations should be merged. The priority of this formatter; the default value isIHiddenRegionFormatter.NORMAL_PRIORITY.
-
setSpace
public void setSpace(java.lang.String space)
Description copied from interface:IHiddenRegionFormatterThe given space is used for this hidden region.
-
-