public String setOrAdd(final Action it) { String _xifexpression = null; String _operator = it.getOperator(); boolean _equals = Objects.equal(_operator, "+="); if (_equals) { _xifexpression = "add"; } else { _xifexpression = "set"; } return _xifexpression; }
public static boolean isMultipleAssignment(Action a) { return "+=".equals(a.getOperator()); }
protected String getAssignmentOperator() { if (element instanceof Action) return ((Action) element).getOperator(); Assignment ass = GrammarUtil.containingAssignment(element); if (ass != null) return ass.getOperator(); return null; }
@Override public String caseAction(Action object) { String f = object.getFeature(); String o = object.getOperator(); o = (o == null) ? "" : o; String result; if (showActionAsRuleCall && f != null) { result = f + o + new Context2NameFunction().apply(object) + card(object); } else { String t = object.getType() != null && object.getType().getClassifier() != null ? object.getType() .getClassifier().getName() : "null"; t = (t == null) ? "" : t; f = (f == null) ? "" : "." + f; result = "{" + t + f + o + "}" + card(object); } return addQualified(result, object); }