Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorvlorenzo2013-12-16 12:19:53 +0000
committerVincent Lorenzo2013-12-16 14:18:05 +0000
commit4572388aa8911f826562b6cd73decb6f5bd017fd (patch)
tree73501aaab9e89a6d2c098ed9327207625667332d /plugins/uml/diagram
parent9ec3b60da90030837711e94a0c7f753e3dc57f7f (diff)
downloadorg.eclipse.papyrus-4572388aa8911f826562b6cd73decb6f5bd017fd.tar.gz
org.eclipse.papyrus-4572388aa8911f826562b6cd73decb6f5bd017fd.tar.xz
org.eclipse.papyrus-4572388aa8911f826562b6cd73decb6f5bd017fd.zip
424099: [Diagram] Papyrus must provide a way to draw connections points
(big bendpoints) https://bugs.eclipse.org/bugs/show_bug.cgi?id=424099
Diffstat (limited to 'plugins/uml/diagram')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF8
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/CommonEdgeFigure.java49
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/UMLEdgeFigure.java3
3 files changed, 54 insertions, 6 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
index 7291d0120d2..733d161b8ea 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/META-INF/MANIFEST.MF
@@ -88,11 +88,11 @@ Require-Bundle: org.eclipse.papyrus.infra.core;bundle-version="1.0.0",
org.eclipse.papyrus.infra.emf.readonly;bundle-version="1.0.0",
org.eclipse.emf.facet.infra.browser.uicore;bundle-version="0.4.0",
org.eclipse.papyrus.infra.services.localizer;bundle-version="1.0.0",
- org.apache.batik.dom.svg;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.dom.svg,
org.w3c.dom.svg,
- org.apache.batik.css;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.util;bundle-version="[1.6.0,1.7.0)",
- org.apache.batik.dom;bundle-version="[1.6.0,1.7.0)",
+ org.apache.batik.css,
+ org.apache.batik.util,
+ org.apache.batik.dom,
org.eclipse.core.databinding;bundle-version="1.4.1",
org.eclipse.gmf.tooling.runtime
Bundle-Vendor: %providerName
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/CommonEdgeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/CommonEdgeFigure.java
new file mode 100644
index 00000000000..8fada6a47bb
--- /dev/null
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/CommonEdgeFigure.java
@@ -0,0 +1,49 @@
+/*****************************************************************************
+ * Copyright (c) 2013 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:
+ * Vincent Lorenzo (CEA LIST) vincent.lorenzo@cea.fr - Initial API and implementation
+ *
+ *****************************************************************************/
+package org.eclipse.papyrus.uml.diagram.common.figure.edge;
+
+
+import org.eclipse.papyrus.infra.gmfdiag.common.figure.edge.PapyrusEdgeFigure;
+import org.eclipse.papyrus.infra.gmfdiag.common.preferences.PreferencesConstantsHelper;
+import org.eclipse.papyrus.infra.gmfdiag.preferences.Activator;
+
+/**
+ *
+ * This figure allows to use the Papyrus Preference Store to know if connection point must be drawn or not.
+ * This class should be located in oep.infra.gmfdiag.common, but there is a dependency problem with oep.infra.gmfdiag.preferences
+ *
+ */
+public class CommonEdgeFigure extends PapyrusEdgeFigure {
+
+ /**
+ *
+ * Constructor.
+ *
+ */
+ public CommonEdgeFigure() {
+ super();
+ }
+
+ /**
+ *
+ * @see org.eclipse.papyrus.infra.gmfdiag.common.figure.edge.PapyrusEdgeFigure#getDrawBendpointPreferenceValue()
+ *
+ * @return
+ */
+ @Override
+ protected boolean getDrawBendpointPreferenceValue() {
+ final String value = PreferencesConstantsHelper.getPapyrusEditorConstant(PreferencesConstantsHelper.DRAW_CONNECTION_POINT);
+ return Activator.getDefault().getPreferenceStore().getBoolean(value);
+ }
+}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/UMLEdgeFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/UMLEdgeFigure.java
index d932d843645..d22e504a637 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/UMLEdgeFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/edge/UMLEdgeFigure.java
@@ -14,7 +14,6 @@
package org.eclipse.papyrus.uml.diagram.common.figure.edge;
import org.eclipse.draw2d.PositionConstants;
-import org.eclipse.gmf.runtime.draw2d.ui.figures.PolylineConnectionEx;
import org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel;
import org.eclipse.papyrus.uml.diagram.common.figure.node.IPapyrusUMLElementFigure;
import org.eclipse.swt.SWT;
@@ -23,7 +22,7 @@ import org.eclipse.swt.graphics.Image;
/**
* An UML edge is an edge that owns a label to display applied stereotypes
*/
-public class UMLEdgeFigure extends PolylineConnectionEx implements IPapyrusUMLElementFigure {
+public class UMLEdgeFigure extends CommonEdgeFigure implements IPapyrusUMLElementFigure {
/** Child label that displays applied stereotypes string */
protected WrappingLabel appliedStereotypeLabel;

Back to the top