Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Diagram element not removing correctly.
Diagram element not removing correctly. [message #1783018] Tue, 06 March 2018 14:48 Go to next message
Matthieu Durot is currently offline Matthieu DurotFriend
Messages: 10
Registered: February 2017
Junior Member
Hello,

I've defined a viewpoint with Sirius.

I want that if I create an element x without a name (name = null) it'll be removed from the diagram (with a remove operation).

It should work but instead of deleting the element from the diagram a red cross appears in it...

Does anyone know what the problem is ? i can't seem to solve this.

Here is the part of the .odesign :
index.php/fa/32236/0/

Here is the diagram element :
index.php/fa/32235/0/


Regards,

Matthieu
  • Attachment: error.png
    (Size: 2.71KB, Downloaded 143 times)
  • Attachment: odesign.png
    (Size: 8.21KB, Downloaded 196 times)

[Updated on: Tue, 06 March 2018 14:52]

Report message to a moderator

Re: Diagram element not removing correctly. [message #1783020 is a reply to message #1783018] Tue, 06 March 2018 16:13 Go to previous messageGo to next message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 253
Registered: August 2010
Senior Member
Hi Matthieu,

The red cross on the graphical element means the semantic element behind has been removed. In automatic refresh mode (Preferences > Sirius > Automatic Refresh) the graphical element should be removed.
But more generally, create a new element and remove it in the same tool is not a good practice: you should ask for the name before creating the instance and keep it by using a Let [1] for instance. According to the value, you create the instance.

Regards,

Florian

[1] https://www.eclipse.org/sirius/doc/specifier/general/Model_Operations.html#let
Re: Diagram element not removing correctly. [message #1783153 is a reply to message #1783020] Thu, 08 March 2018 14:41 Go to previous messageGo to next message
Matthieu Durot is currently offline Matthieu DurotFriend
Messages: 10
Registered: February 2017
Junior Member
Thank you for the quick answer Florian,

Automatic refresh was already on.

I'm using Sirius 4.1.8 because I must use Eclipse mars.2 (4.5.2) due to my work environment.

Quote:
you should ask for the name before creating the instance and keep it by using a Let [1] for instance.

Is Let available in 4.1.8 ? I don't think so...
I've thought about something like this but I couldn't find a way to store my name variable.

I'll keep digging.

Matthieu
Re: Diagram element not removing correctly. [message #1783167 is a reply to message #1783153] Thu, 08 March 2018 16:39 Go to previous message
Florian Barbin is currently offline Florian BarbinFriend
Messages: 253
Registered: August 2010
Senior Member
The Let is available since Sirius 5.0.

Florian
Previous Topic:Null Pointer Exception when a arid file is opened
Next Topic:Diagram refresh
Goto Forum:
  


Current Time: Wed Jan 27 08:40:40 GMT 2021

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

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

Back to the top