io.sarl.lang.formatting2
Class SARLFormatter
All Superinterfaces:
org.eclipse.xtext.formatting2.IFormatter2
class SARLFormatter
extends java.lang.Object
This class contains custom formatting description.

Developers: for avoiding formatting conflicts between two keywords, try to avoid "surounding" and use only "prepend".

The FormatterFacade provides a convinient API for formatting strings.
Maven Group Identifier:
io.sarl.lang
Maven Artifact Identifier:
compiler
See:
FormatterFacade
Field Summary
Modifier and type Field and description
public static val java.lang.String COMMENT_NAME
Name to use for injected comments.
public static val java.lang.String COMMENT_PREFIX_NAME
Name to use for injected comment prefix.
Constructor Summary
Constructor and description
new
Action Summary
Modifier and type Action and description
protected void _format(SarlAgent,IFormattableDocument)
Format the given SARL agent.
protected void _format(SarlBehavior,IFormattableDocument)
Format the given SARL behavior.
protected void _format(SarlBehaviorUnit,IFormattableDocument)
Format a behavior unit.
protected void _format(SarlCapacity,IFormattableDocument)
Format the given SARL capacity.
protected void _format(SarlCapacityUses,IFormattableDocument)
Format a capacity use.
protected void _format(SarlEvent,IFormattableDocument)
Format the given SARL event.
protected void _format(SarlRequiredCapacity,IFormattableDocument)
Format a required capacity.
protected void _format(SarlSkill,IFormattableDocument)
Format the given SARL skill.
protected void _format(Object,IFormattableDocument)
protected void _format(XtendConstructor,IFormattableDocument)
protected void _format(XtendField,IFormattableDocument)
protected void _format(XtendFunction,IFormattableDocument)
protected void _format(XtendParameter,IFormattableDocument)
protected void _format(JvmFormalParameter,IFormattableDocument)
protected void _format(XAnnotation,IFormattableDocument)
protected void _format(XBlockExpression,IFormattableDocument)
protected void _format(XForLoopExpression,IFormattableDocument)
protected void _format(XVariableDeclaration,IFormattableDocument)
org.eclipse.xtext.formatting2.ITextReplacer createCommentReplacer(IComment)
void format(Object,IFormattableDocument)
protected org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion formatBody(XtendTypeDeclaration,IFormattableDocument)
protected void formatCommaSeparatedList(Collection<E>,IFormattableDocument)
Format a list of comma separated elements.
Field Details
COMMENT_NAME
public static val COMMENT_NAME : java.lang.String = "io.sarl.lang.formatting2.COMMENT_TO_FORMAT"
Name to use for injected comments.
COMMENT_PREFIX_NAME
public static val COMMENT_PREFIX_NAME : java.lang.String = "io.sarl.lang.formatting2.COMMENT_PREFIX"
Name to use for injected comment prefix.
Constructor Details
new
new
Action Details
_format(SarlAgent,IFormattableDocument)
protected def _format(SarlAgent,IFormattableDocument)
Format the given SARL agent.
Parameters:
agent - the SARL component.
document - the document.
_format(SarlBehavior,IFormattableDocument)
protected def _format(SarlBehavior,IFormattableDocument)
Format the given SARL behavior.
Parameters:
behavior - the SARL component.
document - the document.
_format(SarlBehaviorUnit,IFormattableDocument)
protected def _format(SarlBehaviorUnit,IFormattableDocument)
Format a behavior unit.
Parameters:
behaviorUnit - the behavior unit.
document - the document.
_format(SarlCapacity,IFormattableDocument)
protected def _format(SarlCapacity,IFormattableDocument)
Format the given SARL capacity.
Parameters:
capacity - the SARL component.
document - the document.
_format(SarlCapacityUses,IFormattableDocument)
protected def _format(SarlCapacityUses,IFormattableDocument)
Format a capacity use.
Parameters:
capacityUses - the capacity uses.
document - the document.
_format(SarlEvent,IFormattableDocument)
protected def _format(SarlEvent,IFormattableDocument)
Format the given SARL event.
Parameters:
event - the SARL component.
document - the document.
_format(SarlRequiredCapacity,IFormattableDocument)
protected def _format(SarlRequiredCapacity,IFormattableDocument)
Format a required capacity.
Parameters:
requiredCapacity - the element ot format.
document - the document.
_format(SarlSkill,IFormattableDocument)
protected def _format(SarlSkill,IFormattableDocument)
Format the given SARL skill.
Parameters:
skill - the SARL component.
document - the document.
_format(Object,IFormattableDocument)
protected def _format(Object,IFormattableDocument)
_format(XtendConstructor,IFormattableDocument)
protected def _format(XtendConstructor,IFormattableDocument)
_format(XtendField,IFormattableDocument)
protected def _format(XtendField,IFormattableDocument)
_format(XtendFunction,IFormattableDocument)
protected def _format(XtendFunction,IFormattableDocument)
_format(XtendParameter,IFormattableDocument)
protected def _format(XtendParameter,IFormattableDocument)
_format(JvmFormalParameter,IFormattableDocument)
protected def _format(JvmFormalParameter,IFormattableDocument)
_format(XAnnotation,IFormattableDocument)
protected def _format(XAnnotation,IFormattableDocument)
_format(XBlockExpression,IFormattableDocument)
protected def _format(XBlockExpression,IFormattableDocument)
_format(XForLoopExpression,IFormattableDocument)
protected def _format(XForLoopExpression,IFormattableDocument)
_format(XVariableDeclaration,IFormattableDocument)
protected def _format(XVariableDeclaration,IFormattableDocument)
createCommentReplacer(IComment)
def createCommentReplacer(IComment) : org.eclipse.xtext.formatting2.ITextReplacer
format(Object,IFormattableDocument)
def format(Object,IFormattableDocument)
formatBody(XtendTypeDeclaration,IFormattableDocument)
protected def formatBody(XtendTypeDeclaration,IFormattableDocument) : org.eclipse.xtext.formatting2.regionaccess.ISemanticRegion
formatCommaSeparatedList(Collection<E>,IFormattableDocument)
protected def formatCommaSeparatedList(Collection<E>,IFormattableDocument)
Format a list of comma separated elements.

This function does not considerer opening and closing delimiters, as formatCommaSeparatedList(Collection, ISemanticRegion, ISemanticRegion, IFormattableDocument).
Parameters:
elements - the elements to format.
document - the document.