Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCamille Letavernier2014-02-18 15:41:33 +0000
committerCamille Letavernier2014-02-19 13:00:48 +0000
commit723cbd91221eb27b6e1f435d924cb954facf721b (patch)
treee5771ec43cbdba8d1048d968350fd0de0c7dd52a
parentc16ef5a1249f77d2e8fde41a289b18bbe34f4814 (diff)
downloadorg.eclipse.papyrus-723cbd91221eb27b6e1f435d924cb954facf721b.tar.gz
org.eclipse.papyrus-723cbd91221eb27b6e1f435d924cb954facf721b.tar.xz
org.eclipse.papyrus-723cbd91221eb27b6e1f435d924cb954facf721b.zip
422045: [General diagrams] No graphical impact when connector line width
change from the appearance page https://bugs.eclipse.org/bugs/show_bug.cgi?id=422045
-rw-r--r--plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java17
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/UMLConnectionNodeEditPart.java11
2 files changed, 21 insertions, 7 deletions
diff --git a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java
index 78884083e9f..90763608a57 100644
--- a/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java
+++ b/plugins/sysml/diagram/org.eclipse.papyrus.sysml.diagram.common/src-gen/org/eclipse/papyrus/uml/diagram/common/edit/part/ConnectorEditPart.java
@@ -19,10 +19,7 @@ import org.eclipse.gmf.runtime.diagram.ui.editpolicies.EditPolicyRoles;
import org.eclipse.gmf.runtime.notation.View;
import org.eclipse.papyrus.infra.gmfdiag.common.editpolicies.DefaultSemanticEditPolicy;
import org.eclipse.papyrus.sysml.blocks.BindingConnector;
-import org.eclipse.papyrus.sysml.blocks.BlocksPackage;
import org.eclipse.papyrus.uml.diagram.common.figure.ConnectorEdgeFigure;
-import org.eclipse.papyrus.uml.tools.utils.UMLUtil;
-import org.eclipse.uml2.uml.Connector;
import org.eclipse.uml2.uml.Element;
public class ConnectorEditPart extends AbstractElementLinkEditPart {
@@ -85,6 +82,7 @@ public class ConnectorEditPart extends AbstractElementLinkEditPart {
/**
* Creates figure for this edit part.
*/
+ @Override
protected Connection createConnectionFigure() {
return new ConnectorEdgeFigure();
}
@@ -92,17 +90,22 @@ public class ConnectorEditPart extends AbstractElementLinkEditPart {
/**
* Creates primary shape for this edit part.
*/
+ @Override
public ConnectorEdgeFigure getPrimaryShape() {
return (ConnectorEdgeFigure)getFigure();
}
@Override
protected void refreshLineWidth() {
- if (org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication((Element)resolveSemanticElement(), BindingConnector.class) != null) {
- setLineWidth(2);
+ int width = getLineWidth();
+ if(width < 1) {
+ width = 1;
}
- else {
- setLineWidth(1);
+
+ if(org.eclipse.uml2.uml.util.UMLUtil.getStereotypeApplication((Element)resolveSemanticElement(), BindingConnector.class) != null) {
+ setLineWidth(width * 2);
+ } else {
+ setLineWidth(width);
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/UMLConnectionNodeEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/UMLConnectionNodeEditPart.java
index db0db81e772..b85fe5f0f3d 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/UMLConnectionNodeEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/UMLConnectionNodeEditPart.java
@@ -309,4 +309,15 @@ public abstract class UMLConnectionNodeEditPart extends ConnectionEditPart imple
return out;
}
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setLineWidth(int width) {
+ if(width < 0) {
+ width = 1;
+ }
+ getPrimaryShape().setLineWidth(width);
+ }
+
}

Back to the top