Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » "element" bug in Reconnect Edge
"element" bug in Reconnect Edge [message #1821295] Mon, 10 February 2020 14:26 Go to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
Hi,

According to https://www.eclipse.org/sirius/doc/specifier/diagrams/Diagrams.html:

>>
source: the semantic element which is pointed before the reconnect.
target: the semantic element which is pointed after the reconnect.
...
element: the semantic element of the current edge.
<<<

When I access the source.name and target.name I get the name of the correct elements. However, when I try to access element.name (an attribute which exists for the element represented by the edge) it appears blank.

Is this a bug or am I doing something wrong?
A bit about the use case: my edge is an element based edge, which points to the source (element.source) and destination (element.dest). I want to allow the user to change the element.source to a new source by using the "reconnect edge" tool - moving the source from source1 to source2 (so that if element.source was "source1" it will become "source2" instead).
I manage to do it successfully, but if I use an "open dialog" and use element.name it returns an empty string as opposed to source.name and target.name.

Thank you,
Avi

[Updated on: Mon, 10 February 2020 14:37]

Report message to a moderator

Re: "element" bug in Reconnect Edge [message #1821305 is a reply to message #1821295] Mon, 10 February 2020 15:20 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Hello,

I checked and added a "Set" operation to change the name of the element I was reconnecting without issue. How did you compose the model operation of your tool? Do you have a "Change context" operation with the expression var:element beforehand?

Best regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: "element" bug in Reconnect Edge [message #1821306 is a reply to message #1821305] Mon, 10 February 2020 15:23 Go to previous messageGo to next message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
Quote:
Do you have a "Change context" operation with the expression var:element beforehand?


No. I only used an open dialog tool, and tried to display the name by using "aql: element.name". It did not work, but "aql: source.name" and "aql: target.name" did work. Any reason for this? Since these are all semantic entities, I imagined they should behave the same when referenced.
Re: "element" bug in Reconnect Edge [message #1821311 is a reply to message #1821306] Mon, 10 February 2020 16:25 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 572
Registered: May 2011
Senior Member
Ah ok, I thought the issue was with changing the name at first.
I set the title expression of the "open dialog" operation as "aql:element.name" and the name was properly displayed in the Dialog title area. Where did you placed this expression?

Best regards,
Steve


Steve Monnier - Obeo Canada
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: "element" bug in Reconnect Edge [message #1821349 is a reply to message #1821311] Tue, 11 February 2020 11:29 Go to previous message
Avi Shaked is currently offline Avi ShakedFriend
Messages: 131
Registered: October 2019
Senior Member
Quote:
set the title expression of the "open dialog" operation as "aql:element.name" and the name was properly displayed in the Dialog title area. Where did you placed this expression?

I actually placed it someplace else, but now tried it in the title area (like to suggested), and the title remains blank (unlike when using source.name or target.name). I am using Obeo 11.1.2.

Thanks anyway for attempting to solve this. It is not crucial for me. Since you cannot reproduce it, I will not open a bug.

Regards,
Avi
Previous Topic:Bug report - Note gets detached when reconnecting edges
Next Topic:Does org.eclipse.sirius.diagram.customBundledImageShape work?
Goto Forum:
  


Current Time: Tue Apr 16 20:56:57 GMT 2024

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

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

Back to the top