[420338] Updating generator model and tweaking formatting.
diff --git a/plugins/org.eclipse.uml2.uml/model/UML.genmodel b/plugins/org.eclipse.uml2.uml/model/UML.genmodel
index b3b77fd..4b84ceb 100644
--- a/plugins/org.eclipse.uml2.uml/model/UML.genmodel
+++ b/plugins/org.eclipse.uml2.uml/model/UML.genmodel
@@ -32,6 +32,7 @@
<details key="INVOCATION_DELEGATES" value="IGNORE"/>
<details key="UNTYPED_PROPERTIES" value="REPORT"/>
<details key="NON_API_INVARIANTS" value="IGNORE"/>
+ <details key="OPPOSITE_ROLE_NAMES" value="IGNORE"/>
</genAnnotations>
<foreignModel>UML.merged.uml</foreignModel>
<genPackages xsi:type="genmodel:GenPackage" prefix="UML" basePackage="org.eclipse.uml2"
diff --git a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
index 609bac6..bc1a892 100644
--- a/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
+++ b/plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java
@@ -4927,7 +4927,7 @@
eAttribute.setDefaultValueLiteral(default_);
}
-
+
eAttribute.setID(property.isID());
}
@@ -4964,9 +4964,11 @@
.get(OPTION__OPPOSITE_ROLE_NAMES))) {
Property otherEnd = property.getOtherEnd();
+
if (otherEnd != null) {
String explicitRoleName = otherEnd.getName();
String implicitRoleName = namespace.getName();
+
if (!isEmpty(explicitRoleName)
&& !explicitRoleName.equals(implicitRoleName)) {
@@ -8944,13 +8946,16 @@
Property opposite = association.createOwnedEnd(null,
classifier);
+
if (OPTION__PROCESS.equals(options
.get(OPTION__OPPOSITE_ROLE_NAMES))) {
+
String oppositeRoleName = EcoreUtil
.getAnnotation(
eReference,
EMOFExtendedMetaData.EMOF_PROPERTY_OPPOSITE_ROLE_NAME_ANNOTATION_SOURCE,
EMOFExtendedMetaData.EMOF_COMMENT_BODY);
+
if (oppositeRoleName != null) {
opposite.setName(oppositeRoleName);