use of org.osate.aadl2.PrivatePackageSection in project osate2 by osate.
the class AadlPackageImpl method basicSetOwnedPrivateSection.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated
*/
public NotificationChain basicSetOwnedPrivateSection(PrivatePackageSection newOwnedPrivateSection, NotificationChain msgs) {
PrivatePackageSection oldOwnedPrivateSection = ownedPrivateSection;
ownedPrivateSection = newOwnedPrivateSection;
if (eNotificationRequired()) {
ENotificationImpl notification = new ENotificationImpl(this, Notification.SET, Aadl2Package.AADL_PACKAGE__OWNED_PRIVATE_SECTION, oldOwnedPrivateSection, newOwnedPrivateSection);
if (msgs == null) {
msgs = notification;
} else {
msgs.add(notification);
}
}
Resource.Internal eInternalResource = eInternalResource();
if (eInternalResource == null || !eInternalResource.isLoading()) {
if (newOwnedPrivateSection != null) {
if (newOwnedPrivateSection != privateSection) {
setPrivateSection(newOwnedPrivateSection);
}
}
}
return msgs;
}
use of org.osate.aadl2.PrivatePackageSection in project osate2 by osate.
the class AadlBaVisitors method getBaPackageSections.
/**
* Return the package sections related to a given BehaviorAnnex. As
* "Classifier declarations in public sections are accessible to other
* packages, while classifiers in private sections can only be referenced
* within the private section of the same package".<br><br>
* table[0] always refers to public section.
* If the given BehaviorAnnex is declared in a private section, table's
* length equals to 2 and table[1] refers to the private section.
*
* @param ba The given BehaviorAnnex
* @return the package sections related to the given BehaviorAnnex.
*/
public static PackageSection[] getBaPackageSections(BehaviorAnnex ba) {
PackageSection[] result;
PackageSection container = Aadl2Visitors.getContainingPackageSection(ba);
// package's private section.
if (container instanceof PrivatePackageSection) {
result = new PackageSection[2];
result[1] = container;
result[0] = ((AadlPackage) container.eContainer()).getPublicSection();
} else {
result = new PackageSection[1];
result[0] = container;
}
return result;
}
use of org.osate.aadl2.PrivatePackageSection in project osate2 by osate.
the class AadlPackageImpl method setPrivateSection.
/**
* <!-- begin-user-doc -->
* <!-- end-user-doc -->
* @generated NOT
*/
public void setPrivateSection(PrivatePackageSection newPrivateSection) {
PrivatePackageSection oldPrivateSection = privateSection;
privateSection = newPrivateSection;
if (eNotificationRequired()) {
eNotify(new ENotificationImpl(this, Notification.SET, Aadl2Package.AADL_PACKAGE__PRIVATE_SECTION, oldPrivateSection, privateSection));
}
}
Aggregations