Ejemplo n.º 1
0
 @Override
 public Boolean caseElseIfCondition(ElseIfCondition object) {
   popIndentationTwice();
   RichStringElseIf elseIf = object.getRichStringElseIf();
   acceptor.acceptElseIfCondition(elseIf.getIf());
   computeNextPart(object);
   pushTemplateIndentationTwice(computeInitialIndentation((RichString) elseIf.getThen()));
   return Boolean.TRUE;
 }
Ejemplo n.º 2
0
 @Override
 public Boolean caseRichStringIf(RichStringIf object) {
   IfConditionStart start = factory.createIfConditionStart();
   start.setRichStringIf(object);
   addToCurrentLine(start);
   doSwitch(object.getThen());
   for (RichStringElseIf elseIf : object.getElseIfs()) {
     ElseIfCondition elseIfStart = factory.createElseIfCondition();
     elseIfStart.setIfConditionStart(start);
     elseIfStart.setRichStringElseIf(elseIf);
     addToCurrentLine(elseIfStart);
     doSwitch(elseIf.getThen());
   }
   if (object.getElse() != null) {
     ElseStart elseStart = factory.createElseStart();
     elseStart.setIfConditionStart(start);
     addToCurrentLine(elseStart);
     doSwitch(object.getElse());
   }
   EndIf end = factory.createEndIf();
   end.setIfConditionStart(start);
   addToCurrentLine(end);
   return Boolean.TRUE;
 }