Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Undo operation in sirius editor
Undo operation in sirius editor [message #1794558] Mon, 03 September 2018 02:46 Go to next message
mind calm is currently offline mind calmFriend
Messages: 52
Registered: July 2017
Member
Hi,

I have a model with 2 elements,
Step 1: Create a sirius diagram of the model, the diagram show the 2 elements.
Step 2: Save the diagram and close it.
Step 3: Delete one element on EMF editor, and save the model.
Step 4: Open the sirius diagram, the diagram synchronized from the model, and shows the remaining element.
Step 5: Press 'Ctrl + z' on the diagram to execute undo operation. The diagram show the deleted element with a red cross flag.

My question is, is it reasonable to allow undo operation while the diagram opened?


Best regards!

by Keep Mind Calm
Re: Undo operation in sirius editor [message #1794652 is a reply to message #1794558] Tue, 04 September 2018 13:49 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 161
Registered: June 2017
Senior Member
Hi, I don't reproduce but anyway why do you think we should forbid undo?

Regards


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Undo operation in sirius editor [message #1794691 is a reply to message #1794652] Wed, 05 September 2018 02:08 Go to previous messageGo to next message
mind calm is currently offline mind calmFriend
Messages: 52
Registered: July 2017
Member
Hi, Pierre,
I produced this problem in Obeo Designer 8.1.

I know the reason is that, sirius synchronize diagram from model at opening time, this may remove some diagram elements (which the back-end model element does not exist). When user trigger undo operation, sirius bring the removed diagram elements back.

I'm not wanting to forbid undo. It is nice to show a red cross flag if the element is not exist anymore, but it make user confused sometimes.



Best regards!

by Keep Mind Calm

[Updated on: Wed, 05 September 2018 02:09]

Report message to a moderator

Re: Undo operation in sirius editor [message #1794712 is a reply to message #1794691] Wed, 05 September 2018 10:21 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 161
Registered: June 2017
Senior Member
Hi,
I am not sure to understand when the red cross is visible, what undo is done, and what does mean the removed element is back and what is confusing for user.

If you click refresh, it disappear?

Regards


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Undo operation in sirius editor [message #1794748 is a reply to message #1794712] Thu, 06 September 2018 03:22 Go to previous messageGo to next message
mind calm is currently offline mind calmFriend
Messages: 52
Registered: July 2017
Member
Hi,

index.php/fa/33822/0/
  • Attachment: All.jpg
    (Size: 66.69KB, Downloaded 33 times)


Best regards!

by Keep Mind Calm

[Updated on: Thu, 06 September 2018 03:26]

Report message to a moderator

Re: Undo operation in sirius editor [message #1794781 is a reply to message #1794748] Thu, 06 September 2018 12:28 Go to previous messageGo to next message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 161
Registered: June 2017
Senior Member
Hi,

This is the refresh command called "Refresh diagram on opening" that is undone. If this is too much confusing for you, you can open a Sirius ticket .
What you can do though is to clear the command stack with a SessionManageListener:
Register it with SessionManager.INSTANCE.addSessionsListener(sessionManagerListener) and use the code:
private final SessionManagerListener sessionManagerListener = new SessionManagerListener.Stub() {
        @Override
        public void notify(Session session, int notification) {
           if (notification == SessionListener.OPENED) {
         session.getTransactionalEditingDomain().getCommandStack().flush();
        }
    };


Regards,


Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Undo operation in sirius editor [message #1794811 is a reply to message #1794781] Fri, 07 September 2018 01:49 Go to previous messageGo to next message
mind calm is currently offline mind calmFriend
Messages: 52
Registered: July 2017
Member
Hi, Pierre

Thank you very much, i'll try it.


Best regards!

by Keep Mind Calm
Re: Undo operation in sirius editor [message #1794826 is a reply to message #1794811] Fri, 07 September 2018 09:19 Go to previous message
Pierre Guilet is currently offline Pierre GuiletFriend
Messages: 161
Registered: June 2017
Senior Member
In fact I think this will not work. The cleaning of the command stack should be done when the editor has finished its opening, not the session.

Pierre Guilet - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:Sirius on the Web
Next Topic:[Sirius-ELK] ELK integration of Sirius
Goto Forum:
  


Current Time: Thu Sep 20 08:22:03 GMT 2018

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

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

Back to the top