Search in sources :

Example 26 with FeatureGroupType

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

the class FeatureGroupTypeRenameImpl method setRenamedFeatureGroupType.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setRenamedFeatureGroupType(FeatureGroupType newRenamedFeatureGroupType) {
    FeatureGroupType oldRenamedFeatureGroupType = renamedFeatureGroupType;
    renamedFeatureGroupType = newRenamedFeatureGroupType;
    if (eNotificationRequired()) {
        eNotify(new ENotificationImpl(this, Notification.SET, Aadl2Package.FEATURE_GROUP_TYPE_RENAME__RENAMED_FEATURE_GROUP_TYPE, oldRenamedFeatureGroupType, renamedFeatureGroupType));
    }
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) FeatureGroupType(org.osate.aadl2.FeatureGroupType)

Example 27 with FeatureGroupType

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

the class FeatureGroupTypeImpl method isInverseOf.

/**
 * returns true of this feature group type is the inverse of the feature group type pgt
 * @param pgt FeatureGroupType the feature group type to compare to
 * @return boolean true if they are inverse of each other
 */
// XXX: [AADL 1 -> AADL 2] Added to make instantiation work.
public boolean isInverseOf(FeatureGroupType pgt) {
    if (pgt == null) {
        OsateDebug.osateDebug("[FeatureGroupTypeImpl] isInverseOf, warning, null pgt arg");
        return false;
    }
    FeatureGroupType srct = this;
    FeatureGroupType dstt = pgt;
    final FeatureGroupType srcInv = srct.getInverse();
    final FeatureGroupType destInv = dstt.getInverse();
    return (((srcInv != null) && (srcInv == dstt)) || ((destInv != null) && (destInv == srct)));
}
Also used : FeatureGroupType(org.osate.aadl2.FeatureGroupType)

Example 28 with FeatureGroupType

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

the class FeatureGroupTypeImpl method findNamedElement.

public NamedElement findNamedElement(String name) {
    NamedElement searchResult = super.findNamedElement(name);
    if (searchResult != null) {
        return searchResult;
    }
    HashSet<FeatureGroupType> inverses = new HashSet<FeatureGroupType>();
    FeatureGroupType inverse = getInverse();
    while (inverse != null && getOwnedFeatures().isEmpty() && !inverses.contains(inverse)) {
        searchResult = Aadl2Util.findOwnedNamedElement(inverse, name);
        if (searchResult != null) {
            return searchResult;
        } else {
            inverses.add(inverse);
            inverse = inverse.getInverse();
        }
    }
    return null;
}
Also used : FeatureGroupType(org.osate.aadl2.FeatureGroupType) NamedElement(org.osate.aadl2.NamedElement) HashSet(java.util.HashSet)

Example 29 with FeatureGroupType

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

the class FeatureGroupTypeImpl method setInverse.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setInverse(FeatureGroupType newInverse) {
    FeatureGroupType oldInverse = inverse;
    inverse = newInverse;
    if (eNotificationRequired()) {
        eNotify(new ENotificationImpl(this, Notification.SET, Aadl2Package.FEATURE_GROUP_TYPE__INVERSE, oldInverse, inverse));
    }
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) FeatureGroupType(org.osate.aadl2.FeatureGroupType)

Example 30 with FeatureGroupType

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

the class GroupExtensionImpl method setExtended.

/**
 * <!-- begin-user-doc -->
 * <!-- end-user-doc -->
 * @generated
 */
public void setExtended(FeatureGroupType newExtended) {
    FeatureGroupType oldExtended = extended;
    extended = newExtended;
    if (eNotificationRequired()) {
        eNotify(new ENotificationImpl(this, Notification.SET, Aadl2Package.GROUP_EXTENSION__EXTENDED, oldExtended, extended));
    }
}
Also used : ENotificationImpl(org.eclipse.emf.ecore.impl.ENotificationImpl) FeatureGroupType(org.osate.aadl2.FeatureGroupType)

Aggregations

FeatureGroupType (org.osate.aadl2.FeatureGroupType)49 Classifier (org.osate.aadl2.Classifier)23 FeatureGroup (org.osate.aadl2.FeatureGroup)22 ComponentClassifier (org.osate.aadl2.ComponentClassifier)20 Feature (org.osate.aadl2.Feature)16 Subcomponent (org.osate.aadl2.Subcomponent)13 ComponentPrototype (org.osate.aadl2.ComponentPrototype)10 ComponentType (org.osate.aadl2.ComponentType)10 FeatureGroupPrototype (org.osate.aadl2.FeatureGroupPrototype)10 NamedElement (org.osate.aadl2.NamedElement)10 FeatureInstance (org.osate.aadl2.instance.FeatureInstance)9 AadlPackage (org.osate.aadl2.AadlPackage)8 FeatureGroupPrototypeBinding (org.osate.aadl2.FeatureGroupPrototypeBinding)8 EObject (org.eclipse.emf.ecore.EObject)7 ComponentImplementation (org.osate.aadl2.ComponentImplementation)7 ComponentPrototypeBinding (org.osate.aadl2.ComponentPrototypeBinding)7 FeatureGroupPrototypeActual (org.osate.aadl2.FeatureGroupPrototypeActual)7 ArrayList (java.util.ArrayList)6 ContainmentPathElement (org.osate.aadl2.ContainmentPathElement)6 EClass (org.eclipse.emf.ecore.EClass)5