public String getAssignmentName() { if (type != ConstraintType.ASSIGNMENT) throw new RuntimeException("Constraint '" + this + "' is not an assignment, but a " + getType()); return ((Assignment) element).getFeature(); }
private String getAssignedFeature(RuleCall call) { Assignment ass = GrammarUtil.containingAssignment(call); if (ass != null) { String result = ass.getFeature(); if (result.equals(result.toLowerCase())) result = Strings.toFirstUpper(result); return result; } return null; }
public String localVar(final Assignment it, final AbstractElement terminal) { String _feature = it.getFeature(); String _plus = ("lv_" + _feature); String _plus_1 = (_plus + "_"); int _indexOf = this.contentsAsList(GrammarUtil.containingParserRule(it)).indexOf(it); String _plus_2 = (_plus_1 + Integer.valueOf(_indexOf)); String _plus_3 = (_plus_2 + "_"); int _indexOf_1 = EcoreUtil2.eAllContentsAsList(it).indexOf(terminal); return (_plus_3 + Integer.valueOf(_indexOf_1)); }
protected String getFeatureName() { if (element instanceof Action) return ((Action) element).getFeature(); Assignment ass = GrammarUtil.containingAssignment(element); if (ass != null) return ass.getFeature(); return null; }
@Override public Boolean caseAssignment(Assignment object) { if (GrammarUtil.isMultipleAssignment(object)) return Boolean.FALSE; checkAssignment(object, object.getFeature()); if (GrammarUtil.isMultipleCardinality(object)) checkAssignment(object, object.getFeature()); return Boolean.FALSE; }
public static EReference getReference(CrossReference ref, EClass referenceOwner) { final String feature = GrammarUtil.containingAssignment(ref).getFeature(); EStructuralFeature result = referenceOwner.getEStructuralFeature(feature); if (result instanceof EReference && !((EReference) result).isContainment()) return (EReference) result; return null; }
protected String addAssignemnt(String result, AbstractElement ele) { if (!showAssignment) return result; Assignment ass = GrammarUtil.containingAssignment(ele); result = ass != null ? ass.getFeature() + ass.getOperator() + result : result; return addQualified(result, ele); }
@Override public String caseAssignment(Assignment object) { String result = object.getFeature() + object.getOperator() + " " + card(object); return addQualified(result, object); }
private String getFQFeatureName(final Assignment a) { String _firstUpper = StringExtensions.toFirstUpper(GrammarUtil.containingParserRule(a).getName()); String _plus = (_firstUpper + "_"); String _firstUpper_1 = StringExtensions.toFirstUpper(a.getFeature()); return (_plus + _firstUpper_1); }
public void accept(Keyword keyword, Object value, String token, ILeafNode node) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature); assertValue(feature, value); acceptKeyword(ass, keyword, value, token, ISemanticSequenceAcceptor.NO_INDEX, node); }
public void accept(Keyword keyword, Object value, String token, int index, ILeafNode node) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature, index); assertValue(feature, value); acceptKeyword(ass, keyword, value, token, index, node); }
public void accept(Keyword keyword, Object value, ILeafNode node) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature); assertValue(feature, value); String token = getToken(keyword, value, node); acceptKeyword(ass, keyword, value, token, ISemanticSequenceAcceptor.NO_INDEX, node); }
public void accept(Keyword keyword, Object value, int index, ILeafNode node) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature, index); assertValue(feature, value); String token = getToken(keyword, value, node); acceptKeyword(ass, keyword, value, token, index, node); }
public void accept(Keyword keyword, Object value, String token, int index) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature, index); assertValue(feature, value); ILeafNode node = getLeafNode(feature, index, index, value); acceptKeyword(ass, keyword, value, token, index, node); }
public void accept(Keyword keyword, Object value, String token) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature); assertValue(feature, value); ILeafNode node = getLeafNode(feature, value); acceptKeyword(ass, keyword, value, token, ISemanticSequenceAcceptor.NO_INDEX, node); }
public void accept(Keyword keyword, Object value) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature); assertValue(feature, value); ILeafNode node = getLeafNode(feature, value); String token = getToken(keyword, value, node); acceptKeyword(ass, keyword, value, token, ISemanticSequenceAcceptor.NO_INDEX, node); }
public void accept(Keyword keyword, Object value, int index) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature, index); assertValue(feature, value); ILeafNode node = getLeafNode(feature, index, index, value); String token = getToken(keyword, value, node); acceptKeyword(ass, keyword, value, token, index, node); }
public void accept(Keyword keyword, Object value, String token, int indexInFeature, int indexInNonTransient) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature, indexInFeature); assertIndex(feature, indexInNonTransient); assertValue(feature, value); ILeafNode node = getLeafNode(feature, indexInFeature, indexInNonTransient, value); acceptKeyword(ass, keyword, value, token, indexInFeature, node); }
public void accept(Keyword keyword) { Assignment ass = getAssignment(keyword); Object value = GrammarUtil.isBooleanAssignment(ass) ? Boolean.TRUE : keyword.getValue(); EStructuralFeature feature = getFeature(ass.getFeature()); ILeafNode node = getLeafNode(feature, value); String token = getToken(keyword, value, node); assertIndex(feature); acceptKeyword(ass, keyword, value, token, ISemanticSequenceAcceptor.NO_INDEX, node); }
public void accept(Keyword keyword, Object value, int indexInFeature, int indexInNonTransient) { Assignment ass = getAssignment(keyword); EStructuralFeature feature = getFeature(ass.getFeature()); assertIndex(feature, indexInFeature); assertIndex(feature, indexInNonTransient); assertValue(feature, value); ILeafNode node = getLeafNode(feature, indexInFeature, indexInNonTransient, value); String token = getToken(keyword, value, node); acceptKeyword(ass, keyword, value, token, indexInFeature, node); }