Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Papyrus » isDirty() check in the Papyrus Integrated editors..
isDirty() check in the Papyrus Integrated editors.. [message #831049] Wed, 28 March 2012 11:54 Go to next message
Eclipse UserFriend
Hello,

i have a problem with the dirty marking of the Papyrus editor. I have
registered my editor (which is integrated in Papyrus) in the
saveAndDirtyService like that:

ISaveAndDirtyService saveAndDirtyService =
serviceRegistry.getService(ISaveAndDirtyService.class);
saveAndDirtyService.registerIsaveablePart(editor);

Now Papyrus is checking if the Editor is dirty, but it affects only the
saveAll action. Shouldn't be the save action enabled too?
Is this a bug or is there another way to realize this?

Regards
Mehmet
Re: isDirty() check in the Papyrus Integrated editors.. [message #837093 is a reply to message #831049] Thu, 05 April 2012 09:02 Go to previous messageGo to next message
Cedric Dumoulin is currently offline Cedric DumoulinFriend
Messages: 51
Registered: July 2009
Member
Hi,

The SaveAndDirtyService is used to listen on the model changes.
If a change occur in the model, or a command succeed (which in turn
change the model), the SaveAndDirtyService fire a isDirtyChanged()
event to all listeners.
This is typically used by the main PapyrusEditor to propagate the
isDirty flag. Also, nested editors use it to be informed about model
changes.
The fact that the Save or SaveAll actions is enable/disable is not
managed by the service.
I don't remind how the Save and SaveAll actions are listening on
dirty state change. I suppose that they are listening in a way or
another to the isDirty flag from the main Papyrus editor (and not from
the SaveAndDirtyService).
Check if this also happen with Papyrus regular nested editors (like
classes). If yes, this is a bug.

Hope this help,
Cedric



M. Karaman a écrit :
> Hello,
>
> i have a problem with the dirty marking of the Papyrus editor. I have
> registered my editor (which is integrated in Papyrus) in the
> saveAndDirtyService like that:
>
> ISaveAndDirtyService saveAndDirtyService =
> serviceRegistry.getService(ISaveAndDirtyService.class);
> saveAndDirtyService.registerIsaveablePart(editor);
>
> Now Papyrus is checking if the Editor is dirty, but it affects only the
> saveAll action. Shouldn't be the save action enabled too?
> Is this a bug or is there another way to realize this?
>
> Regards
> Mehmet
Re: isDirty() check in the Papyrus Integrated editors.. [message #841411 is a reply to message #837093] Wed, 11 April 2012 09:06 Go to previous message
Eclipse UserFriend
Hi,

thank you for the answer. The regular nested editors are reacting correctly.
So i have to find another way to set the PapyrusEditor to the dirty state.

Regards
Mehmet


"Cedric Dumoulin" schrieb im Newsbeitrag
news:jljn2s$dlb$1@xxxxxxxxe.org...


Hi,

The SaveAndDirtyService is used to listen on the model changes.
If a change occur in the model, or a command succeed (which in turn
change the model), the SaveAndDirtyService fire a isDirtyChanged()
event to all listeners.
This is typically used by the main PapyrusEditor to propagate the
isDirty flag. Also, nested editors use it to be informed about model
changes.
The fact that the Save or SaveAll actions is enable/disable is not
managed by the service.
I don't remind how the Save and SaveAll actions are listening on
dirty state change. I suppose that they are listening in a way or
another to the isDirty flag from the main Papyrus editor (and not from
the SaveAndDirtyService).
Check if this also happen with Papyrus regular nested editors (like
classes). If yes, this is a bug.

Hope this help,
Cedric



M. Karaman a écrit :
> Hello,
>
> i have a problem with the dirty marking of the Papyrus editor. I have
> registered my editor (which is integrated in Papyrus) in the
> saveAndDirtyService like that:
>
> ISaveAndDirtyService saveAndDirtyService =
> serviceRegistry.getService(ISaveAndDirtyService.class);
> saveAndDirtyService.registerIsaveablePart(editor);
>
> Now Papyrus is checking if the Editor is dirty, but it affects only the
> saveAll action. Shouldn't be the save action enabled too?
> Is this a bug or is there another way to realize this?
>
> Regards
> Mehmet
Previous Topic:Name of interface does not show up after export to an image
Next Topic:Problem creating diagram
Goto Forum:
  


Current Time: Thu Apr 25 00:33:52 GMT 2024

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

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

Back to the top