Class SingleHiddenRegionFormatter
- java.lang.Object
-
- org.eclipse.xtext.formatting2.internal.AbstractHiddenRegionFormatter
-
- org.eclipse.xtext.formatting2.internal.SingleHiddenRegionFormatter
-
- All Implemented Interfaces:
IHiddenRegionFormatter
public class SingleHiddenRegionFormatter 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 SingleHiddenRegionFormatter(IHiddenRegionFormatting formatting)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
autowrap()
Configure autowrap.void
autowrap(int triggerLength)
Configure autowrap.FormatterRequest
getRequest()
Returns teh current formatter request and allows to read configuration settings.void
indent()
void
noAutowrap()
Suppresses auto wrap in this hidden region.void
noIndentation()
Resets the indentation level to zero.void
setNewLines(int minNewLines, int defaultNewLines, int maxNewLines)
Configures the given new lines for this hidden region.void
setOnAutowrap(IAutowrapFormatter formatter)
Callback if autowrapping was applied.void
setPriority(int priority)
Sets the priority of this formatting configuration.void
setSpace(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
-
SingleHiddenRegionFormatter
public SingleHiddenRegionFormatter(IHiddenRegionFormatting formatting)
-
-
Method Detail
-
autowrap
public void autowrap()
Description copied from interface:IHiddenRegionFormatter
Configure autowrap. Same asautowrap(0)
.
-
autowrap
public void autowrap(int triggerLength)
Description copied from interface:IHiddenRegionFormatter
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.
-
getRequest
public FormatterRequest getRequest()
Description copied from interface:IHiddenRegionFormatter
Returns teh current formatter request and allows to read configuration settings.
-
indent
public void indent()
-
noAutowrap
public void noAutowrap()
Description copied from interface:IHiddenRegionFormatter
Suppresses auto wrap in this hidden region.
-
noIndentation
public void noIndentation()
Description copied from interface:IHiddenRegionFormatter
Resets the indentation level to zero.
-
setNewLines
public void setNewLines(int minNewLines, int defaultNewLines, int maxNewLines)
Description copied from interface:IHiddenRegionFormatter
Configures the given new lines for this hidden region. Keeps the current configuration if it is in the valid boundaries ofminNewLines
andmaxNewLines
. AppliesdefaultNewLines
otherwise.
-
setOnAutowrap
public void setOnAutowrap(IAutowrapFormatter formatter)
Description copied from interface:IHiddenRegionFormatter
Callback if autowrapping was applied.
-
setPriority
public void setPriority(int priority)
Description copied from interface:IHiddenRegionFormatter
Sets 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:IHiddenRegionFormatter
The given space is used for this hidden region.
-
-