Skip to main content

Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Eclipse Platform » FormEditor and dirty/commit protocol
FormEditor and dirty/commit protocol [message #512982] Mon, 08 February 2010 13:56
Franck Mising name is currently offline Franck Mising nameFriend
Messages: 92
Registered: July 2009
Location: France
I am confused by the dirty/commit semantics in the FormEditor and IFormPart.

According to the isDirty() javadoc in those classes, editor.isDirty() answers whether the editor needs saving, whereas part.isDirty() answers whether a GUI part has any GUI state that hasn't been commited to the model (in memory).

However the default implementations in AbstractFormPart and FormEditor mark the editor as dirty if and only if one of its parts is dirty??
So if for example a text part marks itself as dirty with each key press then commits when Return is hit or it loses focus, the editor ends up as not dirty even though the model does need saving.

Shouldn't AbstractFormPart.commit() call editor.setNeedsSaving(true) (and editorDirtyStateChanged)
and editor.isDirty() be implemented as
_needsSaving || <any contained part is dirty>?
Previous Topic:Contributing editor actions to specific place in the toolbar
Next Topic:Use something like http://org.eclipse.ui.intro/runAction in internal browser
Goto Forum:

Current Time: Mon May 28 03:36:31 GMT 2018

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

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

Back to the top