Community
Participate
Working Groups
Even though view can implement ISaveable, a view can't indicate if it is dirty or not. That is necessary for RCP application where edition is done in the view itself.
Created attachment 33103 [details] Patch to fix this Changes include: - WorkbenchPartReference.isDirty() logic generalized to handle both views and editors; EditorReference.isDirty() deleted. - deleted ViewPane.propertyChanged(...) -- it was blocking the super implementation, and did not add any new behaviour. - SaveAllAction generalized to handle PROP_DIRTY from any ISaveablePart, not just IEditorParts (this is an incidental fix)
Paul, could you please review this patch?
To manually test this: - load org.eclipse.ui.tests - launch target eclipse - in target: Window > Show View > Other... > Other > Saveable Mock View - toggle the "Dirty" check box - tab text should show '*' accordingly
I've gone ahead and released these changes since I want to demo this as part of the overall work on save/close lifecycle (see bug 112225). I also pushed IEditorReference.isDirty() up to IWorkbenchPartReference. I'd still appreciate you reviewing the patch though.
cc'ing Matt. I thought we had discussed this before, elsewhere in bugzilla, but I can't find the PR.
Reviewed and it looks good. PW
Thanks. Closing.
verified in I20060216-0010