Search in sources :

Example 16 with ArraySize

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

the class SetDimensionsPropertySection method createArrayDimensionDuplicate.

private static ArrayDimension createArrayDimensionDuplicate(final Aadl2Package pkg, final ArrayDimension dim) {
    final ArrayDimension newDim = (ArrayDimension) pkg.getEFactoryInstance().create(pkg.getArrayDimension());
    if (dim.getSize() != null) {
        final ArraySize newArraySize = (ArraySize) pkg.getEFactoryInstance().create(pkg.getArraySize());
        newArraySize.setSize(dim.getSize().getSize());
        newArraySize.setSizeProperty(dim.getSize().getSizeProperty());
        newDim.setSize(newArraySize);
    }
    return newDim;
}
Also used : ArraySize(org.osate.aadl2.ArraySize) ArrayDimension(org.osate.aadl2.ArrayDimension)

Aggregations

ArraySize (org.osate.aadl2.ArraySize)14 ArrayDimension (org.osate.aadl2.ArrayDimension)10 PropertyConstant (org.osate.aadl2.PropertyConstant)6 DirectedFeature (org.osate.aadl2.DirectedFeature)3 Feature (org.osate.aadl2.Feature)3 Property (org.osate.aadl2.Property)3 PropertyExpression (org.osate.aadl2.PropertyExpression)3 ArraySizeProperty (org.osate.aadl2.ArraySizeProperty)2 IntegerLiteral (org.osate.aadl2.IntegerLiteral)2 Subcomponent (org.osate.aadl2.Subcomponent)2 ComponentInstance (org.osate.aadl2.instance.ComponentInstance)2 FeatureInstance (org.osate.aadl2.instance.FeatureInstance)2 InstanceObject (org.osate.aadl2.instance.InstanceObject)2 ArrayList (java.util.ArrayList)1 List (java.util.List)1 Stack (java.util.Stack)1 EOperation (org.eclipse.emf.ecore.EOperation)1 EPackage (org.eclipse.emf.ecore.EPackage)1 ENotificationImpl (org.eclipse.emf.ecore.impl.ENotificationImpl)1 ArrayContentProvider (org.eclipse.jface.viewers.ArrayContentProvider)1