Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYupanqui Munoz2017-07-26 08:41:49 -0400
committerPatrick Tessier2017-08-01 04:34:22 -0400
commit978c492e71a07f6359e0e671d9c4c31d8db92f63 (patch)
tree8496afe6f05e00b38923f08834b942a08ac9dde3 /plugins
parent1f7149255955c98858f2c636dfbe238692194055 (diff)
downloadorg.eclipse.papyrus-978c492e71a07f6359e0e671d9c4c31d8db92f63.tar.gz
org.eclipse.papyrus-978c492e71a07f6359e0e671d9c4c31d8db92f63.tar.xz
org.eclipse.papyrus-978c492e71a07f6359e0e671d9c4c31d8db92f63.zip
Bug 514518 - [ClassDiagram][Dnd] RedefinableTemplateSignature is not
droppable on the templated class Change-Id: Ifc32f3aad324e5d196b9462ca8a519c3d9b55dcc Signed-off-by: Yupanqui Munoz <yupanqui.munozjulho@cea.fr>
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java45
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java4
2 files changed, 49 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java
new file mode 100644
index 00000000000..a8ace5896ef
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/edit/part/CustomInterfaceEditPart.java
@@ -0,0 +1,45 @@
+/*****************************************************************************
+ * Copyright (c) 2017 CEA LIST and others.
+ *
+ * All rights reserved. This program and the accompanying materials
+ * are made available under the terms of the Eclipse Public License v1.0
+ * which accompanies this distribution, and is available at
+ * http://www.eclipse.org/legal/epl-v10.html
+ *
+ * Contributors:
+ * Yupanqui MUNOZ JULHO (CEA LIST) yupanqui.munozjulho@cea.fr - Bug 514518
+ *
+ *****************************************************************************/
+
+package org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part;
+
+import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.policies.ClassDiagramDragDropEditPolicy;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceEditPart;
+
+/**
+ * The custom edit policy for the interface edit part.
+ */
+public class CustomInterfaceEditPart extends InterfaceEditPart {
+
+ /**
+ * Constructor.
+ *
+ * @param view
+ */
+ public CustomInterfaceEditPart(View view) {
+ super(view);
+ }
+
+ /**
+ * @see org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceEditPart#createDefaultEditPolicies()
+ *
+ */
+ @Override
+ protected void createDefaultEditPolicies() {
+ super.createDefaultEditPolicies();
+ installEditPolicy(EditPolicyRoles.DRAG_DROP_ROLE, new ClassDiagramDragDropEditPolicy());
+ }
+
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java
index d9cf1f6d1d1..17d89e5c324 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/factory/CustomUMLEditPartFactory.java
@@ -29,6 +29,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomConstraintEd
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomDurationObservationEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomDurationObservationFloatingNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomDurationObservationStereotypeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomInterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomTimeObservationEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomTimeObservationFloatingNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.custom.edit.part.CustomTimeObservationStereotypeLabelEditPart;
@@ -42,6 +43,7 @@ import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DependencyBranchEditPart
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationFloatingNameEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.DurationObservationStereotypeLabelEditPart;
+import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.InterfaceEditPart;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartCN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.ModelEditPartTN;
import org.eclipse.papyrus.uml.diagram.clazz.edit.parts.SourceISLinkLabelEditPart;
@@ -99,6 +101,8 @@ public class CustomUMLEditPartFactory extends UMLEditPartFactory {
return new CustomDurationObservationStereotypeLabelEditPart(view);
case TimeObservationStereotypeLabelEditPart.VISUAL_ID:
return new CustomTimeObservationStereotypeLabelEditPart(view);
+ case InterfaceEditPart.VISUAL_ID:
+ return new CustomInterfaceEditPart(view);
}
}
}

Back to the top