Search in sources :

Example 1 with ComputeDeclaration

use of org.osate.alisa.common.common.ComputeDeclaration in project osate2 by osate.

the class ComputeRefImpl method setCompute.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
@Override
public void setCompute(ComputeDeclaration newCompute) {
    ComputeDeclaration oldCompute = compute;
    compute = newCompute;
    if (eNotificationRequired())
        eNotify(new ENotificationImpl(this, Notification.SET, VerifyPackage.COMPUTE_REF__COMPUTE, oldCompute, compute));
}
Also used : ComputeDeclaration(org.osate.alisa.common.common.ComputeDeclaration) ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl)

Example 2 with ComputeDeclaration

use of org.osate.alisa.common.common.ComputeDeclaration in project osate2 by osate.

the class AlisaSemanticSequencer method sequence.

@Override
public void sequence(ISerializationContext context, EObject semanticObject) {
    EPackage epackage = semanticObject.eClass().getEPackage();
    ParserRule rule = context.getParserRule();
    Action action = context.getAssignedAction();
    Set<Parameter> parameters = context.getEnabledBooleanParameters();
    if (epackage == Aadl2Package.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case Aadl2Package.AADL_BOOLEAN:
                sequence_TypeRef(context, (AadlBoolean) semanticObject);
                return;
            case Aadl2Package.AADL_INTEGER:
                sequence_TypeRef(context, (AadlInteger) semanticObject);
                return;
            case Aadl2Package.AADL_REAL:
                sequence_TypeRef(context, (AadlReal) semanticObject);
                return;
            case Aadl2Package.AADL_STRING:
                sequence_TypeRef(context, (AadlString) semanticObject);
                return;
            case Aadl2Package.BOOLEAN_LITERAL:
                sequence_ABooleanLiteral(context, (BooleanLiteral) semanticObject);
                return;
            case Aadl2Package.INTEGER_LITERAL:
                sequence_AIntegerTerm(context, (IntegerLiteral) semanticObject);
                return;
            case Aadl2Package.REAL_LITERAL:
                sequence_ARealTerm(context, (RealLiteral) semanticObject);
                return;
            case Aadl2Package.STRING_LITERAL:
                sequence_StringTerm(context, (StringLiteral) semanticObject);
                return;
        }
    else if (epackage == AlisaPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case AlisaPackage.ASSURANCE_CASE:
                sequence_AssuranceCase(context, (AssuranceCase) semanticObject);
                return;
            case AlisaPackage.ASSURANCE_PLAN:
                sequence_AssurancePlan(context, (AssurancePlan) semanticObject);
                return;
            case AlisaPackage.ASSURANCE_TASK:
                sequence_AssuranceTask(context, (AssuranceTask) semanticObject);
                return;
        }
    else if (epackage == CommonPackage.eINSTANCE)
        switch(semanticObject.eClass().getClassifierID()) {
            case CommonPackage.ABINARY_OPERATION:
                sequence_AAdditiveExpression_AAndExpression_AEqualityExpression_AMultiplicativeExpression_AOrExpression_ARelationalExpression(context, (ABinaryOperation) semanticObject);
                return;
            case CommonPackage.ACONDITIONAL:
                sequence_AIfExpression(context, (AConditional) semanticObject);
                return;
            case CommonPackage.AFUNCTION_CALL:
                sequence_AFunctionCall(context, (AFunctionCall) semanticObject);
                return;
            case CommonPackage.AMODEL_REFERENCE:
                sequence_AModelReference(context, (AModelReference) semanticObject);
                return;
            case CommonPackage.APROPERTY_REFERENCE:
                if (rule == grammarAccess.getAModelOrPropertyReferenceRule() || rule == grammarAccess.getAExpressionRule() || rule == grammarAccess.getAOrExpressionRule() || action == grammarAccess.getAOrExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAAndExpressionRule() || action == grammarAccess.getAAndExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAEqualityExpressionRule() || action == grammarAccess.getAEqualityExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getARelationalExpressionRule() || action == grammarAccess.getARelationalExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAAdditiveExpressionRule() || action == grammarAccess.getAAdditiveExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAMultiplicativeExpressionRule() || action == grammarAccess.getAMultiplicativeExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAUnaryOperationRule() || rule == grammarAccess.getAUnitExpressionRule() || action == grammarAccess.getAUnitExpressionAccess().getAUnitExpressionExpressionAction_1_0() || rule == grammarAccess.getAPrimaryExpressionRule() || rule == grammarAccess.getAParenthesizedExpressionRule()) {
                    sequence_AModelOrPropertyReference_APropertyReference(context, (APropertyReference) semanticObject);
                    return;
                } else if (rule == grammarAccess.getAPropertyReferenceRule()) {
                    sequence_APropertyReference(context, (APropertyReference) semanticObject);
                    return;
                } else
                    break;
            case CommonPackage.ARANGE:
                sequence_ARangeExpression(context, (ARange) semanticObject);
                return;
            case CommonPackage.AUNARY_OPERATION:
                sequence_AUnaryOperation(context, (AUnaryOperation) semanticObject);
                return;
            case CommonPackage.AUNIT_EXPRESSION:
                if (rule == grammarAccess.getAExpressionRule() || rule == grammarAccess.getAOrExpressionRule() || action == grammarAccess.getAOrExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAAndExpressionRule() || action == grammarAccess.getAAndExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAEqualityExpressionRule() || action == grammarAccess.getAEqualityExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getARelationalExpressionRule() || action == grammarAccess.getARelationalExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAAdditiveExpressionRule() || action == grammarAccess.getAAdditiveExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAMultiplicativeExpressionRule() || action == grammarAccess.getAMultiplicativeExpressionAccess().getABinaryOperationLeftAction_1_0_0_0() || rule == grammarAccess.getAUnaryOperationRule() || rule == grammarAccess.getAUnitExpressionRule() || action == grammarAccess.getAUnitExpressionAccess().getAUnitExpressionExpressionAction_1_0() || rule == grammarAccess.getAPrimaryExpressionRule() || rule == grammarAccess.getAParenthesizedExpressionRule()) {
                    sequence_AUnitExpression(context, (AUnitExpression) semanticObject);
                    return;
                } else if (rule == grammarAccess.getShowValueRule()) {
                    sequence_ShowValue(context, (AUnitExpression) semanticObject);
                    return;
                } else
                    break;
            case CommonPackage.AVARIABLE_REFERENCE:
                sequence_AVariableReference(context, (AVariableReference) semanticObject);
                return;
            case CommonPackage.COMPUTE_DECLARATION:
                sequence_ComputeDeclaration(context, (ComputeDeclaration) semanticObject);
                return;
            case CommonPackage.DESCRIPTION:
                sequence_Description(context, (Description) semanticObject);
                return;
            case CommonPackage.DESCRIPTION_ELEMENT:
                sequence_DescriptionElement(context, (DescriptionElement) semanticObject);
                return;
            case CommonPackage.IMAGE_REFERENCE:
                sequence_ImageReference(context, (ImageReference) semanticObject);
                return;
            case CommonPackage.MODEL_REF:
                sequence_TypeRef(context, (ModelRef) semanticObject);
                return;
            case CommonPackage.PROPERTY_REF:
                sequence_PropertyRef(context, (PropertyRef) semanticObject);
                return;
            case CommonPackage.RATIONALE:
                sequence_Rationale(context, (Rationale) semanticObject);
                return;
            case CommonPackage.TYPE_REF:
                sequence_TypeRef(context, (TypeRef) semanticObject);
                return;
            case CommonPackage.UNCERTAINTY:
                sequence_Uncertainty(context, (Uncertainty) semanticObject);
                return;
            case CommonPackage.VAL_DECLARATION:
                sequence_ValDeclaration(context, (ValDeclaration) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) Action(org.eclipse.xtext.Action) AConditional(org.osate.alisa.common.common.AConditional) Uncertainty(org.osate.alisa.common.common.Uncertainty) Description(org.osate.alisa.common.common.Description) APropertyReference(org.osate.alisa.common.common.APropertyReference) BooleanLiteral(org.osate.aadl2.BooleanLiteral) AFunctionCall(org.osate.alisa.common.common.AFunctionCall) TypeRef(org.osate.alisa.common.common.TypeRef) AUnaryOperation(org.osate.alisa.common.common.AUnaryOperation) PropertyRef(org.osate.alisa.common.common.PropertyRef) EPackage(org.eclipse.emf.ecore.EPackage) RealLiteral(org.osate.aadl2.RealLiteral) AVariableReference(org.osate.alisa.common.common.AVariableReference) AadlInteger(org.osate.aadl2.AadlInteger) Rationale(org.osate.alisa.common.common.Rationale) AadlString(org.osate.aadl2.AadlString) IntegerLiteral(org.osate.aadl2.IntegerLiteral) AadlReal(org.osate.aadl2.AadlReal) AModelReference(org.osate.alisa.common.common.AModelReference) ARange(org.osate.alisa.common.common.ARange) ComputeDeclaration(org.osate.alisa.common.common.ComputeDeclaration) ValDeclaration(org.osate.alisa.common.common.ValDeclaration) DescriptionElement(org.osate.alisa.common.common.DescriptionElement) ABinaryOperation(org.osate.alisa.common.common.ABinaryOperation) AUnitExpression(org.osate.alisa.common.common.AUnitExpression) ImageReference(org.osate.alisa.common.common.ImageReference) AadlBoolean(org.osate.aadl2.AadlBoolean) StringLiteral(org.osate.aadl2.StringLiteral) Parameter(org.eclipse.xtext.Parameter) ModelRef(org.osate.alisa.common.common.ModelRef)

Aggregations

ComputeDeclaration (org.osate.alisa.common.common.ComputeDeclaration)2 EPackage (org.eclipse.emf.ecore.EPackage)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 Action (org.eclipse.xtext.Action)1 Parameter (org.eclipse.xtext.Parameter)1 ParserRule (org.eclipse.xtext.ParserRule)1 AadlBoolean (org.osate.aadl2.AadlBoolean)1 AadlInteger (org.osate.aadl2.AadlInteger)1 AadlReal (org.osate.aadl2.AadlReal)1 AadlString (org.osate.aadl2.AadlString)1 BooleanLiteral (org.osate.aadl2.BooleanLiteral)1 IntegerLiteral (org.osate.aadl2.IntegerLiteral)1 RealLiteral (org.osate.aadl2.RealLiteral)1 StringLiteral (org.osate.aadl2.StringLiteral)1 ABinaryOperation (org.osate.alisa.common.common.ABinaryOperation)1 AConditional (org.osate.alisa.common.common.AConditional)1 AFunctionCall (org.osate.alisa.common.common.AFunctionCall)1 AModelReference (org.osate.alisa.common.common.AModelReference)1 APropertyReference (org.osate.alisa.common.common.APropertyReference)1 ARange (org.osate.alisa.common.common.ARange)1