Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorptessier2013-10-24 07:10:54 -0400
committerptessier2013-10-24 07:10:54 -0400
commit4db91ace7cbc3c4f848e4ced791f18c587227136 (patch)
tree6ae8e2a67d6b6b847bdb186d2c30bfecdbef8b1f /plugins
parentcb8648df05ce4ce712be1b68327846d5f735c682 (diff)
downloadorg.eclipse.papyrus-4db91ace7cbc3c4f848e4ced791f18c587227136.tar.gz
org.eclipse.papyrus-4db91ace7cbc3c4f848e4ced791f18c587227136.tar.xz
org.eclipse.papyrus-4db91ace7cbc3c4f848e4ced791f18c587227136.zip
419965: Display of the name must be optional
https://bugs.eclipse.org/bugs/show_bug.cgi?id=419965
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderDisplayEditPolicy.java11
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java1
2 files changed, 9 insertions, 3 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderDisplayEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderDisplayEditPolicy.java
index b0a42c813d3..c5dd18a04d1 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderDisplayEditPolicy.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editpolicies/BorderDisplayEditPolicy.java
@@ -15,6 +15,7 @@ package org.eclipse.papyrus.uml.diagram.common.editpolicies;
import java.util.List;
+import org.eclipse.draw2d.Border;
import org.eclipse.draw2d.LineBorder;
import org.eclipse.emf.common.notify.Notification;
import org.eclipse.emf.ecore.EObject;
@@ -53,6 +54,8 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicy implements Noti
*/
protected List<Object> parentListeners;
+ private Border defaultBorder;
+
/**
* Creates a new QualifiedNameDisplayEditPolicy
*/
@@ -85,7 +88,11 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicy implements Noti
return;
}
getDiagramEventBroker().addNotificationListener(hostSemanticNamedElement, this);
-
+ if(getHost() instanceof NamedElementEditPart) {
+ NamedElementEditPart namedElementEditPart = (NamedElementEditPart)getHost();
+ defaultBorder=namedElementEditPart.getPrimaryShape().getBorder();
+
+ }
refreshBorder();
}
@@ -106,7 +113,7 @@ public class BorderDisplayEditPolicy extends GraphicalEditPolicy implements Noti
}
} else {
- namedElementEditPart.getPrimaryShape().setBorder(new LineBorder());
+ namedElementEditPart.getPrimaryShape().setBorder(defaultBorder);
for(Object currentEditPart : namedElementEditPart.getChildren()) {
if(currentEditPart instanceof ResizableCompartmentEditPart) {
((ResizableCompartmentEditPart)currentEditPart).getFigure().setBorder(new OneLineBorder());
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
index 451992b8944..90b1a6b5991 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java
@@ -93,7 +93,6 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
@Override
public void setBorder(Border border) {
- // TODO Auto-generated method stub
if(border==null){
noBorder=true;
}

Back to the top