Skip to main content
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorkhussey2006-06-13 15:29:20 +0000
committerkhussey2006-06-13 15:29:20 +0000
commite1b4c4584727974e366deca1e89c5dc634702264 (patch)
treeeda60c9b7d607e6ffd7ae28bd90d1c635b30b6e6
parent6a576ff60ea62beeafe28f2ef31a65875d43cc9c (diff)
downloadorg.eclipse.uml2.test-e1b4c4584727974e366deca1e89c5dc634702264.tar.gz
org.eclipse.uml2.test-e1b4c4584727974e366deca1e89c5dc634702264.tar.xz
org.eclipse.uml2.test-e1b4c4584727974e366deca1e89c5dc634702264.zip
[146842] Only setting merged visibility to public if already set.
-rw-r--r--plugins/org.eclipse.uml2.uml/src/org/eclipse/uml2/uml/util/UMLUtil.java17
1 files changed, 11 insertions, 6 deletions
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 ec2737c1..b2abde25 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
@@ -8,7 +8,7 @@
* Contributors:
* IBM - initial API and implementation
*
- * $Id: UMLUtil.java,v 1.33 2006/06/07 01:47:17 khussey Exp $
+ * $Id: UMLUtil.java,v 1.34 2006/06/13 15:29:20 khussey Exp $
*/
package org.eclipse.uml2.uml.util;
@@ -374,11 +374,16 @@ public class UMLUtil
protected void mergeNamedElement_Visibility(
NamedElement receivingNamedElement,
NamedElement mergedNamedElement) {
- receivingNamedElement
- .setVisibility(receivingNamedElement.getVisibility() == VisibilityKind.PRIVATE_LITERAL
- && mergedNamedElement.getVisibility() == VisibilityKind.PRIVATE_LITERAL
- ? VisibilityKind.PRIVATE_LITERAL
- : VisibilityKind.PUBLIC_LITERAL);
+
+ if (receivingNamedElement.getVisibility() == VisibilityKind.PRIVATE_LITERAL
+ && mergedNamedElement.getVisibility() == VisibilityKind.PRIVATE_LITERAL) {
+
+ receivingNamedElement
+ .setVisibility(VisibilityKind.PRIVATE_LITERAL);
+ } else if (receivingNamedElement.isSetVisibility()) {
+ receivingNamedElement
+ .setVisibility(VisibilityKind.PUBLIC_LITERAL);
+ }
}
protected void mergeProperty_IsDerived(Property receivingProperty,

Back to the top