Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Sirius » Diagram Editor not showing dirty state!
Diagram Editor not showing dirty state! [message #1698045] Wed, 10 June 2015 15:11 Go to next message
Bailey Trenton is currently offline Bailey TrentonFriend
Messages: 31
Registered: May 2015
Member
Hello,
I have been working with Sirius for a while now and am having an issue with the diagram editor not showing that it is dirty.

When I start my application, the diagram is already open and on the diagram is one container with one node inside that container.

If the first thing I do is move the node inside the container to another spot inside that same container, the editor does not go dirty(does not have the * symbol). The "Save" button activates so there are changes registered but no dirty icon on the editor.

After I hit the save button, all other changes do make the editor dirty.

Is there a way for me to get the editor to register dirty for all changes at any layer?

Any help would be appreciated.

Bailey

[Updated on: Wed, 10 June 2015 15:27]

Report message to a moderator

Re: Diagram Editor not showing dirty state! [message #1698049 is a reply to message #1698045] Wed, 10 June 2015 15:58 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 505
Registered: May 2011
Senior Member
Hello,

I tried to reproduce your issue by having an opened diagram with a
container containing a node, when I closed Eclipse. My diagram is also
opened when I start Eclipse. However, the dirty state is displayed when
I move a node inside my container.
How do you proceed to open the Sirius session and the diagram in your
application? What is your version of Sirius?

Regards,
Steve

Le 10/06/2015 17:11, Bailey Trenton a écrit :
> Hello,
> I have been working with Sirius for a while now and am having an
> issue with the diagram editor not showing that it is dirty.
>
> When I start my application, the diagram is already open and on the
> diagram is one container with one node inside that container.
>
> If the first thing I do is move the node inside the container to another
> spot inside that same container, the editor does not go dirty(does not
> have the * symbol). The "Save" button activates so there are changes
> registered but no dirty icon on the editor.
>
> However, if I move the container around first, the editor goes dirty(Has
> the * symbol).
>
> Is there a way for me to get the editor to register dirty for all
> changes at any layer?
>
> Any help would be appreciated.
>
> Bailey


--
Steve Monnier - Obeo

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


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Diagram Editor not showing dirty state! [message #1698055 is a reply to message #1698049] Wed, 10 June 2015 16:59 Go to previous messageGo to next message
Bailey Trenton is currently offline Bailey TrentonFriend
Messages: 31
Registered: May 2015
Member
Hi Steve,
I am currently using Sirius 2.0.5 with Luna. We create and open the diagram programmatically at first but after it is created and I close down the program and reopen it, the diagram gets loaded by Sirius.

The only difference we have is that we have a sessionManagerListener registered that sets the Reloading and Saving policies but neither of these seem to get invoked during the load. We also create the UI session in the SessionManagerListener because in the constructor for the UI session it overwrites the reloading policy we set on the current Session.

Thanks,
Bailey
Re: Diagram Editor not showing dirty state! [message #1698125 is a reply to message #1698055] Thu, 11 June 2015 13:19 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 505
Registered: May 2011
Senior Member
Hello,

Can you tell me a little more what you Reloading and Saving policies are
used for? Maybe there is way to contribute your specific behaviour
instead of overwritting some of the Sirius policies that could cause
some unexpected behaviours.

Regards,
Steve

Le 10/06/2015 18:59, Bailey Trenton a écrit :
> Hi Steve,
> I am currently using Sirius 2.0.5 with Luna. We create and open the
> diagram programmatically at first but after it is created and I close
> down the program and reopen it, the diagram gets loaded by Sirius.
> The only difference we have is that we have a sessionManagerListener
> registered that sets the Reloading and Saving policies but neither of
> these seem to get invoked during the load. We also create the UI
> session in the SessionManagerListener because in the constructor for the
> UI session it overwrites the reloading policy we set on the current
> Session.
> Thanks,
> Bailey
>


--
Steve Monnier - Obeo

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


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Diagram Editor not showing dirty state! [message #1698135 is a reply to message #1698125] Thu, 11 June 2015 14:21 Go to previous messageGo to next message
Bailey Trenton is currently offline Bailey TrentonFriend
Messages: 31
Registered: May 2015
Member
Hi,
The reason we needed our own reloading policy is because during our Resource loading, we make changes to the meta model and need the reload to happen in a write transaction. The reloading action returned for the default reloading policy is done in read only transaction which causes our system to crash.

I actually don't think we have a savings policy anymore. We were just experimenting with it.

I am still not sure what is causing our Diagram editor to not show the dirty state.

Thanks,
Bailey
Re: Diagram Editor not showing dirty state! [message #1698166 is a reply to message #1698135] Thu, 11 June 2015 19:22 Go to previous messageGo to next message
Bailey Trenton is currently offline Bailey TrentonFriend
Messages: 31
Registered: May 2015
Member
Hello,

I have investigated the problem further and think I know what the issue is.

Our project has two editors that edit the same model and use the same editing domain(Sirius's EditingDomain). In the DAnalysisSessionImpl.java notifyListeners method it checks to see if the notification received was the same type as the previous one and if so it doesn't forward it on. In our case the dirty notification is coming from our other editor so when the DAnalysisSession sees the dirty notification coming from the diagram, it matches the previous notification type and therefore does not update the dirty state of the diagram.
Was Sirius not designed to allow sharing of its editing domain with other editors? If not should I submit a bugzilla for that feature?

Thanks,
Bailey
Re: Diagram Editor not showing dirty state! [message #1698228 is a reply to message #1698166] Fri, 12 June 2015 11:06 Go to previous messageGo to next message
Steve Monnier is currently offline Steve MonnierFriend
Messages: 505
Registered: May 2011
Senior Member
Hello,

Does your second editor is a custom editor or a Sirius representation?

Anyway this is unexpected. Doing your model edition using the Sirius
Transactional Editing Domain should propagate the dirty state to the
Sirius Editor. I guess you can submit a bugzilla presenting both of your
editors and how you execute your model operation.

Regards,
Steve

Le 11/06/2015 21:22, Bailey Trenton a écrit :
> Hello,
>
> I have investigated the problem further and think I know what the issue is.
>
> Our project has two editors that edit the same model and use the same
> editing domain(Sirius's EditingDomain). In the
> DAnalysisSessionImpl.java notifyListeners method it checks to see if the
> notification received was the same type as the previous one and if so it
> doesn't forward it on. In our case the dirty notification is coming
> from our other editor so when the DAnalysisSession sees the dirty
> notification coming from the diagram, it matches the previous
> notification type and therefore does not update the dirty state of the
> diagram.
> Was Sirius not designed to allow sharing of its editing domain with
> other editors? If not should I submit a bugzilla for that feature?
>
> Thanks,
> Bailey


--
Steve Monnier - Obeo

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


Steve Monnier - Obeo
Need training or professional services for Sirius?
http://www.obeodesigner.com/sirius
Re: Diagram Editor not showing dirty state! [message #1698273 is a reply to message #1698228] Fri, 12 June 2015 17:39 Go to previous message
Bailey Trenton is currently offline Bailey TrentonFriend
Messages: 31
Registered: May 2015
Member
Hi,
Our second editor is just a text editor.

I think we have determined the issue. Our model is in memory and our semantic resource is just a text file. Our system can make changes to the model that will not be represented on the diagram or in the resource. When these changes happen the session fires a change notification but nothing has actually changed in the files, just the model. This gets recorded as a dirty notification in the DAnalysisSessionImpl but the editor is actually not dirty. When I then try and move nodes around, the diagram gets another dirty notification but it already thinks it is dirty so it doesn't propagate that message on.

So I think it is something we have to figure out with our system and when we should generate notifications.

Thanks,
Bailey
Previous Topic:Node Creation Problem
Next Topic:How to listen event when mouse over a node on diagram?
Goto Forum:
  


Current Time: Tue Jan 26 12:53:16 GMT 2021

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

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

Back to the top