diff options
author | Camille Letavernier | 2014-09-05 07:30:06 +0000 |
---|---|---|
committer | Gerrit Code Review @ Eclipse.org | 2014-09-05 07:30:06 +0000 |
commit | 6c118f555e1b73f94cb77116006937893848e940 (patch) | |
tree | 13c1c039387d0177493bb4e43ca61fb49d29cdae | |
parent | 62f1ca63326dd1172e9f416ffa43136d44f49251 (diff) | |
parent | 5ff9d7a09b5dd28ae9a85db8748e45882cf0ed94 (diff) | |
download | org.eclipse.papyrus-6c118f555e1b73f94cb77116006937893848e940.tar.gz org.eclipse.papyrus-6c118f555e1b73f94cb77116006937893848e940.tar.xz org.eclipse.papyrus-6c118f555e1b73f94cb77116006937893848e940.zip |
Merge "441227: [Properties view] Create New Property view tabs not working https://bugs.eclipse.org/bugs/show_bug.cgi?id=441227"
-rw-r--r-- | plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java index 917779f746c..920e6b5cd90 100644 --- a/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java +++ b/plugins/uml/properties/org.eclipse.papyrus.uml.properties/src/org/eclipse/papyrus/uml/properties/databinding/AppliedCommentsObservableList.java @@ -10,6 +10,8 @@ * Sebastien Poissonnet (CEA LIST) sebastien.poissonnet@cea.fr * Mickaƫl ADAM (ALL4TEC) mickael.adam@all4tec.net - bug 435174 * Gabriel Pascual (ALL4TEC) - Bug 441511 + * Christian W. Damus (CEA) - Bug 441227 + * *****************************************************************************/ package org.eclipse.papyrus.uml.properties.databinding; @@ -66,7 +68,9 @@ public class AppliedCommentsObservableList extends PapyrusObservableList { // not... boolean isProxy = false; for (Element annotatedElement : comment.getAnnotatedElements()) { - if (annotatedElement.eResource() == null) { + // Don't check the annotated element if it's the source, because it may be a new + // element being created in a dialog and not yet attached to the model + if ((annotatedElement != source) && (annotatedElement.eResource() == null)) { isProxy = true; } } @@ -117,7 +121,7 @@ public class AppliedCommentsObservableList extends PapyrusObservableList { addAppliedCommentCommand = new CompoundCommand("Add applied comment"); // Add the comment to source#ownedComment - SetRequest setRequest = new SetRequest(source, feature, value); + SetRequest setRequest = new SetRequest((TransactionalEditingDomain) editingDomain, source, feature, value); addAppliedCommentCommand.append(getCommandFromRequests(getProvider(), Collections.singletonList(setRequest))); // Check if source was already had to comment |