Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKenn Hussey2014-01-10 02:08:18 +0000
committerKenn Hussey2014-01-10 02:08:18 +0000
commita31c2fb429595e3539640e942dd54c84812b4c8a (patch)
tree899757c7cba28bcf79c78c79366f1548a63ea355
parent19a528824440b620fd40a33a467dd3e8ba19138a (diff)
downloadorg.eclipse.uml2-bugs/420338.tar.gz
org.eclipse.uml2-bugs/420338.tar.xz
org.eclipse.uml2-bugs/420338.zip
[420338] Updating generator model and tweaking formatting.bugs/420338
-rw-r--r--plugins/org.eclipse.uml2.uml/model/UML.genmodel1
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java7
2 files changed, 7 insertions, 1 deletions
diff --git a/plugins/org.eclipse.uml2.uml/model/UML.genmodel b/plugins/org.eclipse.uml2.uml/model/UML.genmodel
index b3b77fd75..4b84ceb73 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 609bac6a0..bc1a8925a 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 @@ public class UMLUtil
eAttribute.setDefaultValueLiteral(default_);
}
-
+
eAttribute.setID(property.isID());
}
@@ -4964,9 +4964,11 @@ public class UMLUtil
.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 @@ public class UMLUtil
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);

Back to the top