@Check @Override public void checkModifiers(XtendMember member, String memberName) { super.checkModifiers(member, memberName); }
/** Check that member feature calls have a conversion mapping. * * @param featureCall the feature call. */ @Check public void checkMemberFeatureCallMapping(XMemberFeatureCall featureCall) { doCheckMemberFeatureCallMapping(featureCall, this.typeErrorHandler2, this.featureErrorHandler); }
/** Check that member feature calls have a conversion mapping. * * @param featureCall the feature call. */ @Check public void checkMemberFeatureCallMapping(XFeatureCall featureCall) { doCheckMemberFeatureCallMapping(featureCall, this.typeErrorHandler2, this.featureErrorHandler); }
@Check public void checkNameStartsWithCapital(final Variable variable) { boolean _isLowerCase = Character.isLowerCase(variable.getName().charAt(0)); boolean _not = (!_isLowerCase); if (_not) { this.warning("Variable names should start with a lower case", variable, DomainDrivenDesignDslPackage.Literals.VARIABLE__NAME, DomainDrivenDesignDslValidator.INVALID_VAR_NAME); } }
@Check public void checkTypeArgumentsNotPrimitive(JvmParameterizedTypeReference typeRef) { EList<JvmTypeReference> arguments = typeRef.getArguments(); for (int i=0;i<arguments.size();i++) { JvmTypeReference jvmTypeReference = arguments.get(i); checkNotPrimitive(jvmTypeReference); } }
/** Space keyword is reserved. * * @param space the space to check. */ @Check public void checkSpaceUse(SarlSpace space) { error(MessageFormat.format( Messages.SARLValidator_0, this.grammarAccess.getSpaceKeyword()), space, null); }
/** Check if implemented interfaces of a Xtend Interface are redundant. * * @param xtendInterface the interface. */ @Check public void checkRedundantImplementedInterfaces(SarlInterface xtendInterface) { checkRedundantInterfaces( xtendInterface, XTEND_INTERFACE__EXTENDS, xtendInterface.getExtends(), Collections.<JvmTypeReference>emptyList()); }
@Check public void checkFieldsAreCalledSelf(XtendField field) { if ("self".equals(field.getName())) { addIssue("'self' is a discouraged name", field, XTEND_FIELD__NAME, VARIABLE_NAME_DISCOURAGED); } }
@Check public void checkClosureParams(XClosure closure) { if (closure.getDeclaredFormalParameters().size() > 6) { error("The maximum number of parameters for a closure is six.", closure, Literals.XCLOSURE__DECLARED_FORMAL_PARAMETERS, 6, TOO_MANY_PARAMS_IN_CLOSURE); } }
/** Artifact keyword is reserved. * * @param artifact the artifact to check. */ @Check public void checkArtifactUse(SarlArtifact artifact) { error(MessageFormat.format( Messages.SARLValidator_0, this.grammarAccess.getSpaceKeyword()), artifact, null); }
/** Check the modifiers for the SARL agents. * * @param agent the agent. */ @Check protected void checkModifiers(SarlAgent agent) { this.agentModifierValidator.checkModifiers(agent, MessageFormat.format(Messages.SARLValidator_9, agent.getName())); }
/** Check the modifiers for the SARL skills. * * @param skill the skill. */ @Check protected void checkModifiers(SarlSkill skill) { this.skillModifierValidator.checkModifiers(skill, MessageFormat.format(Messages.SARLValidator_9, skill.getName())); }
@Check public void checkTypeParametersAreUnsupported(XtendConstructor constructor){ if (!constructor.getTypeParameters().isEmpty()) { error("Type parameters are not supported for constructors", XtendPackage.Literals.XTEND_EXECUTABLE__TYPE_PARAMETERS, INSIGNIFICANT_INDEX, CONSTRUCTOR_TYPE_PARAMS_NOT_SUPPORTED); } }
@Check public void checkJavaKeywordConflict(XtendInterface member) { for (JvmTypeParameter p : member.getTypeParameters()) { checkNoJavaKeyword(p, TypesPackage.Literals.JVM_TYPE_PARAMETER__NAME); } }
/** Check if all the fields are initialized in a SARL agent. * * @param agent the agent. */ @Check public void checkFinalFieldInitialization(SarlAgent agent) { final JvmGenericType inferredType = this.associations.getInferredType(agent); if (inferredType != null) { checkFinalFieldInitialization(inferredType); } }
/** Check if the super default constructor is correctly invoked. * * @param agent the SARL element. */ @Check public void checkSuperConstructor(SarlAgent agent) { checkSuperConstructor( agent, XTEND_TYPE_DECLARATION__NAME, doGetConstructorParameterTypes(Agent.class, agent)); }
/** Check if the super default constructor is correctly invoked. * * @param event the SARL element. */ @Check public void checkSuperConstructor(SarlEvent event) { checkSuperConstructor( event, XTEND_TYPE_DECLARATION__NAME, doGetConstructorParameterTypes(Event.class, event)); }
/** * This validator looks up all variables in the {@link CheckConstraint} and reports an error if one them is not an * {@link EDataType} instance. We do not allow arbitrary EMF elements in, so the checks are less likely to have * side-effects. */ @Check public void checkForWrongVariablesInXExpressions(CheckConstraint checkConstraint) { checkForWrongVariablesInXExpressionsInternal(checkConstraint.getExpression()); } /**
/** * This validator looks up all variables in the {@link FunctionEvaluationValue} and reports an error if one them is not an * {@link EDataType} instance. We do not allow arbitrary EMF elements in, so the checks are less likely to have * side-effects. */ @Check public void checkForWrongVariablesInXExpressions(FunctionEvaluationValue eval) { checkForWrongVariablesInXExpressionsInternal(eval.getExpression()); }
@Check public void checkUnassignedActionAfterAssignment(final Action action) { if (action.getFeature() == null) { checkCurrentMustBeUnassigned(action); } }