Skip to main content
aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastien Gabel2016-05-11 15:00:17 +0000
committervincent lorenzo2016-07-08 07:55:30 +0000
commit23e146fef088b35192cf16226139348c32a62b97 (patch)
treefe5ca839d0dc9baf2a159504a8fdcc096d97983b /plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition
parentba91f9a9474a13168b554ba5d9f83fa8d2ca1d8c (diff)
downloadorg.eclipse.papyrus-23e146fef088b35192cf16226139348c32a62b97.tar.gz
org.eclipse.papyrus-23e146fef088b35192cf16226139348c32a62b97.tar.xz
org.eclipse.papyrus-23e146fef088b35192cf16226139348c32a62b97.zip
Bug 491258 - [StereotypeComment] AppliedStereotypeCommentEditPolicy does
not create the stereotype compartments in some cases https://bugs.eclipse.org/bugs/show_bug.cgi?id=491258 The compartment was searched into the hostEditPart.getNotationView() view and not into the comment view which is where the compartment is created in the executeAppliedStereotypeCompartmentCreation Change-Id: I7a4e36ad32a08f9b27a85af7edc205e9c98d1244 Signed-off-by: Sebastien Gabel <sebastien.gabel@esterel-technologies.com> Signed-off-by: Vincent Lorenzo <vincent.lorenzo@cea.fr>
Diffstat (limited to 'plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition')
-rw-r--r--plugins/uml/diagram/org.eclipse.papyrus.uml.diagram.stereotype.edition/src/org/eclipse/papyrus/uml/diagram/stereotype/edition/editpolicies/AppliedStereotypeCommentEditPolicy.java7
1 files changed, 3 insertions, 4 deletions
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 4e43436339c..4045a38eacf 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
@@ -12,6 +12,7 @@
* Christian W. Damus (CEA) - bug 323802
* Gabriel Pascual (ALL4TEC) gabriel.pascual@all4tec.fr - Bug 393532
* Christian W. Damus - bugs 492407, 492482
+ * Calin Glitia (Esterel Technologies SAS) - Bug 491258
*
*****************************************************************************/
package org.eclipse.papyrus.uml.diagram.stereotype.edition.editpolicies;
@@ -254,9 +255,8 @@ public class AppliedStereotypeCommentEditPolicy extends AppliedStereotypeNodeLab
* the stereotype application
*/
protected void createAppliedStereotypeCompartment(final Stereotype stereotype) {
- final View node = hostEditPart.getNotationView();
// doesn't exist already
- if (!helper.isCompartmentExist(node, stereotype)) {
+ if (comment != null && !helper.isCompartmentExist(comment, stereotype)) {
// Create Compartment
executeAppliedStereotypeCompartmentCreation(hostEditPart, stereotype, StereotypeDisplayConstant.STEREOTYPE_COMPARTMENT_TYPE);
}
@@ -312,9 +312,8 @@ public class AppliedStereotypeCommentEditPolicy extends AppliedStereotypeNodeLab
*/
@Override
protected void createAppliedStereotypeBraceCompartment(Stereotype stereotype) {
- final View node = hostEditPart.getNotationView();
// doesn't exist already
- if (!helper.isCompartmentExist(node, stereotype)) {
+ if (comment != null && !helper.isCompartmentExist(comment, stereotype)) {
// Create Compartment
executeAppliedStereotypeCompartmentCreation(hostEditPart, stereotype, StereotypeDisplayConstant.STEREOTYPE_BRACE_TYPE);

Back to the top