Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Diagram layout is still kept when closed editor without saving(It seem to be a bug when close dirty diagram editor without saving, then reopen)
Diagram layout is still kept when closed editor without saving [message #1710473] Wed, 07 October 2015 03:30 Go to next message
Sann Tran is currently offline Sann TranFriend
Messages: 15
Registered: November 2014
Junior Member
Hello Obeo guys,

Assume that I have 2 opened diagram editors D1 & D2. Both are in one session.
I did some steps as following:

1. I move a node N in D1 (Result: D1 is dirty, and D2 is dirty)
2. I close D1. A dialog is showed and ask me to save the D1 diagram or not.
3. I don't want to save, so I click "No". The D1 diagram is closed
4. I open D1 diagram again.

Result: I still see node N position is changed (because of moving in step 1)
What I expect is that the position of node N is not changed

(Note: If there is only one diagram is opened, every thing is fine.)

It seem to be a strange behavior, and I'm going to fix it. So should you please tell me what class I should hook to fix this problem. Or should I create a Sirius bug?

Thanks,

Sann

Re: Diagram layout is still kept when closed editor without saving [message #1710496 is a reply to message #1710473] Wed, 07 October 2015 07:47 Go to previous message
Maxime Porhel is currently offline Maxime PorhelFriend
Messages: 500
Registered: July 2009
Location: Nantes, France
Senior Member
Hi Sann,

Le 07/10/2015 05:30, Sann Tran a écrit :
> Hello Obeo guys,
>
> Assume that I have 2 opened diagram editors D1 & D2. Both are in one
> session. I did some steps as following:
>
> 1. I move a node N in D1 (Result: D1 is dirty, and D2 is dirty)
> 2. I close D1. A dialog is showed and ask me to save the D1 diagram or not.
> 3. I don't want to save, so I click "No". The D1 diagram is closed
> 4. I open D1 diagram again.
>
> Result: I still see node N position is changed (because of moving in
> step 1)
> What I expect is that the position of node N is not changed

>
> (Note: If there is only one diagram is opened, every thing is fine.)

You have two opened editor on diagrams (could be table or tree) from the
same aird or modeling project: they share the same editing domain,
resource set and command stack.

When you close the first editor, if you click no: it does not save the
changes you made, ie the files are not saved, but you still have an
editor opened sharing the same modified data so Sirius cannot cancel
your changes.

Note that you can disable this popup when several editors are opened on
the same aird / modeling project: just check the checkbox "Do not prompt
to save on close when still open elsewhere".

When you close the last editor, and select no, Sirius will cancel your
changes (equivalent to a reload of the last saved state) and if changes
are made without opened editor, they will be automatically saved. Note
that both behaviors can be customized using the preferences
SiriusUIPreferencesKeys.PREF_RELOAD_ON_LAST_EDITOR_CLOSE and
SiriusUIPreferencesKeys.PREF_SAVE_WHEN_NO_EDITOR.

>
> It seem to be a strange behavior, and I'm going to fix it. So should you
> please tell me what class I should hook to fix this problem. Or should I
> create a Sirius bug?
>
> Thanks,
>
> Sann
>
>

Regards,

--
Maxime - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius


Maxime Porhel - Obeo

Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Previous Topic:How to create with JAXB or EMF the XMI files from a created sirius editor.
Next Topic:How to use diagram extension
Goto Forum:
  


Current Time: Mon Jan 18 02:22:59 GMT 2021

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

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

Back to the top