- *
*
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.AssistantPackage#getAssistedElementTypeFilter()
* @model
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ConnectionAssistant.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ConnectionAssistant.java
index a5325a5a0c7..302e28f59f1 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ConnectionAssistant.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ConnectionAssistant.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -22,6 +22,7 @@ import org.eclipse.papyrus.infra.filters.Filter;
*
*
- *
*
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.AssistantPackage#getConnectionAssistant()
* @model
@@ -42,10 +42,10 @@ public interface ConnectionAssistant extends Assistant
* It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getConnectionAssistants Connection Assistant}'.
*
* This feature subsets the following features:
+ *
* If the meaning of the 'Owning Provider' container reference isn't clear, there really should be more of a description here...
@@ -105,10 +105,10 @@ public interface ConnectionAssistant extends Assistant
* Returns the value of the 'Owned Source Filter' containment reference.
*
* This feature subsets the following features:
+ *
* If the meaning of the 'Owned Source Filter' containment reference isn't clear, there really should be more of a description here...
@@ -182,10 +182,10 @@ public interface ConnectionAssistant extends Assistant
* Returns the value of the 'Owned Target Filter' containment reference.
*
* This feature subsets the following features:
+ *
* If the meaning of the 'Owned Target Filter' containment reference isn't clear, there really should be more of a description here...
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ElementTypeFilter.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ElementTypeFilter.java
index 0ff7267f920..3d40ef17a3a 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ElementTypeFilter.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/ElementTypeFilter.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -22,12 +22,12 @@ import org.eclipse.papyrus.infra.filters.Filter;
*
*
* The following features are supported:
+ *
*
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ElementTypeFilter#getElementTypeID Element Type ID}
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ElementTypeFilter#getElementType Element Type}
* If the meaning of the 'Popup Assistant' containment reference list isn't clear, there really should be more of a description here...
@@ -215,10 +226,10 @@ public interface ModelingAssistantProvider extends EObject, IModelingAssistantPr
* It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ConnectionAssistant#getOwningProvider Owning Provider}'.
*
* This feature subsets the following features:
+ *
* If the meaning of the 'Connection Assistant' containment reference list isn't clear, there really should be more of a description here...
@@ -353,4 +364,48 @@ public interface ModelingAssistantProvider extends EObject, IModelingAssistantPr
*/
EList getExcludedElementTypeIDs();
+ /**
+ * Returns the value of the 'Relationship Type' attribute list.
+ * The list contents are of type {@link org.eclipse.gmf.runtime.emf.type.core.IElementType}.
+ *
+ * This feature subsets the following features:
+ *
+ *
+ *
'{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getElementTypes() Element Type}'
+ *
+ *
+ *
+ *
+ * The element types supported by the provider.
+ *
+ *
+ * @return the value of the 'Relationship Type' attribute list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.assistant.AssistantPackage#getModelingAssistantProvider_RelationshipType()
+ * @model unique="false" dataType="org.eclipse.papyrus.infra.gmfdiag.assistant.ElementType" transient="true" changeable="false" volatile="true" derived="true" ordered="false"
+ * @generated
+ */
+ EList getRelationshipTypes();
+
+ /**
+ * Returns the value of the 'Relationship Type ID' attribute list.
+ * The list contents are of type {@link java.lang.String}.
+ *
+ * This feature subsets the following features:
+ *
+ *
+ *
'{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getElementTypeIDs() Element Type ID}'
+ *
+ *
+ *
+ *
+ * The identifiers of element types supported by the provider.
+ *
+ *
+ * @return the value of the 'Relationship Type ID' attribute list.
+ * @see org.eclipse.papyrus.infra.gmfdiag.assistant.AssistantPackage#getModelingAssistantProvider_RelationshipTypeID()
+ * @model dataType="org.eclipse.uml2.types.String" ordered="false"
+ * @generated
+ */
+ EList getRelationshipTypeIDs();
+
} // ModelingAssistantProvider
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/PopupAssistant.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/PopupAssistant.java
index e6c5f27940e..869653de62d 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/PopupAssistant.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/PopupAssistant.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -22,12 +22,12 @@ import org.eclipse.papyrus.infra.filters.Filter;
*
*
*
* @see org.eclipse.papyrus.infra.gmfdiag.assistant.AssistantPackage#getPopupAssistant()
* @model
@@ -67,10 +67,10 @@ public interface PopupAssistant extends Assistant
* Returns the value of the 'Owned Filter' containment reference.
*
* This feature subsets the following features:
+ *
* If the meaning of the 'Owned Filter' containment reference isn't clear, there really should be more of a description here...
@@ -117,10 +117,10 @@ public interface PopupAssistant extends Assistant
* It is bidirectional and its opposite is '{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getPopupAssistants Popup Assistant}'.
*
* This feature subsets the following features:
+ *
* If the meaning of the 'Owning Provider' container reference isn't clear, there really should be more of a description here...
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/AssistantImpl.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/AssistantImpl.java
index 7789c03dd3f..35eea1c6c3c 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/AssistantImpl.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/AssistantImpl.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -38,12 +38,12 @@ import org.eclipse.uml2.common.util.CacheAdapter;
*
*
- *
*
* @generated
*/
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ConnectionAssistantImpl.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ConnectionAssistantImpl.java
index 1c242f7e11f..4a0c1264224 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ConnectionAssistantImpl.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ConnectionAssistantImpl.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -34,6 +34,7 @@ import org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider;
*
*
- *
*
* @generated
*/
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ElementTypeFilterImpl.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ElementTypeFilterImpl.java
index b5408df7093..4f948e6d660 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ElementTypeFilterImpl.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/impl/ElementTypeFilterImpl.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -33,13 +33,13 @@ import org.eclipse.uml2.common.util.CacheAdapter;
*
*
- *
*
* @generated
*/
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistantOperations.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistantOperations.java
index aa3cdb5dd7d..466cd0b80b0 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistantOperations.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistantOperations.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -22,10 +22,10 @@ import org.eclipse.papyrus.infra.gmfdiag.assistant.Assistant;
*
*
* The following operations are supported:
+ *
*
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.Assistant#getElementType() Get Element Type}
*
- *
*
* @generated
*/
@@ -63,4 +63,4 @@ public class AssistantOperations
return result;
}
-} // AssistantOperations
\ No newline at end of file
+} // AssistantOperations
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistedElementTypeFilterOperations.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistedElementTypeFilterOperations.java
index 4be323aef90..2059c2a0ec7 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistedElementTypeFilterOperations.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/AssistedElementTypeFilterOperations.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -30,11 +30,11 @@ import com.google.common.collect.Sets;
*
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.AssistedElementTypeFilter#getProvider() Get Provider}
*
- *
*
* @generated
*/
@@ -104,4 +104,4 @@ public class AssistedElementTypeFilterOperations
return result;
}
-} // AssistedElementTypeFilterOperations
\ No newline at end of file
+} // AssistedElementTypeFilterOperations
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ElementTypeFilterOperations.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ElementTypeFilterOperations.java
index 66b8c568000..d147d51bceb 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ElementTypeFilterOperations.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/internal/operations/ElementTypeFilterOperations.java
@@ -1,5 +1,5 @@
/**
- * Copyright (c) 2014 Christian W. Damus and others.
+ * Copyright (c) 2014, 2015 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
@@ -25,12 +25,12 @@ import org.eclipse.papyrus.infra.gmfdiag.assistant.core.util.ModelingAssistantUt
*
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getClientContext() Get Client Context}
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getElementType(java.lang.String) Get Element Type}
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getExcludedElementTypes() Get Excluded Element Types}
+ *
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getRelationshipTypes() Get Relationship Types}
+ *
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#isRelationshipType(org.eclipse.gmf.runtime.emf.type.core.IElementType) Is Relationship Type}
*
- *
*
* @generated
*/
@@ -293,7 +297,7 @@ public class ModelingAssistantProviderOperations
// The filter, if any, needs to match but we also don't want to propose connections
// from relationships (only node-like things)
if (((next.getSourceFilter() == null) || next.getSourceFilter().matches(sourceType))
- && !isRelationship(modelingAssistantProvider, sourceType)) {
+ && !modelingAssistantProvider.isRelationshipType(sourceType)) {
ModelingAssistantUtil.collectAllConcreteSubtypes(sourceType, modelingAssistantProvider, types);
}
}
@@ -335,7 +339,7 @@ public class ModelingAssistantProviderOperations
// The filter, if any, needs to match but we also don't want to propose connections
// to relationships (only node-like things)
if (((next.getTargetFilter() == null) || next.getTargetFilter().matches(targetType))
- && !isRelationship(modelingAssistantProvider, targetType)) {
+ && !modelingAssistantProvider.isRelationshipType(targetType)) {
ModelingAssistantUtil.collectAllConcreteSubtypes(targetType, modelingAssistantProvider, types);
}
}
@@ -536,4 +540,62 @@ public class ModelingAssistantProviderOperations
return result.sort(alphabetical()).build();
}
+ /**
+ *
+ *
+ *
+ * @generated NOT
+ */
+ public static EList getRelationshipTypes(ModelingAssistantProvider modelingAssistantProvider)
+ {
+ Set types = Sets.newLinkedHashSet();
+ for (String next : modelingAssistantProvider.getRelationshipTypeIDs()) {
+ IElementType type = modelingAssistantProvider.getElementType(next);
+ if (type != null) {
+ types.add(type);
+ }
+ }
+
+ ImmutableEListBuilder result = ECollections2.immutableEListBuilder();
+ result.addAll(types);
+ return result.sort(alphabetical()).build();
+ }
+
+ /**
+ *
+ *
+ *
+ * @generated NOT
+ */
+ @SuppressWarnings("unchecked")
+ public static boolean isRelationshipType(ModelingAssistantProvider modelingAssistantProvider, IElementType elementType)
+ {
+ Set relationshipTypes;
+ CacheAdapter cache = CacheAdapter.getCacheAdapter(modelingAssistantProvider);
+ if (cache == null) {
+ relationshipTypes = ImmutableSet.copyOf(modelingAssistantProvider.getRelationshipTypes());
+ } else {
+ // We aren't going to use this EOperation having a parameter for any other cache, so use it for this
+ relationshipTypes = (Set) cache.get(modelingAssistantProvider.eResource(), modelingAssistantProvider, AssistantPackage.Literals.MODELING_ASSISTANT_PROVIDER___IS_RELATIONSHIP_TYPE__IELEMENTTYPE);
+ if (relationshipTypes == null) {
+ cache.put(modelingAssistantProvider.eResource(), modelingAssistantProvider, AssistantPackage.Literals.MODELING_ASSISTANT_PROVIDER___IS_RELATIONSHIP_TYPE__IELEMENTTYPE,
+ relationshipTypes = ImmutableSet.copyOf(modelingAssistantProvider.getRelationshipTypes()));
+ }
+ }
+
+ boolean result = relationshipTypes.contains(elementType);
+
+ if (!result) {
+ // Maybe it's a specialization of a relationship type
+ IElementType[] allSupers = elementType.getAllSuperTypes();
+
+ // The super types have the more specific types after the more general
+ for (int i = allSupers.length - 1; !result && (i >= 0); i--) {
+ result = relationshipTypes.contains(allSupers[i]);
+ }
+ }
+
+ return result;
+ }
+
} // ModelingAssistantProviderOperations
diff --git a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java
index bb176208ce9..602b6739d12 100644
--- a/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java
+++ b/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant/src/org/eclipse/papyrus/infra/gmfdiag/assistant/core/util/ModelingAssistantUtil.java
@@ -34,7 +34,6 @@ import org.eclipse.gmf.runtime.emf.type.core.ISpecializationType;
import org.eclipse.gmf.runtime.notation.Edge;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.core.utils.AdapterUtils;
-import org.eclipse.papyrus.infra.gmfdiag.assistant.ConnectionAssistant;
import org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider;
import org.eclipse.papyrus.infra.gmfdiag.assistant.internal.core.util.ProxyElementType;
import org.eclipse.papyrus.infra.gmfdiag.common.commands.SemanticElementAdapter;
@@ -345,19 +344,4 @@ public class ModelingAssistantUtil {
collator.setStrength(Collator.PRIMARY);
return Ordering.from(collator).onResultOf(primaryNameFunction()).compound(Ordering.natural().onResultOf(visualIDFunction()));
}
-
- public static boolean isRelationship(ModelingAssistantProvider provider, IElementType elementType) {
- boolean result = false;
-
- // A relationship is a type for which we provide connection assistants
- for (ConnectionAssistant next : provider.getConnectionAssistants()) {
- IElementType relationshipType = next.getElementType();
- if ((relationshipType != null) && isSubtype(elementType, relationshipType)) {
- result = true;
- break;
- }
- }
-
- return result;
- }
}
diff --git a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator/src/org/eclipse/papyrus/uml/profile/assistants/generator/ModelingAssistantProviderRule.xtend b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator/src/org/eclipse/papyrus/uml/profile/assistants/generator/ModelingAssistantProviderRule.xtend
index 5027642b9d8..c9cb22d39d9 100644
--- a/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator/src/org/eclipse/papyrus/uml/profile/assistants/generator/ModelingAssistantProviderRule.xtend
+++ b/plugins/uml/assistants/org.eclipse.papyrus.uml.profile.assistants.generator/src/org/eclipse/papyrus/uml/profile/assistants/generator/ModelingAssistantProviderRule.xtend
@@ -57,6 +57,7 @@ class ModelingAssistantProviderRule {
popupAssistants.addAll(ext.metaclass.diagramSpecificElementTypes.map[ext.toPopupAssistant(it)])
} else {
// Connection assistants to create relationships
+ relationshipTypeIDs.addAll(profileElementTypes)
connectionAssistants.addAll(ext.metaclass.diagramSpecificElementTypes.map[ext.toConnectionAssistant(it)])
}
]
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.assistants b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.assistants
index b656fe9e8d8..08f47f01b2f 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.assistants
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/model/classdiagram.assistants
@@ -518,4 +518,28 @@
org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014org.eclipse.papyrus.uml.diagram.clazz.Association_2015org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014
+ org.eclipse.papyrus.uml.diagram.clazz.AssociationClass_4017
+ org.eclipse.papyrus.uml.diagram.clazz.Association_4001
+ org.eclipse.papyrus.uml.diagram.clazz.Association_4019
+ org.eclipse.papyrus.uml.diagram.clazz.Generalization_4002
+ org.eclipse.papyrus.uml.diagram.clazz.InterfaceRealization_4003
+ org.eclipse.papyrus.uml.diagram.clazz.Substitution_4004
+ org.eclipse.papyrus.uml.diagram.clazz.Realization_4005
+ org.eclipse.papyrus.uml.diagram.clazz.Abstraction_4006
+ org.eclipse.papyrus.uml.diagram.clazz.Usage_4007
+ org.eclipse.papyrus.uml.diagram.clazz.Dependency_4008
+ org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018
+ org.eclipse.papyrus.uml.diagram.clazz.ElementImport_4009
+ org.eclipse.papyrus.uml.diagram.clazz.PackageImport_4010
+ org.eclipse.papyrus.uml.diagram.clazz.PackageMerge_4011
+ org.eclipse.papyrus.uml.diagram.clazz.ProfileApplication_4012
+ org.eclipse.papyrus.uml.diagram.clazz.CommentAnnotatedElement_4013
+ org.eclipse.papyrus.uml.diagram.clazz.ConstraintConstrainedElement_4014
+ org.eclipse.papyrus.uml.diagram.clazz.TemplateBinding_4015
+ org.eclipse.papyrus.uml.diagram.clazz.GeneralizationSet_4020
+ org.eclipse.papyrus.uml.diagram.clazz.InstanceSpecificationLink_4021
+ org.eclipse.papyrus.uml.diagram.clazz.TimeObservationEvent_4024
+ org.eclipse.papyrus.uml.diagram.clazz.DurationObservationEvent_4025
+ org.eclipse.papyrus.uml.diagram.clazz.InformationFlow_4026
+ org.eclipse.papyrus.uml.diagram.clazz.ConstraintContext_8500
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.assistants b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.assistants
index 5e086a526a1..6df4285f75d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.assistants
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.usecase/models/usecaseDiagram.assistants
@@ -217,4 +217,16 @@
org.eclipse.papyrus.uml.diagram.usecase.Realization_4017org.eclipse.papyrus.uml.diagram.usecase.PackageMerge_4018org.eclipse.papyrus.uml.diagram.usecase.PackageImport_4019
+ org.eclipse.papyrus.uml.diagram.usecase.Include_4008
+ org.eclipse.papyrus.uml.diagram.usecase.Extend_4009
+ org.eclipse.papyrus.uml.diagram.usecase.Generalization_4010
+ org.eclipse.papyrus.uml.diagram.usecase.Association_4011
+ org.eclipse.papyrus.uml.diagram.usecase.ConstraintConstrainedElement_4012
+ org.eclipse.papyrus.uml.diagram.usecase.Dependency_4013
+ org.eclipse.papyrus.uml.diagram.usecase.CommentAnnotatedElement_4014
+ org.eclipse.papyrus.uml.diagram.usecase.Abstraction_4015
+ org.eclipse.papyrus.uml.diagram.usecase.Usage_4016
+ org.eclipse.papyrus.uml.diagram.usecase.Realization_4017
+ org.eclipse.papyrus.uml.diagram.usecase.PackageMerge_4018
+ org.eclipse.papyrus.uml.diagram.usecase.PackageImport_4019
diff --git a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-all.assistants b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-all.assistants
index 2fc1faa9cfd..6773b06aee8 100644
--- a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-all.assistants
+++ b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-all.assistants
@@ -268,4 +268,6 @@
org.eclipse.papyrus.uml.diagram.clazz.Association_2015org.eclipse.papyrus.uml.diagram.clazz.Dependency_4018org.eclipse.papyrus.uml.diagram.clazz.Dependency_2014
+ org.eclipse.papyrus.example.j2ee.Import
+ org.eclipse.papyrus.example.j2ee.Web
diff --git a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-usecase.assistants b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-usecase.assistants
index 7a583335c82..ac81b0d7075 100644
--- a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-usecase.assistants
+++ b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/j2ee-usecase.assistants
@@ -122,4 +122,6 @@
org.eclipse.papyrus.example.j2ee.WebScenario_3012org.eclipse.papyrus.example.j2ee.WebScenario_2013org.eclipse.papyrus.example.j2ee.WebScenario_2014
+ org.eclipse.papyrus.example.j2ee.Import_4013
+ org.eclipse.papyrus.example.j2ee.Web_4011
diff --git a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/test.assistants b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/test.assistants
index a92253b3e28..52043825be4 100644
--- a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/test.assistants
+++ b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/resources/test.assistants
@@ -14,4 +14,6 @@
org.eclipse.papyrus.uml.Packageorg.eclipse.papyrus.uml.Generalizationorg.eclipse.papyrus.uml.AssociationClass
+ org.eclipse.papyrus.uml.Usage
+ org.eclipse.papyrus.uml.Generalization
diff --git a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java
index 88dfd8893e7..cac460ceaaa 100644
--- a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/AssistedElementTypeFilterTest.java
@@ -15,12 +15,9 @@ import static org.eclipse.papyrus.infra.gmfdiag.assistant.tests.ElementTypesUtil
import static org.hamcrest.CoreMatchers.is;
import static org.hamcrest.CoreMatchers.nullValue;
import static org.hamcrest.MatcherAssert.assertThat;
-
import java.util.Arrays;
-
import junit.framework.TestCase;
import junit.textui.TestRunner;
-
import org.eclipse.emf.common.util.URI;
import org.eclipse.emf.ecore.resource.Resource;
import org.eclipse.emf.ecore.resource.ResourceSet;
diff --git a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java
index c54f45d5d29..cf66119a9db 100644
--- a/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java
+++ b/tests/junit/plugins/infra/gmfdiag/assistant/org.eclipse.papyrus.infra.gmfdiag.assistant.tests/src-gen/org/eclipse/papyrus/infra/gmfdiag/assistant/tests/ModelingAssistantProviderTest.java
@@ -53,6 +53,7 @@ import org.hamcrest.CoreMatchers;
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getElementTypes() Element Type}
{@link org.eclipse.gmf.runtime.emf.ui.services.modelingassistant.IModelingAssistantProvider#getTypesForPopupBar(org.eclipse.core.runtime.IAdaptable) Get Types For Popup Bar}
*
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#getElementType(java.lang.String) Get Element Type}
+ *
{@link org.eclipse.papyrus.infra.gmfdiag.assistant.ModelingAssistantProvider#isRelationshipType(org.eclipse.gmf.runtime.emf.type.core.IElementType) Is Relationship Type}