Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorChristian W. Damus2015-07-02 14:55:31 +0000
committerChristian W. Damus2015-07-06 17:29:01 +0000
commitde23862092c33822330e09a0c90d4bbf0a7d647a (patch)
tree1e3ef2d558b549e0619023a4666fa911d5e0b2a0 /plugins/sysml/diagram
parent034320805ee2f44b9487ffb704d240a85fefa569 (diff)
downloadorg.eclipse.papyrus-de23862092c33822330e09a0c90d4bbf0a7d647a.tar.gz
org.eclipse.papyrus-de23862092c33822330e09a0c90d4bbf0a7d647a.tar.xz
org.eclipse.papyrus-de23862092c33822330e09a0c90d4bbf0a7d647a.zip
Bug 470296: Model-Diagram synchronisation causes infinite loop
https://bugs.eclipse.org/bugs/show_bug.cgi?id=470296 Ordinary structure diagrams do not support the dropping of associations to create ports or parts typed by them. The SysML IBD now does likewise. Change-Id: Ia76684a2d0b9a6e0bd030789c4acdb3e45fe47cd Reviewed-on: https://git.eclipse.org/r/51276 Tested-by: Hudson CI Reviewed-by: Christian W. Damus <give.a.damus@gmail.com> (cherry picked from commit 338a7f065c007d503e71718892797cba436cc317)
Diffstat (limited to 'plugins/sysml/diagram')
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java8
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java
index 8778d0d35ac..efd2200eafd 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.internalblock/src/org/eclipse/papyrus/sysml/diagram/internalblock/utils/TypeDropHelper.java
@@ -1,5 +1,5 @@
/*****************************************************************************
- * Copyright (c) 2011 CEA LIST.
+ * Copyright (c) 2011, 2015 CEA LIST, Christian W. Damus, and others.
*
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
@@ -9,6 +9,7 @@
* Contributors:
*
* CEA LIST - Initial API and implementation
+ * Christian W. Damus - bug 470296
*
*****************************************************************************/
package org.eclipse.papyrus.sysml.diagram.internalblock.utils;
@@ -42,6 +43,7 @@ import org.eclipse.papyrus.infra.services.edit.service.IElementEditService;
import org.eclipse.papyrus.sysml.service.types.element.SysMLElementTypes;
import org.eclipse.papyrus.uml.diagram.common.helper.ElementHelper;
import org.eclipse.papyrus.uml.service.types.element.UMLElementTypes;
+import org.eclipse.uml2.uml.Association;
import org.eclipse.uml2.uml.DataType;
import org.eclipse.uml2.uml.Signal;
import org.eclipse.uml2.uml.Type;
@@ -279,7 +281,9 @@ public class TypeDropHelper extends ElementHelper {
private boolean isValidPortType(Object object) {
boolean isValid = false;
- if ((object != null) && (object instanceof Type)) {
+ // Bug 470296: Associations are not useful types for ports or any kind of property. Note that this
+ // deliberately excludes association-classes, also, because their primary semantics is that of an association
+ if ((object != null) && (object instanceof Type) && !(object instanceof Association)) {
isValid = true;
}

Back to the top