Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » How to find a Comment links in Papyrus Model Explorer
How to find a Comment links in Papyrus Model Explorer [message #857765] Thu, 26 April 2012 21:10 Go to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Hi,

I have comments in my model.
These are shown in the Model Explorer.
Sometimes, I can link one comment to a class, and sometimes,
it cannot be linked anymore.
Is this a bug, or am I missing something ?

Looking for these links in the Model explorer,
I cannot find the references of a comment.
The comments are located at the top level
of the model. In the UML metamodel, a Comment
can be associated with any Element. Is there a
reason why these comments links are not shown in
the Model Explorer ?


Regards.
Re: How to find a Comment links in Papyrus Model Explorer [message #857769 is a reply to message #857765] Thu, 26 April 2012 21:15 Go to previous messageGo to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member

[Updated on: Thu, 26 April 2012 21:25]

Report message to a moderator

Re: How to find a Comment links in Papyrus Model Explorer [message #857774 is a reply to message #857769] Thu, 26 April 2012 21:22 Go to previous messageGo to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Q1 - Is this a bug, or am I missing something ?
Maybe I am missing something, the comment links can be found
in the Comment > Properties UML > Annotated element.
In fact, a link cannot be re-added if it exist.
Therefore, trying to link a comment with a class does not work if
the class is already in the annotated element list.
Should I report a bug or is this a compromise of Papyrus to avoid
overloading the Model explorer view ?


Q2 - Is there a reason why these comments links are not shown in
the Model Explorer ?
Another side effect, is that I cannot decide to display a link between
a comment and a class wherever I want (displayed or not, depending on the diagram).
Is there a way to display or not display a link, in a diagram, when this comment
and this class are shown in more than one diagram at the same time ?


Regards.

[Updated on: Thu, 26 April 2012 21:23]

Report message to a moderator

Re: How to find a Comment links in Papyrus Model Explorer [message #857816 is a reply to message #857774] Thu, 26 April 2012 22:06 Go to previous messageGo to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member

Even though the diagram shows a link between a Class
and a Comment, it is not always registered in the Papyrus
UML Model as is.

To correct (fix) the problem, select the Class (in this case)
Go to Properties > Advanced > Owned Comment,
edit the value and add the "Owned Comment" in the current list.
In fact, in the UML meta model, a comment is created and owned
by one Element:Class, but can be referred by other Elements (like Class).
This fix the internal model.

Following this fix, the M2T Acceleo react correctly as expected when searching for
these links.

Bug or not, do not know.
Regards.

CloseIssue.
Re: How to find a Comment links in Papyrus Model Explorer [message #858056 is a reply to message #857816] Fri, 27 April 2012 01:37 Go to previous messageGo to next message
Arnaud Cuccuru is currently offline Arnaud CuccuruFriend
Messages: 34
Registered: April 2010
Member
Hi Alain,

I don't think this is a bug. As you noticed, a Comment is owned by only one element, but can be used to annotate several elements.

If you create a Comment in (e.g.) a class diagram, and if this diagram has been created in the context of (e.g.) a Package (i.e., in the Model explorer, you have created the diagram by right-clicking on the Package), then the Comment will be owned by this Package, just like any other element that you may create in the diagram.

As an alternative to the "advanced property view", you can probably "move" the comment to the appropriate owner via the model explorer (in the model explorer, just drag/drop the Comment to the appropriate owner).

Cheers,

Arnaud
Re: How to find a Comment links in Papyrus Model Explorer [message #859281 is a reply to message #858056] Fri, 27 April 2012 14:56 Go to previous messageGo to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Thanks, I will try this.
Re: How to find a Comment links in Papyrus Model Explorer [message #863820 is a reply to message #859281] Sun, 29 April 2012 17:30 Go to previous messageGo to next message
Alain Lavoie is currently offline Alain LavoieFriend
Messages: 82
Registered: April 2012
Member
Hi,

OK, this also makes the job.
However, dropping the comment in the diagram
does not automatically re-link (draw the line between the class and
the comment) the two "entities".

I did not find how to achieve this automatically,
Furthermore, this link is not accessible in the model explorer,
and since Papyrus does not allow me to re-draw (or re-link) the
two elements (the class and its comment) via the link icon appearing next
to a class when hovering the mouse, I end up with orphans
class and comment. I just want them to be friends again Smile

How can I show visually that line (link) in the diagram
without having to re-select the "Link" Palette and physically
link them again (which sometimes is allowed, and sometimes, not). ?

I tried the Class contextual menu
Navigate > Restored Related Elements
without success.

Thanks for any help.

[Updated on: Mon, 30 April 2012 03:59]

Report message to a moderator

Re: How to find a Comment links in Papyrus Model Explorer [message #1856608 is a reply to message #863820] Sat, 17 December 2022 01:32 Go to previous messageGo to next message
Betty Cooper is currently offline Betty CooperFriend
Messages: 1
Registered: July 2022
Junior Member
There are a few things you need in order to find comment links in Papyrus Model Explorer. The first thing you need is a keyword list. This list should contain at least five keywords that you want to find comment links for. You can also use the search bar to find comment links by specific keywords. Finally, you can use the "Select All" button to select all comment links on your model. mapquest driving directions

[Updated on: Thu, 22 December 2022 04:54]

Report message to a moderator

Re: How to find a Comment links in Papyrus Model Explorer [message #1856843 is a reply to message #1856608] Thu, 05 January 2023 12:53 Go to previous message
Vincent Lorenzo is currently offline Vincent LorenzoFriend
Messages: 248
Registered: June 2010
Location: Paris Saclay, France
Senior Member
Hello,
the "Comment Link" is only a graphical element, so it doesn't exist in the ModelExplorer. This graphical link is used to represent the elements referenced in the feature Comment#annotatedElement.
When you drop a Comment from the ModelExplorer to a Diagram, the "Comment Link" is not created automatically. Nevertheless, if the target of the "Comment Link" (so the annotated element") is already in the diagram, you can get it easily by this way: from the diagram, select the Comment, then "Right-Click->Filter-> Show/Hide Related Link". A dialog opens and you can select the link to show.

index.php/fa/42816/0/

HTH,
Vincent
Previous Topic:Papyrus Moka and Alf editor
Next Topic:How to create an <<access>> dependency for an element import with private visibility in
Goto Forum:
  


Current Time: Tue Apr 23 11:26:51 GMT 2024

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

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

Back to the top