示例#1
0
 @Override
 public Boolean caseIfConditionStart(IfConditionStart object) {
   RichStringIf richStringIf = object.getRichStringIf();
   acceptor.acceptIfCondition(richStringIf.getIf());
   computeNextPart(object);
   pushTemplateIndentationTwice(computeInitialIndentation((RichString) richStringIf.getThen()));
   return Boolean.TRUE;
 }
示例#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;
 }