Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/custom/edit/part/AssociationEndSourceEditPart.java')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/custom/edit/part/AssociationEndSourceEditPart.java56
1 files changed, 56 insertions, 0 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/custom/edit/part/AssociationEndSourceEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/custom/edit/part/AssociationEndSourceEditPart.java
new file mode 100644
index 00000000000..823e51e8103
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/diagram/clazz/custom/edit/part/AssociationEndSourceEditPart.java
@@ -0,0 +1,56 @@
+/*****************************************************************************
+ * Copyright (c) 2009 CEA LIST.
+ *
+ *
+ * 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:
+ * Patrick Tessier (CEA LIST) Patrick.tessier@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.diagram.clazz.custom.edit.part;
+
+import org.eclipse.emf.ecore.EObject;
+import org.eclipse.gmf.runtime.notation.View;
+import org.eclipse.papyrus.diagram.clazz.custom.helper.AssociationEndTargetLabelHelper;
+import org.eclipse.papyrus.diagram.clazz.edit.parts.AssociationTargetNameEditPart;
+import org.eclipse.ui.views.properties.IPropertySource;
+
+
+/**
+ * The Class AssociationEndSourceEditPart.
+ * Ensure the edition of ends in the diagram
+ */
+public class AssociationEndSourceEditPart extends AssociationTargetNameEditPart {
+
+ /**
+ * Instantiates a new association end source edit part.
+ *
+ * @param view
+ * the view
+ */
+ public AssociationEndSourceEditPart(View view) {
+ super(view);
+ // TODO Auto-generated constructor stub
+ }
+
+ /**
+ * @see org.eclipse.gmf.runtime.diagram.ui.editparts.GraphicalEditPart#resolveSemanticElement()
+ *
+ * @return
+ */
+
+ public EObject resolveSemanticElement() {
+ return AssociationEndTargetLabelHelper.getInstance().getUMLElement(this);
+ }
+
+ public Object getAdapter(Class key) {
+ if(key == IPropertySource.class) {
+ return resolveSemanticElement();
+ }
+ return super.getAdapter(key);
+ }
+}

Back to the top