use of org.osate.aadl2.Feature in project osate2 by osate.
the class FeatureInstanceTooltipContributor method addTooltipContents.
@Override
public void addTooltipContents(final TooltipContributorContext ctx) {
ctx.getBusinessObjectContext().getBusinessObject(FeatureInstance.class).ifPresent(featureInstance -> {
final Feature feature = featureInstance.getFeature();
if (feature instanceof Feature || feature instanceof InternalFeature || feature instanceof ProcessorFeature) {
// Determine the feature classifier
final Classifier featureClassifier;
if (feature instanceof EventDataSource) {
final EventDataSource aadlFeature = (EventDataSource) feature;
featureClassifier = aadlFeature.getDataClassifier();
} else if (feature instanceof PortProxy) {
final PortProxy aadlFeature = (PortProxy) feature;
featureClassifier = aadlFeature.getDataClassifier();
} else if (feature instanceof SubprogramProxy) {
final SubprogramProxy aadlFeature = (SubprogramProxy) feature;
featureClassifier = aadlFeature.getSubprogramClassifier();
} else if (feature instanceof Feature) {
final Feature aadlFeature = (Feature) feature;
featureClassifier = aadlFeature.getAllClassifier();
} else {
featureClassifier = null;
}
// Build the text to contribute to the tooltip
final StringBuffer tooltipContents = new StringBuffer();
if (featureClassifier instanceof ComponentClassifier) {
tooltipContents.append(((ComponentClassifier) featureClassifier).getCategory() + " " + featureClassifier.getQualifiedName());
} else if (featureClassifier instanceof FeatureGroupType) {
tooltipContents.append("feature group " + featureClassifier.getQualifiedName());
} else if (featureClassifier == null) {
tooltipContents.append("No Classifier");
} else {
tooltipContents.append(featureClassifier.getQualifiedName());
}
// Create the styled text describing the feature
final Label lbl = new Label(ctx.getTooltip(), SWT.NONE);
lbl.setForeground(Display.getCurrent().getSystemColor(SWT.COLOR_INFO_FOREGROUND));
lbl.setText(tooltipContents.toString());
}
});
}
use of org.osate.aadl2.Feature in project osate2 by osate.
the class FeatureReferenceBindingType method createNewBindings.
/**
* Creates new prototype binding business objects based on the state of the model. Bindings which are not valid are ignored.
* @param parent is the parent node for binding. Used to retrieve child binding nodes.
* @param classifier is the classifier which to use to retrieve prototypes
* @param boBeingModified is the top level business object which is being modified. Used to add imports to appropriate package.
* @param newBindings is the list to which to add created bindings.
*/
protected final void createNewBindings(final PrototypeBindingsModelNode parent, final Object classifier, final Element boBeingModified, final List<PrototypeBinding> newBindings) {
final Aadl2Factory f = AgeAadlUtil.getAadl2Factory();
// Check for a binding for each prototype of the specified classifier
AadlPrototypeUtil.getAllPrototypes(classifier).forEachOrdered(p -> {
final PrototypeBindingsModelNode child = new PrototypeBindingsModelNode(parent, p);
final PrototypeBindingsModelNodeData cd = data(child);
final EObject childClassifier = cd.classifier == null ? null : cd.classifier.getResolvedValue(getResourceSet());
if (p instanceof ComponentPrototype) {
// Ignore classifiers which are not of the appropriate type. They could be carry overs from children which no longer exist
if (childClassifier instanceof SubcomponentType) {
final ComponentPrototypeBinding b = f.createComponentPrototypeBinding();
b.setFormal(p);
final ComponentPrototypeActual a = b.createActual();
// Set subcomponent type and create child bindings
a.setSubcomponentType((SubcomponentType) childClassifier);
AadlImportsUtil.ensurePackageIsImportedForClassifier(boBeingModified, childClassifier);
createNewBindings(child, childClassifier, boBeingModified, a.getBindings());
// Determine and set the component category
final ComponentCategory category;
if (childClassifier instanceof ComponentClassifier) {
category = ((ComponentClassifier) childClassifier).getCategory();
} else if (childClassifier instanceof ComponentPrototype) {
category = ((ComponentPrototype) childClassifier).getCategory();
} else {
category = null;
}
if (category == null) {
throw new RuntimeException("Unable to determine component category for " + childClassifier);
}
a.setCategory(category);
// Add the binding to the specified list
newBindings.add(b);
}
} else if (p instanceof FeatureGroupPrototype) {
if (childClassifier instanceof FeatureType) {
// Create the binding and the actual
final FeatureGroupPrototypeBinding b = f.createFeatureGroupPrototypeBinding();
b.setFormal(p);
final FeatureGroupPrototypeActual a = b.createActual();
// Set feature type and create child bindings
a.setFeatureType((FeatureType) childClassifier);
AadlImportsUtil.ensurePackageIsImportedForClassifier(boBeingModified, childClassifier);
createNewBindings(child, childClassifier, boBeingModified, a.getBindings());
// Add the binding to the specified list
newBindings.add(b);
}
} else if (p instanceof FeaturePrototype) {
// Ignore any bindings for which a type is not set
if (cd.type != null) {
final FeaturePrototypeBinding b = f.createFeaturePrototypeBinding();
b.setFormal(p);
if (cd.type instanceof AccessSpecificationBindingType) {
if (cd.direction instanceof AccessType) {
final AccessSpecificationBindingType type = (AccessSpecificationBindingType) cd.type;
final AccessSpecification actual = (AccessSpecification) b.createActual(Aadl2Package.eINSTANCE.getAccessSpecification());
// Configure the category and kind of the access specification
actual.setCategory(type.getCategory());
actual.setKind((AccessType) cd.direction);
// Set optional classifier
if (childClassifier instanceof ComponentClassifier) {
actual.setClassifier((ComponentClassifier) childClassifier);
AadlImportsUtil.ensurePackageIsImportedForClassifier(boBeingModified, childClassifier);
}
}
} else if (cd.type instanceof PortSpecificationBindingType) {
if (cd.direction instanceof DirectionType) {
final PortSpecificationBindingType type = (PortSpecificationBindingType) cd.type;
final PortSpecification actual = (PortSpecification) b.createActual(Aadl2Package.eINSTANCE.getPortSpecification());
actual.setCategory(type.getCategory());
// Set the direction
final DirectionType direction = (DirectionType) cd.direction;
switch(direction) {
case IN:
actual.setIn(true);
actual.setOut(false);
break;
case OUT:
actual.setIn(false);
actual.setOut(true);
break;
case IN_OUT:
actual.setIn(true);
actual.setOut(true);
break;
}
// Set optional classifier
if (childClassifier instanceof ComponentClassifier) {
AadlImportsUtil.ensurePackageIsImportedForClassifier(boBeingModified, childClassifier);
actual.setClassifier((ComponentClassifier) childClassifier);
}
}
} else if (cd.type instanceof FeatureReferenceBindingType) {
// Classifier is required
if (childClassifier instanceof FeaturePrototype) {
final FeaturePrototypeReference actual = (FeaturePrototypeReference) b.createActual(Aadl2Package.eINSTANCE.getFeaturePrototypeReference());
// Direction is optional. Ignore IN_OUT as it is not a valid option
if (cd.direction instanceof DirectionType) {
final DirectionType direction = (DirectionType) cd.direction;
switch(direction) {
case IN:
actual.setIn(true);
actual.setOut(false);
break;
case OUT:
actual.setIn(false);
actual.setOut(true);
break;
default:
break;
}
}
actual.setPrototype((FeaturePrototype) childClassifier);
}
} else {
throw new RuntimeException("Unexpected type: " + cd.type);
}
// Don't add the binding if it wasn't completely created
if (b.getActual() != null) {
// Add the binding to the specified list
newBindings.add(b);
}
}
} else {
throw new RuntimeException("Unexpected prototype class: " + p);
}
});
}
use of org.osate.aadl2.Feature in project osate2 by osate.
the class InstancePackageImpl method initializePackageContents.
/**
* Complete the initialization of the package and its meta-model. This
* method is guarded to have no affect on any invocation but its first.
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public void initializePackageContents() {
if (isInitialized) {
return;
}
isInitialized = true;
// Initialize package
setName(eNAME);
setNsPrefix(eNS_PREFIX);
setNsURI(eNS_URI);
// Obtain other dependent packages
Aadl2Package theAadl2Package = (Aadl2Package) EPackage.Registry.INSTANCE.getEPackage(Aadl2Package.eNS_URI);
// Create type parameters
// Set bounds for type parameters
// Add supertypes to classes
featureInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
featureInstanceEClass.getESuperTypes().add(getInstanceObject());
instanceObjectEClass.getESuperTypes().add(theAadl2Package.getNamedElement());
annexInstanceEClass.getESuperTypes().add(theAadl2Package.getNamedElement());
propertyAssociationInstanceEClass.getESuperTypes().add(theAadl2Package.getPropertyAssociation());
connectionInstanceEndEClass.getESuperTypes().add(getInstanceObject());
connectionInstanceEClass.getESuperTypes().add(getFlowElementInstance());
flowElementInstanceEClass.getESuperTypes().add(getInstanceObject());
systemOperationModeEClass.getESuperTypes().add(theAadl2Package.getMode());
modeInstanceEClass.getESuperTypes().add(getInstanceObject());
modeTransitionInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
modeTransitionInstanceEClass.getESuperTypes().add(getInstanceObject());
connectionReferenceEClass.getESuperTypes().add(getInstanceObject());
componentInstanceEClass.getESuperTypes().add(getConnectionInstanceEnd());
componentInstanceEClass.getESuperTypes().add(getFlowElementInstance());
flowSpecificationInstanceEClass.getESuperTypes().add(getFlowElementInstance());
endToEndFlowInstanceEClass.getESuperTypes().add(getFlowElementInstance());
systemInstanceEClass.getESuperTypes().add(getComponentInstance());
instanceReferenceValueEClass.getESuperTypes().add(theAadl2Package.getPropertyValue());
// Initialize classes and features; add operations and parameters
initEClass(// $NON-NLS-1$
featureInstanceEClass, // $NON-NLS-1$
FeatureInstance.class, // $NON-NLS-1$
"FeatureInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFeatureInstance_SrcFlowSpec(), getFlowSpecificationInstance(), // $NON-NLS-1$
getFlowSpecificationInstance_Source(), // $NON-NLS-1$
"srcFlowSpec", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
FeatureInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFeatureInstance_DstFlowSpec(), getFlowSpecificationInstance(), // $NON-NLS-1$
getFlowSpecificationInstance_Destination(), // $NON-NLS-1$
"dstFlowSpec", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
FeatureInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getFeatureInstance_FeatureInstance(), // $NON-NLS-1$
getFeatureInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"featureInstance", // $NON-NLS-1$
null, 0, -1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getFeatureInstance_Category(), // $NON-NLS-1$
getFeatureCategory(), // $NON-NLS-1$
"category", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getFeatureInstance_Direction(), // $NON-NLS-1$
theAadl2Package.getDirectionType(), // $NON-NLS-1$
"direction", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getFeatureInstance_Feature(), // $NON-NLS-1$
theAadl2Package.getFeature(), // $NON-NLS-1$
null, // $NON-NLS-1$
"feature", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getFeatureInstance_Index(), // $NON-NLS-1$
theAadl2Package.getInteger(), // $NON-NLS-1$
"index", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, FeatureInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
instanceObjectEClass, // $NON-NLS-1$
InstanceObject.class, // $NON-NLS-1$
"InstanceObject", // $NON-NLS-1$
IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getInstanceObject_AnnexInstance(), // $NON-NLS-1$
getAnnexInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"annexInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, InstanceObject.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
annexInstanceEClass, // $NON-NLS-1$
AnnexInstance.class, // $NON-NLS-1$
"AnnexInstance", // $NON-NLS-1$
IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getAnnexInstance_AnnexSubclause(), // $NON-NLS-1$
theAadl2Package.getAnnexSubclause(), // $NON-NLS-1$
null, // $NON-NLS-1$
"annexSubclause", null, 1, 1, AnnexInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
propertyAssociationInstanceEClass, // $NON-NLS-1$
PropertyAssociationInstance.class, // $NON-NLS-1$
"PropertyAssociationInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getPropertyAssociationInstance_PropertyAssociation(), theAadl2Package.getPropertyAssociation(), // $NON-NLS-1$
null, // $NON-NLS-1$
"propertyAssociation", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, // $NON-NLS-1$
PropertyAssociationInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
connectionInstanceEndEClass, // $NON-NLS-1$
ConnectionInstanceEnd.class, // $NON-NLS-1$
"ConnectionInstanceEnd", // $NON-NLS-1$
IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConnectionInstanceEnd_SrcConnectionInstance(), getConnectionInstance(), // $NON-NLS-1$
getConnectionInstance_Source(), // $NON-NLS-1$
"srcConnectionInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ConnectionInstanceEnd.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstanceEnd_DstConnectionInstance(), getConnectionInstance(), // $NON-NLS-1$
getConnectionInstance_Destination(), // $NON-NLS-1$
"dstConnectionInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ConnectionInstanceEnd.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
connectionInstanceEClass, // $NON-NLS-1$
ConnectionInstance.class, // $NON-NLS-1$
"ConnectionInstance", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getConnectionInstance_InSystemOperationMode(), getSystemOperationMode(), null, // $NON-NLS-1$
"inSystemOperationMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ConnectionInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionInstance_InModeTransition(), // $NON-NLS-1$
getModeTransitionInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inModeTransition", null, 0, -1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionInstance_Complete(), // $NON-NLS-1$
theAadl2Package.getBoolean(), // $NON-NLS-1$
"complete", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionInstance_Kind(), // $NON-NLS-1$
getConnectionKind(), // $NON-NLS-1$
"kind", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstance_Destination(), getConnectionInstanceEnd(), // $NON-NLS-1$
getConnectionInstanceEnd_DstConnectionInstance(), // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstance_ConnectionReference(), getConnectionReference(), null, // $NON-NLS-1$
"connectionReference", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
-1, // $NON-NLS-1$
ConnectionInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionInstance_Bidirectional(), // $NON-NLS-1$
theAadl2Package.getBoolean(), // $NON-NLS-1$
"bidirectional", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getConnectionInstance_Source(), getConnectionInstanceEnd(), // $NON-NLS-1$
getConnectionInstanceEnd_SrcConnectionInstance(), // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ConnectionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
flowElementInstanceEClass, // $NON-NLS-1$
FlowElementInstance.class, // $NON-NLS-1$
"FlowElementInstance", // $NON-NLS-1$
IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEClass(// $NON-NLS-1$
systemOperationModeEClass, // $NON-NLS-1$
SystemOperationMode.class, // $NON-NLS-1$
"SystemOperationMode", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getSystemOperationMode_CurrentMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"currentMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, SystemOperationMode.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEClass(// $NON-NLS-1$
modeInstanceEClass, // $NON-NLS-1$
ModeInstance.class, // $NON-NLS-1$
"ModeInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getModeInstance_SrcModeTransition(), getModeTransitionInstance(), // $NON-NLS-1$
getModeTransitionInstance_Source(), // $NON-NLS-1$
"srcModeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ModeInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getModeInstance_DstModeTransition(), getModeTransitionInstance(), // $NON-NLS-1$
getModeTransitionInstance_Destination(), // $NON-NLS-1$
"dstModeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ModeInstance.class, IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$//$NON-NLS-2$
getModeInstance_Initial(), // $NON-NLS-1$//$NON-NLS-2$
theAadl2Package.getBoolean(), // $NON-NLS-1$//$NON-NLS-2$
"initial", // $NON-NLS-1$//$NON-NLS-2$
"false", // $NON-NLS-1$//$NON-NLS-2$
1, // $NON-NLS-1$//$NON-NLS-2$
1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getModeInstance_Mode(), // $NON-NLS-1$
theAadl2Package.getMode(), // $NON-NLS-1$
null, // $NON-NLS-1$
"mode", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$//$NON-NLS-2$
getModeInstance_Derived(), // $NON-NLS-1$//$NON-NLS-2$
theAadl2Package.getBoolean(), // $NON-NLS-1$//$NON-NLS-2$
"derived", // $NON-NLS-1$//$NON-NLS-2$
"false", // $NON-NLS-1$//$NON-NLS-2$
1, // $NON-NLS-1$//$NON-NLS-2$
1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getModeInstance_Parent(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"parent", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ModeInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
modeTransitionInstanceEClass, // $NON-NLS-1$
ModeTransitionInstance.class, // $NON-NLS-1$
"ModeTransitionInstance", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getModeTransitionInstance_Destination(), getModeInstance(), getModeInstance_DstModeTransition(), // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getModeTransitionInstance_ModeTransition(), theAadl2Package.getModeTransition(), null, // $NON-NLS-1$
"modeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeTransitionInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, // $NON-NLS-1$
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getModeTransitionInstance_Trigger(), // $NON-NLS-1$
getFeatureInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"trigger", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getModeTransitionInstance_Source(), getModeInstance(), getModeInstance_SrcModeTransition(), // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
ModeTransitionInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
connectionReferenceEClass, // $NON-NLS-1$
ConnectionReference.class, // $NON-NLS-1$
"ConnectionReference", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getConnectionReference_Context(), // $NON-NLS-1$
getComponentInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"context", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionReference_Connection(), // $NON-NLS-1$
theAadl2Package.getConnection(), // $NON-NLS-1$
null, // $NON-NLS-1$
"connection", // $NON-NLS-1$
null, 1, 1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionReference_Source(), // $NON-NLS-1$
getConnectionInstanceEnd(), // $NON-NLS-1$
null, // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getConnectionReference_Destination(), // $NON-NLS-1$
getConnectionInstanceEnd(), // $NON-NLS-1$
null, // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, 1, 1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getConnectionReference_Reverse(), // $NON-NLS-1$
theAadl2Package.getBoolean(), // $NON-NLS-1$
"reverse", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ConnectionReference.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
componentInstanceEClass, // $NON-NLS-1$
ComponentInstance.class, // $NON-NLS-1$
"ComponentInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getComponentInstance_FeatureInstance(), // $NON-NLS-1$
getFeatureInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"featureInstance", // $NON-NLS-1$
null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_ComponentInstance(), // $NON-NLS-1$
getComponentInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"componentInstance", null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_ModeInstance(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"modeInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getComponentInstance_ModeTransitionInstance(), getModeTransitionInstance(), null, // $NON-NLS-1$
"modeTransitionInstance", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ComponentInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getComponentInstance_Category(), // $NON-NLS-1$
theAadl2Package.getComponentCategory(), // $NON-NLS-1$
"category", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_InMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getComponentInstance_FlowSpecification(), getFlowSpecificationInstance(), null, // $NON-NLS-1$
"flowSpecification", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
ComponentInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, // $NON-NLS-1$
IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_EndToEndFlow(), // $NON-NLS-1$
getEndToEndFlowInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"endToEndFlow", // $NON-NLS-1$
null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_ConnectionInstance(), // $NON-NLS-1$
getConnectionInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"connectionInstance", null, 0, -1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_Subcomponent(), // $NON-NLS-1$
theAadl2Package.getSubcomponent(), // $NON-NLS-1$
null, // $NON-NLS-1$
"subcomponent", null, 0, 1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEAttribute(// $NON-NLS-1$
getComponentInstance_Index(), // $NON-NLS-1$
theAadl2Package.getInteger(), // $NON-NLS-1$
"index", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_UNSETTABLE, !IS_ID, !IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getComponentInstance_Classifier(), // $NON-NLS-1$
theAadl2Package.getComponentClassifier(), // $NON-NLS-1$
null, // $NON-NLS-1$
"classifier", null, 0, 1, ComponentInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
flowSpecificationInstanceEClass, // $NON-NLS-1$
FlowSpecificationInstance.class, // $NON-NLS-1$
"FlowSpecificationInstance", !IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getFlowSpecificationInstance_Source(), getFeatureInstance(), getFeatureInstance_SrcFlowSpec(), // $NON-NLS-1$
"source", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, // $NON-NLS-1$
FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFlowSpecificationInstance_Destination(), getFeatureInstance(), // $NON-NLS-1$
getFeatureInstance_DstFlowSpec(), // $NON-NLS-1$
"destination", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
1, // $NON-NLS-1$
FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFlowSpecificationInstance_FlowSpecification(), theAadl2Package.getFlowSpecification(), null, // $NON-NLS-1$
"flowSpecification", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
FlowSpecificationInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getFlowSpecificationInstance_InMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, FlowSpecificationInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getFlowSpecificationInstance_InModeTransition(), getModeTransitionInstance(), null, // $NON-NLS-1$
"inModeTransition", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
FlowSpecificationInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
endToEndFlowInstanceEClass, // $NON-NLS-1$
EndToEndFlowInstance.class, // $NON-NLS-1$
"EndToEndFlowInstance", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getEndToEndFlowInstance_FlowElement(), // $NON-NLS-1$
getFlowElementInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"flowElement", // $NON-NLS-1$
null, 0, -1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(// $NON-NLS-1$
getEndToEndFlowInstance_InMode(), // $NON-NLS-1$
getModeInstance(), // $NON-NLS-1$
null, // $NON-NLS-1$
"inMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(getEndToEndFlowInstance_InSystemOperationMode(), getSystemOperationMode(), null, // $NON-NLS-1$
"inSystemOperationMode", // $NON-NLS-1$
null, // $NON-NLS-1$
0, // $NON-NLS-1$
-1, // $NON-NLS-1$
EndToEndFlowInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEReference(// $NON-NLS-1$
getEndToEndFlowInstance_EndToEndFlow(), // $NON-NLS-1$
theAadl2Package.getEndToEndFlow(), // $NON-NLS-1$
null, // $NON-NLS-1$
"endToEndFlow", null, 1, 1, EndToEndFlowInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
systemInstanceEClass, // $NON-NLS-1$
SystemInstance.class, // $NON-NLS-1$
"SystemInstance", // $NON-NLS-1$
!IS_ABSTRACT, // $NON-NLS-1$
!IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(// $NON-NLS-1$
getSystemInstance_SystemOperationMode(), // $NON-NLS-1$
getSystemOperationMode(), // $NON-NLS-1$
null, // $NON-NLS-1$
"systemOperationMode", null, 0, -1, SystemInstance.class, !IS_TRANSIENT, !IS_VOLATILE, IS_CHANGEABLE, IS_COMPOSITE, !IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, IS_ORDERED);
initEReference(getSystemInstance_ComponentImplementation(), theAadl2Package.getComponentImplementation(), null, // $NON-NLS-1$
"componentImplementation", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
SystemInstance.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, // $NON-NLS-1$
IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
initEClass(// $NON-NLS-1$
instanceReferenceValueEClass, // $NON-NLS-1$
InstanceReferenceValue.class, // $NON-NLS-1$
"InstanceReferenceValue", // $NON-NLS-1$
!IS_ABSTRACT, !IS_INTERFACE, IS_GENERATED_INSTANCE_CLASS);
initEReference(getInstanceReferenceValue_ReferencedInstanceObject(), getInstanceObject(), null, // $NON-NLS-1$
"referencedInstanceObject", // $NON-NLS-1$
null, // $NON-NLS-1$
1, // $NON-NLS-1$
1, // $NON-NLS-1$
InstanceReferenceValue.class, // $NON-NLS-1$
!IS_TRANSIENT, // $NON-NLS-1$
!IS_VOLATILE, IS_CHANGEABLE, !IS_COMPOSITE, IS_RESOLVE_PROXIES, !IS_UNSETTABLE, IS_UNIQUE, !IS_DERIVED, !IS_ORDERED);
// Initialize enums and add enum literals
// $NON-NLS-1$
initEEnum(connectionKindEEnum, ConnectionKind.class, "ConnectionKind");
addEEnumLiteral(connectionKindEEnum, ConnectionKind.FEATURE_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.ACCESS_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.PARAMETER_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.PORT_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.MODE_TRANSITION_CONNECTION);
addEEnumLiteral(connectionKindEEnum, ConnectionKind.FEATURE_GROUP_CONNECTION);
// $NON-NLS-1$
initEEnum(featureCategoryEEnum, FeatureCategory.class, "FeatureCategory");
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.DATA_PORT);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.EVENT_PORT);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.EVENT_DATA_PORT);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.PARAMETER);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.BUS_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.DATA_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.SUBPROGRAM_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.SUBPROGRAM_GROUP_ACCESS);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.FEATURE_GROUP);
addEEnumLiteral(featureCategoryEEnum, FeatureCategory.ABSTRACT_FEATURE);
// Create resource
createResource(eNS_URI);
// Create annotations
// http://www.eclipse.org/uml2/2.0.0/UML
createUMLAnnotations();
// duplicates
createDuplicatesAnnotations();
}
use of org.osate.aadl2.Feature in project osate2 by osate.
the class AadlStructureBridge method canBeLandmark.
@Override
public boolean canBeLandmark(final String handle) {
// Must be a component classifier, feature, subcomponent, etc, or a property declaration in a property set.
final Element aadlElement = (Element) getObjectForHandle(handle);
final boolean isLandmark = aadlElement instanceof PropertySet || aadlElement instanceof AadlPackage || aadlElement instanceof PackageSection || aadlElement instanceof Classifier || aadlElement instanceof ClassifierFeature || aadlElement instanceof PropertyConstant || aadlElement instanceof PropertyType || aadlElement instanceof Property;
return isLandmark;
}
use of org.osate.aadl2.Feature in project osate2 by osate.
the class AnalysisModel method populateConnectionPropagationPaths.
/**
* find the propagation paths between component instances with error propagations.
* This method handles different levels.
* It also handles both complete and incomplete connection instances (the latter are out only and in only connections
* @param connectionInstance
* @param level LEAF (lowest), TOP (highest), ALL (all combinations)
*/
protected void populateConnectionPropagationPaths(ConnectionInstance connectionInstance, PropagationPathLevel level) {
SystemOperationMode som = connectionInstance.getSystemInstance().getCurrentSystemOperationMode();
if (!connectionInstance.isActive(som)) {
return;
}
EList<ConnectionReference> connrefs = connectionInstance.getConnectionReferences();
if (connrefs.isEmpty()) {
return;
}
ErrorPropagation srcprop = null;
ComponentInstance srcCI = null;
ErrorPropagation dstprop = null;
ComponentInstance dstCI = null;
ConnectionReference first = connrefs.get(0);
// inonly is an incomplete connection instance that is only incoming,
// i.e., we only have incoming propagations.
boolean inonly = (first.getSource().getComponentInstance() == first.getContext());
ConnectionReference last = connrefs.get(connrefs.size() - 1);
// outonly is an incomplete connection instance that is only outgoing,
// i.e., we only have outgoing propagations.
boolean outonly = (last.getDestination().getComponentInstance() == last.getContext());
// list of additional source error propagations (i.e., those of
// enclosing components.
List<ComponentInstance> addlSrcCI = new ArrayList<ComponentInstance>();
List<ErrorPropagation> addlSrcEP = new ArrayList<ErrorPropagation>();
List<ComponentInstance> addlDstCI = new ArrayList<ComponentInstance>();
List<ErrorPropagation> addlDstEP = new ArrayList<ErrorPropagation>();
for (ConnectionReference connectionReference : connrefs) {
if (!connectionReference.isActive(som)) {
continue;
}
ConnectionInstanceEnd src = connectionReference.getSource();
ConnectionInstanceEnd dst = connectionReference.getDestination();
// remember the first (lowest in the hierarchy) src component
// instance with Error propagation
// srcprop is null until we found the source error propagation
ErrorPropagation foundEP = null;
if (src instanceof FeatureInstance) {
if (inonly) {
foundEP = EMV2Util.getIncomingErrorPropagation((FeatureInstance) src);
} else {
foundEP = EMV2Util.getOutgoingErrorPropagation((FeatureInstance) src);
}
} else if (src instanceof ComponentInstance) {
// instance instead of a feature instance
if (inonly) {
foundEP = EMV2Util.getIncomingAccessErrorPropagation((ComponentInstance) src);
} else {
foundEP = EMV2Util.getOutgoingAccessErrorPropagation((ComponentInstance) src);
}
}
if (foundEP != null) {
switch(level) {
case TOP:
srcprop = foundEP;
srcCI = src.getComponentInstance();
break;
case LEAF:
if (srcprop == null) {
srcprop = foundEP;
srcCI = src.getComponentInstance();
}
break;
case ALL:
addlSrcEP.add(foundEP);
addlSrcCI.add(src.getComponentInstance());
break;
}
}
// We look for destination error propagations
// it should be incoming except when outonly
ErrorPropagation founddst = null;
if (dst instanceof FeatureInstance) {
if (outonly) {
founddst = EMV2Util.getOutgoingErrorPropagation((FeatureInstance) dst);
} else {
founddst = EMV2Util.getIncomingErrorPropagation((FeatureInstance) dst);
}
} else if (dst instanceof ComponentInstance) {
// a shared model element
if (outonly) {
founddst = EMV2Util.getOutgoingAccessErrorPropagation((ComponentInstance) dst);
} else {
founddst = EMV2Util.getIncomingAccessErrorPropagation((ComponentInstance) dst);
}
}
if (founddst != null) {
switch(level) {
case TOP:
if (dstprop == null) {
dstprop = founddst;
dstCI = dst.getComponentInstance();
}
break;
case LEAF:
dstprop = founddst;
dstCI = dst.getComponentInstance();
break;
case ALL:
addlDstEP.add(foundEP);
addlDstCI.add(src.getComponentInstance());
break;
}
}
}
// record the results
switch(level) {
case TOP:
case LEAF:
if (srcprop != null && dstprop != null) {
// we found a source and destination. Add it if not already
// there.
addPropagationpathRecord(srcCI, srcprop, dstCI, dstprop, connectionInstance);
} else {
if (srcprop != null && addlSrcEP.size() > 1) {
dstprop = addlSrcEP.get(addlSrcEP.size() - 1);
dstCI = addlSrcCI.get(addlSrcCI.size() - 1);
}
}
break;
case ALL:
// FIXME: this is obviously wrong
for (int i = 0; i < addlSrcCI.size(); i++) {
for (int j = 0; i < addlDstCI.size(); i++) {
srcCI = addlSrcCI.get(i);
srcprop = addlSrcEP.get(i);
dstCI = addlDstCI.get(i);
dstprop = addlDstEP.get(i);
addPropagationpathRecord(srcCI, srcprop, dstCI, dstprop, connectionInstance);
}
}
break;
}
if (connectionInstance.isBidirectional()) {
// now work in the inverse direction since the conneciton is
// bi-directional
srcprop = null;
srcCI = null;
dstprop = null;
dstCI = null;
addlSrcCI.clear();
addlSrcEP.clear();
addlDstCI.clear();
addlDstEP.clear();
for (int i = connrefs.size() - 1; i >= 0; i--) {
ConnectionReference connectionReference = connrefs.get(i);
if (!connectionReference.isActive(som)) {
continue;
}
ConnectionInstanceEnd dst = connectionReference.getSource();
ConnectionInstanceEnd src = connectionReference.getDestination();
ErrorPropagation foundEP = null;
if (src instanceof FeatureInstance) {
if (inonly) {
foundEP = EMV2Util.getIncomingErrorPropagation((FeatureInstance) src);
} else {
foundEP = EMV2Util.getOutgoingErrorPropagation((FeatureInstance) src);
}
} else if (src instanceof ComponentInstance) {
// instance instead of a feature instance
if (inonly) {
foundEP = EMV2Util.getIncomingAccessErrorPropagation((ComponentInstance) src);
} else {
foundEP = EMV2Util.getOutgoingAccessErrorPropagation((ComponentInstance) src);
}
}
if (foundEP != null) {
switch(level) {
case TOP:
srcprop = foundEP;
srcCI = src.getComponentInstance();
break;
case LEAF:
if (srcprop == null) {
srcprop = foundEP;
srcCI = src.getComponentInstance();
}
break;
case ALL:
addlSrcEP.add(foundEP);
addlSrcCI.add(src.getComponentInstance());
break;
}
}
// We look for destination error propagations
// it should be incoming except when outonly
ErrorPropagation founddst = null;
if (dst instanceof FeatureInstance) {
if (outonly) {
founddst = EMV2Util.getOutgoingErrorPropagation((FeatureInstance) dst);
} else {
founddst = EMV2Util.getIncomingErrorPropagation((FeatureInstance) dst);
}
} else if (dst instanceof ComponentInstance) {
// a shared model element
if (outonly) {
founddst = EMV2Util.getOutgoingAccessErrorPropagation((ComponentInstance) dst);
} else {
founddst = EMV2Util.getIncomingAccessErrorPropagation((ComponentInstance) dst);
}
}
if (founddst != null) {
switch(level) {
case TOP:
if (dstprop == null) {
dstprop = founddst;
dstCI = dst.getComponentInstance();
}
break;
case LEAF:
dstprop = founddst;
dstCI = dst.getComponentInstance();
break;
case ALL:
addlDstEP.add(foundEP);
addlDstCI.add(src.getComponentInstance());
break;
}
}
}
// record the results
switch(level) {
case TOP:
case LEAF:
if (srcprop != null && dstprop != null) {
// we found a source and destination. Add it if not already
// there.
addPropagationpathRecord(srcCI, srcprop, dstCI, dstprop, connectionInstance);
} else {
if (srcprop != null && addlSrcEP.size() > 1) {
dstprop = addlSrcEP.get(addlSrcEP.size() - 1);
dstCI = addlSrcCI.get(addlSrcCI.size() - 1);
}
}
break;
case ALL:
// FIXME: this is obviously wrong
for (int i = 0; i < addlSrcCI.size(); i++) {
for (int j = 0; i < addlDstCI.size(); i++) {
srcCI = addlSrcCI.get(i);
srcprop = addlSrcEP.get(i);
dstCI = addlDstCI.get(i);
dstprop = addlDstEP.get(i);
addPropagationpathRecord(srcCI, srcprop, dstCI, dstprop, connectionInstance);
}
}
break;
}
}
}
Aggregations