isDirty() check in the Papyrus Integrated editors.. [message #831049] |
Wed, 28 March 2012 11:54 |
Eclipse User |
|
|
|
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 |
Eclipse User |
|
|
|
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
|
|
|
Powered by
FUDForum. Page generated in 0.03700 seconds