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;
}
Aggregations