Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Gendoc » Getting only applied comments
Getting only applied comments [message #1746263] Wed, 26 October 2016 09:19 Go to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Hi,

I would like to get only the Applied Comments of an element.
Today, I am able to get all the owned comments using the following fragment:
<fragment name='displayComments' importedBundles='commons;gmf;papyrus'><drop/>
<arg name='element' type='uml::Element'/><drop/>
[for (co:uml::Comment | element. ownedComment)]<drop/>
Description: <dropEmpty>[co._body.clean()/]</dropEmpty>
[/for]<drop/>
</fragment><drop/>


I tried to replace "ownedComment" by "appliedComment, but this does not work, the variable is unrecognized.

Any way to dothis?

Thanks,

Marc
Re: Getting only applied comments [message #1746265 is a reply to message #1746263] Wed, 26 October 2016 09:22 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
As mentioned in the UML metamodel (http://doc.omg.org/formal/2005-07-05.pdf , p.39)
UML element does not have appliedComment relation

and after a search in the norm i did not found "appliedComment" what is the information you are looking for ?




Re: Getting only applied comments [message #1746268 is a reply to message #1746265] Wed, 26 October 2016 09:32 Go to previous messageGo to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
This might be specific to Papyrus then.
The comments folder in Papyrus has 2 parts:
- Applied Comments
- Owned Comments

We use applied comment to enter the description of a given object.
The problem is with packages, as when listing all the owned comments of a package, I get also the text of the various notes present in the diagrams.

Best regards,

Marc
Re: Getting only applied comments [message #1746282 is a reply to message #1746268] Wed, 26 October 2016 12:23 Go to previous messageGo to next message
Tristan Faure is currently offline Tristan FaureFriend
Messages: 460
Registered: July 2009
Senior Member
Ok the difference in Papyrus is that "applied comment" references the element
the code to insert :
<fragment name='displayComments' importedBundles='commons;gmf;papyrus'><drop/>
<arg name='element' type='uml::Element'/><drop/>
[for (co:uml::Comment | element. ownedComment->select (c | c.annotatedElement->includes(element)) )]<drop/>
Description: <dropEmpty>[co._body.clean()/]</dropEmpty>
[/for]<drop/>
</fragment><drop/>


can you open a bug to create getAppliedComment in papyrus module to make query easier to write ?




[Updated on: Wed, 26 October 2016 12:24]

Report message to a moderator

Re: Getting only applied comments [message #1746297 is a reply to message #1746282] Wed, 26 October 2016 15:16 Go to previous messageGo to next message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Hi Tristan,

This did the trick, thanks.
I will open a bug.

Best regards,

Marc
Re: Getting only applied comments [message #1746299 is a reply to message #1746297] Wed, 26 October 2016 15:34 Go to previous message
Marc FLAUW is currently offline Marc FLAUWFriend
Messages: 151
Registered: July 2009
Senior Member
Bug report https://bugs.eclipse.org/bugs/show_bug.cgi?id=506575 filled
Previous Topic:can not insert 2 static images in the same table line (each one in one column)
Next Topic:No content in eclipse variables
Goto Forum:
  


Current Time: Thu Mar 28 20:54:47 GMT 2024

Powered by FUDForum. Page generated in 0.03161 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top