| /* |
| * generated by Xtext 2.12.0 |
| */ |
| package org.polarsys.chess.xtext.formatting2 |
| |
| import com.google.inject.Inject |
| import org.eclipse.xtext.formatting2.AbstractFormatter2 |
| import org.eclipse.xtext.formatting2.IFormattableDocument |
| import org.polarsys.chess.xtext.flaDsl.Behaviour |
| import org.polarsys.chess.xtext.flaDsl.Expression |
| import org.polarsys.chess.xtext.services.FlaDslGrammarAccess |
| |
| class FlaDslFormatter extends AbstractFormatter2 { |
| |
| @Inject extension FlaDslGrammarAccess |
| |
| def dispatch void format(Behaviour behaviour, extension IFormattableDocument document) { |
| // TODO: format HiddenRegions around keywords, attributes, cross references, etc. |
| for (Expression expression : behaviour.getRules()) { |
| expression.format; |
| } |
| } |
| |
| def dispatch void format(Expression expression, extension IFormattableDocument document) { |
| // TODO: format HiddenRegions around keywords, attributes, cross references, etc. |
| expression.getLhs.format; |
| expression.getRhs.format; |
| } |
| |
| // TODO: implement for Lhs, Rhs, InputExpression, OutputExpression, InFailureExpr, OutFailureExpr, FailureDefinition, NoFailureDefinition |
| } |