Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java4
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java3
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ConstraintFigure.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/IPapyrusNodeNamedElementFigure.java20
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/NodeNamedElementFigure.java31
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/QualifiedNameWrappingLabelFigure.java16
6 files changed, 91 insertions, 3 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java
index da27e7e362c..b996fd81b34 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/editparts/NamedElementEditPart.java
@@ -92,8 +92,12 @@ public abstract class NamedElementEditPart extends UMLNodeEditPart implements IU
BooleanValueStyle displayNameStyle = (BooleanValueStyle)view.getNamedStyle(NotationPackage.eINSTANCE.getBooleanValueStyle(), NameDisplayEditPolicy.DISPLAY_NAME);
if(displayNameStyle != null && !displayNameStyle.isBooleanValue()) {
getNodeNamedElementFigure().removeNameLabel();
+ getNodeNamedElementFigure().removeStereotypeLabel();
+ getNodeNamedElementFigure().removeTaggedLabel();
} else {
getNodeNamedElementFigure().restoreNameLabel();
+ getNodeNamedElementFigure().restoreStereotypeLabel();
+ getNodeNamedElementFigure().restoreTaggedLabel();
}
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
index 4b136445dbe..ed6ff56da83 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/AutomaticCompartmentLayoutManager.java
@@ -67,10 +67,11 @@ public class AutomaticCompartmentLayoutManager extends AbstractLayout {
int minimumHeight = 0;
if(container instanceof CompartmentFigure) {
// display name
- if(((CompartmentFigure)container).getNameLabel() != null) {
+ if(((CompartmentFigure)container).getNameLabel() != null&& container.getChildren().contains(((CompartmentFigure)container).getNameLabel())) {
if(((CompartmentFigure)container).getNameLabel().getPreferredSize().width > minimumWith) {
minimumWith = ((CompartmentFigure)container).getNameLabel().getPreferredSize().width;
}
+
}
}
if(compartmentList.size() != 0) {
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ConstraintFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ConstraintFigure.java
index 646a062ed63..85add30cb94 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ConstraintFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/ConstraintFigure.java
@@ -335,5 +335,25 @@ public class ConstraintFigure extends CornerBentFigure implements IPapyrusNodeNa
// }
}
+ public void removeStereotypeLabel() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void restoreStereotypeLabel() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void restoreTaggedLabel() {
+ // TODO Auto-generated method stub
+
+ }
+
+ public void removeTaggedLabel() {
+ // TODO Auto-generated method stub
+
+ }
+
}
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/IPapyrusNodeNamedElementFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/IPapyrusNodeNamedElementFigure.java
index de6fffa4a83..cb3f9d036b4 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/IPapyrusNodeNamedElementFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/IPapyrusNodeNamedElementFigure.java
@@ -64,11 +64,27 @@ public interface IPapyrusNodeNamedElementFigure extends IPapyrusNodeUMLElementFi
public void setNameLabelIcon(boolean displayNameLabelIcon);
/**
- * Create a label that contains the name of the element.
+ * restore a label that represent the name of the element.
*/
public void restoreNameLabel();
-
+ /** remove the label that represent the name**/
public void removeNameLabel();
+ /** remove the label that represent the stereotype**/
+ public void removeStereotypeLabel();
+ /**
+ * restore a label that represent the appliedStereotype of the element.
+ */
+ public void restoreStereotypeLabel();
+
+ /**
+ * restore a label that represent the tagged of the element.
+ */
+ public void restoreTaggedLabel();
+
+
+ /** remove the label that represent the tagged**/
+ public void removeTaggedLabel();
+
}
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 3517c36eee8..305dc4da1f1 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
@@ -184,6 +184,37 @@ public class NodeNamedElementFigure extends PapyrusNodeFigure implements IPapyru
}
}
+
+ public void restoreStereotypeLabel() {
+ stereotypesLabel.setOpaque(false);
+ getStereotypeLabelContainer().add(stereotypesLabel, getStereotypeLabelConstraint(), getStereotypePropertiesLabelPosition());
+ }
+
+
+ /**
+ * Create a label that contains the stereotype of the element.
+ */
+ public void removeStereotypeLabel() {
+ if(getStereotypeLabelContainer().getChildren().contains(stereotypesLabel)) {
+ getStereotypeLabelContainer().remove(stereotypesLabel);
+ }
+ }
+
+
+ public void restoreTaggedLabel() {
+ taggedLabel.setOpaque(false);
+ getTagLabelContainer().add(taggedLabel, getTagLabelConstraint(), 0);
+ }
+
+
+ /**
+ * Create a label that contains the stereotype of the element.
+ */
+ public void removeTaggedLabel() {
+ if(getTagLabelContainer().getChildren().contains(taggedLabel)) {
+ getTagLabelContainer().remove(taggedLabel);
+ }
+ }
/**
* Get the constraint for adding the name label. Children should override
* and implement this method in case the label must be drawn with a specific
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/QualifiedNameWrappingLabelFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/QualifiedNameWrappingLabelFigure.java
index 5f31950661b..8ec6970504a 100644
--- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/QualifiedNameWrappingLabelFigure.java
+++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.common/src/org/eclipse/papyrus/uml/diagram/common/figure/node/QualifiedNameWrappingLabelFigure.java
@@ -112,5 +112,21 @@ public class QualifiedNameWrappingLabelFigure extends PapyrusWrappingLabel imple
// TODO Auto-generated method stub
}
+ public void removeStereotypeLabel() {
+ // TODO Auto-generated method stub
+
+ }
+ public void restoreStereotypeLabel() {
+ // TODO Auto-generated method stub
+
+ }
+ public void restoreTaggedLabel() {
+ // TODO Auto-generated method stub
+
+ }
+ public void removeTaggedLabel() {
+ // TODO Auto-generated method stub
+
+ }
}

Back to the top