diff options
author | Céline Janssens | 2015-07-02 11:01:29 +0000 |
---|---|---|
committer | vincent lorenzo | 2018-07-02 08:14:41 +0000 |
commit | b8befb87976640be6a4c99f6b29cfd9256af180c (patch) | |
tree | ad1d7cd5230564d1d0669bf69050224b77e7f0bb /plugins/uml | |
parent | 3f37c91cb336d4c73bc1c89a2f8f689a5eee6c87 (diff) | |
download | org.eclipse.papyrus-b8befb87976640be6a4c99f6b29cfd9256af180c.tar.gz org.eclipse.papyrus-b8befb87976640be6a4c99f6b29cfd9256af180c.tar.xz org.eclipse.papyrus-b8befb87976640be6a4c99f6b29cfd9256af180c.zip |
Bug 471584: [Stereotype Display] Provide JUnit Tests for a complexe
Class Diagram
https://bugs.eclipse.org/bugs/show_bug.cgi?id=471584
- Update NominalProfileTest
- Create a new model for the test
- Test Class, Interface, Enumeration, Package
- Test Enumeration Litteral, Property and Operation
- Outline the main tests
- fix a bug on the Comment refresh
Change-Id: I0e07b278e99d3f0c9e7bfa2fa166fc29b9f15765
Signed-off-by: Céline Janssens <Celine.Janssens@all4tec.net>
Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins/uml')
2 files changed, 8 insertions, 4 deletions
diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java index 2b3a8114c02..103d943b2b5 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.clazz/custom-src/org/eclipse/papyrus/uml/diagram/clazz/custom/figure/LiteralEnumerationFigure.java @@ -1,5 +1,5 @@ /***************************************************************************** - * Copyright (c) 2016 CEA LIST and others. + * Copyright (c) 2016, 2018 CEA LIST and others. * * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 @@ -12,10 +12,12 @@ *****************************************************************************/ package org.eclipse.papyrus.uml.diagram.clazz.custom.figure; -public class LiteralEnumerationFigure extends org.eclipse.gmf.runtime.draw2d.ui.figures.WrappingLabel { +import org.eclipse.papyrus.infra.gmfdiag.common.figure.node.PapyrusWrappingLabel; + +public class LiteralEnumerationFigure extends PapyrusWrappingLabel { public LiteralEnumerationFigure() { - this.setText("<UNDEFINED>"); + this.setText("<UNDEFINED>"); //$NON-NLS-1$ } } diff --git a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentEditPolicy.java b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentEditPolicy.java index d0a49dc857b..a534e6b8aa0 100644 --- a/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentEditPolicy.java +++ b/plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentEditPolicy.java @@ -187,6 +187,8 @@ public class AppliedStereotypeCommentEditPolicy extends AppliedStereotypeNodeLab protected void refreshStereotypeDisplay() { super.refreshStereotypeDisplay(); + comment = helper.getStereotypeComment(hostView); + // If no more Compartment, delete the Comment if (comment != null && getAppliedStereotypeCompartmentNumber(comment) == 0) { executeAppliedStereotypeCommentDeletion(comment); @@ -470,4 +472,4 @@ public class AppliedStereotypeCommentEditPolicy extends AppliedStereotypeNodeLab } -} +} |