Search in sources :

Example 21 with Operation

use of org.osate.aadl2.Operation in project osate2 by osate.

the class CreateSubprogramCallSequencePaletteCommand method getOperation.

@Override
public Optional<Operation> getOperation(final GetTargetedOperationContext ctx) {
    final BusinessObjectContext targetBoc = ctx.getTarget();
    final Object targetBo = targetBoc.getBusinessObject();
    if (!getClassifierOpBuilder().canBuildOperation(targetBo)) {
        return Optional.empty();
    }
    // Used to pass arguments between steps
    class CreateArgs {

        final BehavioredImplementation bi;

        final CallContext callContext;

        final CalledSubprogram calledSubprogram;

        public CreateArgs(final BehavioredImplementation bi, final CallContext callContext, final CalledSubprogram calledSubprogram) {
            this.bi = bi;
            this.callContext = callContext;
            this.calledSubprogram = calledSubprogram;
        }
    }
    return Optional.of(Operation.createWithBuilder(createOp -> {
        getClassifierOpBuilder().buildOperation(createOp, targetBo).map(ci -> {
            final BehavioredImplementation bi = (BehavioredImplementation) ci;
            final DefaultSelectSubprogramDialogModel subprogramSelectionModel = new DefaultSelectSubprogramDialogModel(bi);
            final SelectSubprogramDialog dlg = new SelectSubprogramDialog(Display.getCurrent().getActiveShell(), subprogramSelectionModel);
            if (dlg.open() == Window.CANCEL) {
                return StepResult.abort();
            }
            // Get the CallContext and Called Subprogram
            final CallContext callContext = subprogramSelectionModel.getCallContext(dlg.getSelectedContext());
            final CalledSubprogram calledSubprogram = subprogramSelectionModel.getCalledSubprogram(dlg.getSelectedSubprogram());
            return StepResult.forValue(new CreateArgs(bi, callContext, calledSubprogram));
        }).modifyModel(null, (tag, createArgs) -> createArgs.bi, (tag, bi, createArgs) -> {
            final String newScsName = AadlNamingUtil.buildUniqueIdentifier(bi, "new_call_sequence");
            final String initialSubprogramCallName = AadlNamingUtil.buildUniqueIdentifier(bi, "new_call");
            final SubprogramCallSequence newScs = bi.createOwnedSubprogramCallSequence();
            newScs.setName(newScsName);
            // Create an initial call. Needed because call sequences must have at least one call
            final SubprogramCall initialSubprogramCall = newScs.createOwnedSubprogramCall();
            initialSubprogramCall.setName(initialSubprogramCallName);
            initialSubprogramCall.setContext(createArgs.callContext);
            initialSubprogramCall.setCalledSubprogram(createArgs.calledSubprogram);
            AadlImportsUtil.ensurePackageIsImportedForClassifier(bi, createArgs.callContext);
            AadlImportsUtil.ensurePackageIsImportedForClassifier(bi, createArgs.calledSubprogram);
            return StepResultBuilder.create().showNewBusinessObject(targetBoc, newScs).build();
        });
    }));
}
Also used : GetTargetedOperationContext(org.osate.ge.palette.GetTargetedOperationContext) AadlOperationBuilder(org.osate.ge.aadl2.ui.AadlOperationBuilder) DefaultSelectSubprogramDialogModel(org.osate.ge.aadl2.ui.internal.dialogs.DefaultSelectSubprogramDialogModel) StepResult(org.osate.ge.operations.StepResult) Operation(org.osate.ge.operations.Operation) ComponentImplementation(org.osate.aadl2.ComponentImplementation) SelectSubprogramDialog(org.osate.ge.aadl2.ui.internal.dialogs.SelectSubprogramDialog) AadlImportsUtil(org.osate.ge.aadl2.AadlImportsUtil) Display(org.eclipse.swt.widgets.Display) CalledSubprogram(org.osate.aadl2.CalledSubprogram) Window(org.eclipse.jface.window.Window) StepResultBuilder(org.osate.ge.operations.StepResultBuilder) BusinessObjectContext(org.osate.ge.BusinessObjectContext) AadlImages(org.osate.ge.aadl2.internal.AadlImages) BasePaletteCommand(org.osate.ge.palette.BasePaletteCommand) AadlCategories(org.osate.ge.aadl2.AadlCategories) SubprogramCallSequence(org.osate.aadl2.SubprogramCallSequence) Optional(java.util.Optional) AadlNamingUtil(org.osate.ge.aadl2.internal.AadlNamingUtil) CallContext(org.osate.aadl2.CallContext) BehavioredImplementation(org.osate.aadl2.BehavioredImplementation) SubprogramCall(org.osate.aadl2.SubprogramCall) Aadl2Package(org.osate.aadl2.Aadl2Package) TargetedPaletteCommand(org.osate.ge.palette.TargetedPaletteCommand) DefaultSelectSubprogramDialogModel(org.osate.ge.aadl2.ui.internal.dialogs.DefaultSelectSubprogramDialogModel) BehavioredImplementation(org.osate.aadl2.BehavioredImplementation) SubprogramCallSequence(org.osate.aadl2.SubprogramCallSequence) BusinessObjectContext(org.osate.ge.BusinessObjectContext) CallContext(org.osate.aadl2.CallContext) CalledSubprogram(org.osate.aadl2.CalledSubprogram) SubprogramCall(org.osate.aadl2.SubprogramCall) SelectSubprogramDialog(org.osate.ge.aadl2.ui.internal.dialogs.SelectSubprogramDialog)

Example 22 with Operation

use of org.osate.aadl2.Operation in project osate2 by osate.

the class ClassifierCreationHelper method buildName.

public String buildName(final ClassifierOperationPartType primaryType, final Supplier<AadlPackage> primaryPkgSupplier, final String identifier, final ClassifierOperationPart basePart) {
    final String newName;
    if (primaryType == ClassifierOperationPartType.NEW_COMPONENT_IMPLEMENTATION) {
        if (basePart == null) {
            throw new RuntimeException("Base operation in invalid");
        }
        final AadlPackage primaryPkg = primaryPkgSupplier.get();
        final PackageSection section = primaryPkg.getPublicSection();
        // Determine details about the type specified by the base operation part.
        final String baseTypeName;
        final AadlPackage typePackage;
        // Get the name of the type and the package in which it is contained.
        if (ClassifierOperationPartType.isCreate(basePart.getType())) {
            typePackage = getResolvedPackage(basePart.getSelectedPackage());
            baseTypeName = basePart.getIdentifier();
        } else if (basePart.getType() == ClassifierOperationPartType.EXISTING) {
            final Classifier classifier = getResolvedClassifier(basePart.getSelectedClassifier());
            final ComponentType ct = getResolvedComponentType(classifier);
            if (ct == null) {
                return null;
            }
            typePackage = getPackage(ct);
            baseTypeName = ct.getName();
        } else {
            throw new RuntimeException("Invalid base operation part: " + basePart.getType());
        }
        // Handle type not being in same package as implementation
        final boolean samePackage = AadlNameUtil.namesAreEqual(primaryPkg, typePackage);
        final String localBaseTypeName = samePackage ? baseTypeName : getRenamedType(section, typePackage, baseTypeName).aliasName;
        newName = localBaseTypeName + "." + identifier;
    } else {
        newName = identifier;
    }
    return newName;
}
Also used : ComponentType(org.osate.aadl2.ComponentType) AadlPackage(org.osate.aadl2.AadlPackage) PackageSection(org.osate.aadl2.PackageSection) PublicPackageSection(org.osate.aadl2.PublicPackageSection) Classifier(org.osate.aadl2.Classifier)

Example 23 with Operation

use of org.osate.aadl2.Operation in project osate2 by osate.

the class CreateVariablePaletteCommand method getOperation.

@Override
public Optional<Operation> getOperation(final GetTargetedOperationContext ctx) {
    return ctx.getTarget().getBusinessObject(BehaviorAnnex.class).map(behaviorAnnex -> {
        final PublicPackageSection section = getPackage(behaviorAnnex).map(AadlPackage::getPublicSection).orElse(null);
        if (section == null) {
            return null;
        }
        return Operation.createWithBuilder(builder -> {
            final OperationBuilder<DataClassifier> prompt = builder.supply(() -> BehaviorAnnexUtil.promptForDataClassifier(behaviorAnnex.eResource()).filter(c -> BehaviorAnnexUtil.getPackage(c).isPresent()).map(StepResult::forValue).orElseGet(StepResult::abort));
            final OperationBuilder<DataClassifier> addImportIfNeeded = prompt.modifyModel(null, (tag, prevResult) -> section, (tag, sectionToModify, dataClassifier) -> {
                BehaviorAnnexUtil.getPackage(dataClassifier).ifPresent(classifierPkg -> AadlImportsUtil.addImportIfNeeded(sectionToModify, classifierPkg));
                return StepResult.forValue(dataClassifier);
            });
            addImportIfNeeded.modifyModel(null, (tag, dataClassifier) -> behaviorAnnex, (tag, behaviorAnnexToModify, prevResult) -> {
                final BehaviorVariable newVariable = (BehaviorVariable) EcoreUtil.create(AadlBaPackage.eINSTANCE.getBehaviorVariable());
                final String newName = BehaviorAnnexNamingUtil.buildUniqueIdentifier(behaviorAnnexToModify, "new_behavior_variable");
                newVariable.setName(newName);
                newVariable.setDataClassifier(prevResult);
                behaviorAnnexToModify.getVariables().add(newVariable);
                return StepResultBuilder.create().showNewBusinessObject(ctx.getTarget(), newVariable).build();
            });
        });
    });
}
Also used : GetTargetedOperationContext(org.osate.ge.palette.GetTargetedOperationContext) BehaviorAnnexNamingUtil(org.osate.ge.ba.util.BehaviorAnnexNamingUtil) StepResult(org.osate.ge.operations.StepResult) Operation(org.osate.ge.operations.Operation) BehaviorVariable(org.osate.ba.aadlba.BehaviorVariable) EcoreUtil(org.eclipse.emf.ecore.util.EcoreUtil) AadlPackage(org.osate.aadl2.AadlPackage) AadlImportsUtil(org.osate.ge.aadl2.AadlImportsUtil) BehaviorAnnex(org.osate.ba.aadlba.BehaviorAnnex) BehaviorAnnexUtil.getPackage(org.osate.ge.ba.util.BehaviorAnnexUtil.getPackage) StepResultBuilder(org.osate.ge.operations.StepResultBuilder) PublicPackageSection(org.osate.aadl2.PublicPackageSection) BasePaletteCommand(org.osate.ge.palette.BasePaletteCommand) DataClassifier(org.osate.aadl2.DataClassifier) BehaviorAnnexUtil(org.osate.ge.ba.util.BehaviorAnnexUtil) Optional(java.util.Optional) OperationBuilder(org.osate.ge.operations.OperationBuilder) AadlBaPackage(org.osate.ba.aadlba.AadlBaPackage) TargetedPaletteCommand(org.osate.ge.palette.TargetedPaletteCommand) PublicPackageSection(org.osate.aadl2.PublicPackageSection) BehaviorVariable(org.osate.ba.aadlba.BehaviorVariable) BehaviorAnnex(org.osate.ba.aadlba.BehaviorAnnex) DataClassifier(org.osate.aadl2.DataClassifier) StepResult(org.osate.ge.operations.StepResult)

Example 24 with Operation

use of org.osate.aadl2.Operation in project osate2 by osate.

the class PropertiesValidator method typeCheckPropertyValues.

/**
 * checks and report mismatch in type of value and type
 *
 * @param pt:
 *            PropertyType or unresolved proxy or null
 * @param pv:
 *            PropertyExpression or null
 * @param prefix:
 *            String prefix to error message used for lists
 * @since 2.0
 */
protected void typeCheckPropertyValues(PropertyType pt, PropertyExpression pv, String prefix, Element holder, String defName, int depth) {
    if (Aadl2Util.isNull(pt) || pv == null || holder == null) {
        return;
    }
    if (depth > 50) {
        error(holder, "Cyclic value discovered for '" + defName + "'");
        return;
    }
    depth++;
    String msg = " to property '" + defName + "' of type '" + pt.eClass().getName() + "'";
    if (!prefix.isEmpty() && !prefix.startsWith(" ")) {
        prefix = prefix + " ";
    }
    if (pv instanceof ListValue) {
        if (pt instanceof ListType) {
            typeMatchListElements(((ListType) pt).getElementType(), ((ListValue) pv).getOwnedListElements(), holder, defName, depth);
        } else {
            error(holder, prefix + "Assigning a list of values" + msg);
        }
    } else if (pv instanceof Operation || pv instanceof BooleanLiteral) {
        if (!(pt instanceof AadlBoolean)) {
            error(holder, prefix + "Assigning a Boolean value" + msg);
        }
    } else if (pv instanceof StringLiteral) {
        if (!(pt instanceof AadlString)) {
            error(prefix + "Assigning String value" + msg, holder, null, ValidationMessageAcceptor.INSIGNIFICANT_INDEX, Diagnostic.LINKING_DIAGNOSTIC);
        }
    } else if (pv instanceof EnumerationLiteral || (pv instanceof NamedValue && ((NamedValue) pv).getNamedValue() instanceof EnumerationLiteral)) {
        if (!(pt instanceof EnumerationType)) {
            error(holder, prefix + "Assigning Enumeration literal" + msg);
        }
    } else if (pv instanceof UnitLiteral || (pv instanceof NamedValue && ((NamedValue) pv).getNamedValue() instanceof UnitLiteral)) {
        if (!(pt instanceof UnitsType)) {
            error(holder, prefix + "Assigning Unit literal" + msg);
        }
    } else if (pv instanceof IntegerLiteral) {
        if (!(pt instanceof AadlInteger)) {
            error(holder, prefix + "Assigning Integer value" + msg);
        } else if (checkUnits((AadlInteger) pt, (IntegerLiteral) pv, holder)) {
            checkInRange((AadlInteger) pt, (IntegerLiteral) pv);
        }
    } else if (pv instanceof RealLiteral) {
        if (!(pt instanceof AadlReal)) {
            error(holder, prefix + "Assigning Real value" + msg);
        } else if (checkUnits((AadlReal) pt, (RealLiteral) pv, holder)) {
            checkInRange((AadlReal) pt, (RealLiteral) pv);
        }
    } else if (pv instanceof RangeValue) {
        if (!(pt instanceof RangeType)) {
            error(holder, prefix + "Assigning Range value" + msg);
        } else {
            typeCheckPropertyValues(((RangeType) pt).getNumberType(), ((RangeValue) pv).getMinimumValue(), holder, defName, depth);
            typeCheckPropertyValues(((RangeType) pt).getNumberType(), ((RangeValue) pv).getMaximumValue(), holder, defName, depth);
            typeCheckPropertyValues(((RangeType) pt).getNumberType(), ((RangeValue) pv).getDeltaValue(), holder, defName, depth);
        }
    } else if (pv instanceof ClassifierValue) {
        if (!(pt instanceof ClassifierType)) {
            error(holder, prefix + "Assigning incorrect Classifier value" + msg);
            return;
        }
        ClassifierValue cv = (ClassifierValue) pv;
        ClassifierType ct = (ClassifierType) pt;
        if (ct.getClassifierReferences().isEmpty()) {
            return;
        }
        for (MetaclassReference mcri : ct.getClassifierReferences()) {
            if (mcri.getMetaclass() != null && mcri.getMetaclass().isSuperTypeOf(cv.getClassifier().eClass())) {
                return;
            }
        }
        error(holder, prefix + "Assigning classifier value with incorrect Classifier" + msg);
    } else if (pv instanceof RecordValue) {
        if (!(pt instanceof RecordType)) {
            error(holder, prefix + "Assigning Record value" + msg);
        } else {
            typeMatchRecordFields(((RecordValue) pv).getOwnedFieldValues(), holder, defName, depth);
        }
    } else if (pv instanceof ReferenceValue) {
        if (!(pt instanceof ReferenceType)) {
            error(holder, prefix + "Assigning incorrect reference value" + msg);
        } else {
            ReferenceType ptrt = (ReferenceType) pt;
            if (ptrt.getNamedElementReferences().isEmpty()) {
                return;
            }
            ReferenceValue pvrv = (ReferenceValue) pv;
            EList<ContainmentPathElement> cpes = pvrv.getContainmentPathElements();
            if (!cpes.isEmpty()) {
                NamedElement ne = cpes.get(cpes.size() - 1).getNamedElement();
                for (MetaclassReference mcri : ptrt.getNamedElementReferences()) {
                    if (mcri.getMetaclass().isSuperTypeOf(ne.eClass())) {
                        return;
                    }
                }
                error(holder, prefix + "Assigning reference value with incorrect Named Element class" + msg);
            }
        }
    } else if (pv instanceof NamedValue) {
        AbstractNamedValue nv = ((NamedValue) pv).getNamedValue();
        if (nv instanceof PropertyConstant) {
            final PropertyConstant propertyConstant = (PropertyConstant) nv;
            final PropertyType pct = propertyConstant.getPropertyType();
            if (!Aadl2Util.isNull(pct) && !Aadl2Util.arePropertyTypesEqual(pt, pct)) {
                final String expected = getTypeName(pt);
                final String actual = getTypeName(pct);
                if (actual != null) {
                    if (expected != null) {
                        error(holder, "Property value of type " + actual + "; expected type " + expected);
                    } else {
                        error(holder, "Propery value of type " + actual + " does not match expected type");
                    }
                } else {
                    if (expected != null) {
                        error(holder, "Property value is not of expected type " + expected);
                    } else {
                        error(holder, "Propery value is not of expected type");
                    }
                }
            } else {
                // Issue 2222: is this still really necessary?
                typeCheckPropertyValues(pt, propertyConstant.getConstantValue(), holder, defName, depth);
            }
        } else if (nv instanceof Property) {
            PropertyType pvt = ((Property) nv).getPropertyType();
            if (!Aadl2Util.isNull(pvt)) {
                if (pvt.eClass() != pt.eClass() || !Aadl2Util.arePropertyTypesEqual(pt, pvt)) {
                    final String expected = getTypeName(pt);
                    final String actual = getTypeName(pvt);
                    if (actual != null) {
                        if (expected != null) {
                            error(holder, "Property value of type " + actual + "; expected type " + expected);
                        } else {
                            error(holder, "Propery value of type " + actual + " does not match expected type");
                        }
                    } else {
                        if (expected != null) {
                            error(holder, "Property value is not of expected type " + expected);
                        } else {
                            error(holder, "Propery value is not of expected type");
                        }
                    }
                }
            }
        } else {
            error(holder, "Enum/Unit literal validation should have happened before");
        }
    }
}
Also used : ClassifierType(org.osate.aadl2.ClassifierType) ClassifierValue(org.osate.aadl2.ClassifierValue) BooleanLiteral(org.osate.aadl2.BooleanLiteral) ReferenceValue(org.osate.aadl2.ReferenceValue) AbstractNamedValue(org.osate.aadl2.AbstractNamedValue) NamedValue(org.osate.aadl2.NamedValue) AbstractNamedValue(org.osate.aadl2.AbstractNamedValue) AadlString(org.osate.aadl2.AadlString) Operation(org.osate.aadl2.Operation) PropertyType(org.osate.aadl2.PropertyType) RangeValue(org.osate.aadl2.RangeValue) ReferenceType(org.osate.aadl2.ReferenceType) RealLiteral(org.osate.aadl2.RealLiteral) RangeType(org.osate.aadl2.RangeType) RecordType(org.osate.aadl2.RecordType) ListType(org.osate.aadl2.ListType) UnitLiteral(org.osate.aadl2.UnitLiteral) AadlInteger(org.osate.aadl2.AadlInteger) MetaclassReference(org.osate.aadl2.MetaclassReference) AadlString(org.osate.aadl2.AadlString) EnumerationLiteral(org.osate.aadl2.EnumerationLiteral) ArraySizeProperty(org.osate.aadl2.ArraySizeProperty) Property(org.osate.aadl2.Property) IntegerLiteral(org.osate.aadl2.IntegerLiteral) AadlReal(org.osate.aadl2.AadlReal) ListValue(org.osate.aadl2.ListValue) EnumerationType(org.osate.aadl2.EnumerationType) RecordValue(org.osate.aadl2.RecordValue) ContainmentPathElement(org.osate.aadl2.ContainmentPathElement) PropertyConstant(org.osate.aadl2.PropertyConstant) AadlBoolean(org.osate.aadl2.AadlBoolean) StringLiteral(org.osate.aadl2.StringLiteral) ContainedNamedElement(org.osate.aadl2.ContainedNamedElement) NamedElement(org.osate.aadl2.NamedElement) UnitsType(org.osate.aadl2.UnitsType)

Example 25 with Operation

use of org.osate.aadl2.Operation in project osate2 by osate.

the class AbstractPropertiesSemanticSequencer 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.ARRAY_RANGE:
                sequence_ArrayRange(context, (ArrayRange) semanticObject);
                return;
            case Aadl2Package.BASIC_PROPERTY_ASSOCIATION:
                sequence_FieldPropertyAssociation(context, (BasicPropertyAssociation) semanticObject);
                return;
            case Aadl2Package.BOOLEAN_LITERAL:
                sequence_BooleanLiteral(context, (BooleanLiteral) semanticObject);
                return;
            case Aadl2Package.CLASSIFIER_VALUE:
                sequence_ComponentClassifierTerm(context, (ClassifierValue) semanticObject);
                return;
            case Aadl2Package.COMPUTED_VALUE:
                sequence_ComputedTerm(context, (ComputedValue) semanticObject);
                return;
            case Aadl2Package.CONTAINED_NAMED_ELEMENT:
                sequence_ContainmentPath(context, (ContainedNamedElement) semanticObject);
                return;
            case Aadl2Package.CONTAINMENT_PATH_ELEMENT:
                sequence_ContainmentPathElement(context, (ContainmentPathElement) semanticObject);
                return;
            case Aadl2Package.INTEGER_LITERAL:
                sequence_IntegerTerm(context, (IntegerLiteral) semanticObject);
                return;
            case Aadl2Package.LIST_VALUE:
                sequence_ListTerm(context, (ListValue) semanticObject);
                return;
            case Aadl2Package.MODAL_PROPERTY_VALUE:
                if (rule == grammarAccess.getModalPropertyValueRule()) {
                    sequence_ModalPropertyValue(context, (ModalPropertyValue) semanticObject);
                    return;
                } else if (rule == grammarAccess.getOptionalModalPropertyValueRule()) {
                    sequence_OptionalModalPropertyValue(context, (ModalPropertyValue) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyValueRule()) {
                    sequence_PropertyValue(context, (ModalPropertyValue) semanticObject);
                    return;
                } else
                    break;
            case Aadl2Package.NAMED_VALUE:
                if (rule == grammarAccess.getConstantValueRule() || rule == grammarAccess.getNumAltRule()) {
                    sequence_ConstantValue(context, (NamedValue) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyExpressionRule() || rule == grammarAccess.getLiteralorReferenceTermRule()) {
                    sequence_LiteralorReferenceTerm(context, (NamedValue) semanticObject);
                    return;
                } else
                    break;
            case Aadl2Package.OPERATION:
                sequence_SignedConstant(context, (Operation) semanticObject);
                return;
            case Aadl2Package.PROPERTY_ASSOCIATION:
                if (rule == grammarAccess.getBasicPropertyAssociationRule()) {
                    sequence_BasicPropertyAssociation(context, (PropertyAssociation) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPModelRule() || rule == grammarAccess.getContainedPropertyAssociationRule()) {
                    sequence_ContainedPropertyAssociation(context, (PropertyAssociation) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyAssociationRule()) {
                    sequence_PropertyAssociation(context, (PropertyAssociation) semanticObject);
                    return;
                } else
                    break;
            case Aadl2Package.RANGE_VALUE:
                sequence_NumericRangeTerm(context, (RangeValue) semanticObject);
                return;
            case Aadl2Package.REAL_LITERAL:
                sequence_RealTerm(context, (RealLiteral) semanticObject);
                return;
            case Aadl2Package.RECORD_VALUE:
                if (rule == grammarAccess.getOldRecordTermRule()) {
                    sequence_OldRecordTerm(context, (RecordValue) semanticObject);
                    return;
                } else if (rule == grammarAccess.getPropertyExpressionRule() || rule == grammarAccess.getRecordTermRule()) {
                    sequence_RecordTerm(context, (RecordValue) semanticObject);
                    return;
                } else
                    break;
            case Aadl2Package.REFERENCE_VALUE:
                sequence_ReferenceTerm(context, (ReferenceValue) semanticObject);
                return;
            case Aadl2Package.STRING_LITERAL:
                sequence_StringTerm(context, (StringLiteral) semanticObject);
                return;
        }
    if (errorAcceptor != null)
        errorAcceptor.accept(diagnosticProvider.createInvalidContextOrTypeDiagnostic(semanticObject, context));
}
Also used : ParserRule(org.eclipse.xtext.ParserRule) ComputedValue(org.osate.aadl2.ComputedValue) Action(org.eclipse.xtext.Action) ClassifierValue(org.osate.aadl2.ClassifierValue) ModalPropertyValue(org.osate.aadl2.ModalPropertyValue) BooleanLiteral(org.osate.aadl2.BooleanLiteral) PropertyAssociation(org.osate.aadl2.PropertyAssociation) BasicPropertyAssociation(org.osate.aadl2.BasicPropertyAssociation) ReferenceValue(org.osate.aadl2.ReferenceValue) ListValue(org.osate.aadl2.ListValue) ContainmentPathElement(org.osate.aadl2.ContainmentPathElement) RecordValue(org.osate.aadl2.RecordValue) ArrayRange(org.osate.aadl2.ArrayRange) NamedValue(org.osate.aadl2.NamedValue) Operation(org.osate.aadl2.Operation) RangeValue(org.osate.aadl2.RangeValue) EPackage(org.eclipse.emf.ecore.EPackage) RealLiteral(org.osate.aadl2.RealLiteral) StringLiteral(org.osate.aadl2.StringLiteral) Parameter(org.eclipse.xtext.Parameter) BasicPropertyAssociation(org.osate.aadl2.BasicPropertyAssociation) ContainedNamedElement(org.osate.aadl2.ContainedNamedElement) IntegerLiteral(org.osate.aadl2.IntegerLiteral)

Aggregations

ArrayList (java.util.ArrayList)86 Test (org.junit.Test)75 AbstractMessage (com.google.protobuf.AbstractMessage)65 Operation (com.google.cloud.compute.v1.Operation)49 Operation (com.google.container.v1.Operation)43 StatusCondition (com.google.container.v1.StatusCondition)40 Operation (com.google.container.v1beta1.Operation)24 StatusCondition (com.google.container.v1beta1.StatusCondition)23 InstancesClient (com.google.cloud.compute.v1.InstancesClient)20 Operation (com.reprezen.kaizen.oasparser.model3.Operation)16 Path (com.reprezen.kaizen.oasparser.model3.Path)15 Operation (net.opengis.ows.v_1_0_0.Operation)15 Instance (com.google.cloud.compute.v1.Instance)13 Parameter (com.reprezen.kaizen.oasparser.model3.Parameter)13 DomainType (net.opengis.ows.v_1_0_0.DomainType)13 AttachedDisk (com.google.cloud.compute.v1.AttachedDisk)12 AadlPackage (org.osate.aadl2.AadlPackage)12 InsertInstanceRequest (com.google.cloud.compute.v1.InsertInstanceRequest)11 List (java.util.List)9 Optional (java.util.Optional)9