|Re: Problem adding comment [message #559542 is a reply to message #559452]
||Fri, 17 September 2010 06:21
| Rafael Chaves
Registered: July 2009
Comment comment = portCopy.createOwnedComment();
That will create the comment as a child of the port, but the comment will not be tied to any element. To do that, you need to add the port as an annotated element
That should take care of the problem (even though I don't know what you are referring to when you say "model viewer") .
However, it seems you also want to apply a stereotype to the comment:
That is fine, but then the following line does not make sense:
portCopy.setValue(stereoRtFeature, "specification", comment);
What are you trying to achieve there?
Since you applied the stereotype to the comment, you can only set the tagged value on the comment itself (assuming "specification" is a property in the stereotype, it is now an extended attribute of the element you applied the stereotype to).
Powered by FUDForum
. Page generated in 0.02317 seconds