Accessing object name or attributes in comments [message #1268726] |
Mon, 10 March 2014 23:07 |
David Vandergucht Messages: 7 Registered: March 2014 |
Junior Member |
|
|
Hello all.
I'm trying to add some documentation in the comments text fields of some sysml objects. I was wondering if it was possible to insert some aspects of objects from the model in the text, like using some magic keywords, syntax or even browsing the model...
It's just that when documenting I'd like to have any text referencing other parts of the model automatically updated on any changes...
Otherwise is it the right place to document the model ?
Thx !
David
[Updated on: Mon, 10 March 2014 23:08] Report message to a moderator
|
|
|
|
|
Re: Accessing object name or attributes in comments [message #1268993 is a reply to message #1268955] |
Tue, 11 March 2014 08:48 |
David Vandergucht Messages: 7 Registered: March 2014 |
Junior Member |
|
|
OK I haven't tried the OCL syntax yet but I just discovered the little "@" button on the top right corner of the comment UML body editor, which is used to add a dynamic link to a node in the model.
Link appears "encoded" in the text editor but shows up correctly in the model or in the diagrams.
There is one thing fishy though: we can only link elements of the model when writing in the body pane of the "UML property" of the "comment node" (not the "Comments property" in the "comment node").
Actually, all "Comments" property in nodes should be converted to "comment node" in the model to be able to link other elements of the model.
[Updated on: Tue, 11 March 2014 08:50] Report message to a moderator
|
|
|
Re: Accessing object name or attributes in comments [message #1269035 is a reply to message #1268993] |
Tue, 11 March 2014 09:48 |
Camille Letavernier Messages: 952 Registered: February 2011 |
Senior Member |
|
|
Hi David,
Quote:There is one thing fishy though: we can only link elements of the model when writing in the body pane of the "UML property" of the "comment node" (not the "Comments property" in the "comment node").
Actually, all "Comments" property in nodes should be converted to "comment node" in the model to be able to link other elements of the model.
This looks like a bug which should have been fixed by this task:
402525: [Widgets / Transactions] Papyrus dialogs should be transactional
https://bugs.eclipse.org/bugs/show_bug.cgi?id=402525
However, the bug's still here.
The workaround is:
- Create a new comment
- Press OK
- Edit the comment (Blue pencil)
- Now it works
I've filled Bug 430077: [Widgets / Transactions] Cannot add NamedElement references to newly created comments
https://bugs.eclipse.org/bugs/show_bug.cgi?id=430077
Regards,
Camille
Camille Letavernier
|
|
|
Powered by
FUDForum. Page generated in 0.03414 seconds