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