Bug 84407 - [ViewMgmt] Mark the title of a view as dirty
Summary: [ViewMgmt] Mark the title of a view as dirty
Status: VERIFIED FIXED
Alias: None
Product: Platform
Classification: Eclipse Project
Component: UI (show other bugs)
Version: 3.1   Edit
Hardware: Macintosh All
: P3 normal (vote)
Target Milestone: 3.2 M5   Edit
Assignee: Paul Webster CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2005-02-03 20:49 EST by Pascal Rapicault CLA
Modified: 2006-02-16 14:10 EST (History)
2 users (show)

See Also:


Attachments
Patch to fix this (4.03 KB, patch)
2006-01-16 15:30 EST, Nick Edgar CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Pascal Rapicault CLA 2005-02-03 20:49:49 EST
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.
Comment 1 Nick Edgar CLA 2006-01-16 15:30:23 EST
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)
Comment 2 Nick Edgar CLA 2006-01-16 15:30:41 EST
Paul, could you please review this patch?
Comment 3 Nick Edgar CLA 2006-01-16 15:32:32 EST
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
Comment 4 Nick Edgar CLA 2006-01-26 16:21:11 EST
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.

Comment 5 Nick Edgar CLA 2006-01-26 16:31:21 EST
cc'ing Matt.  I thought we had discussed this before, elsewhere in bugzilla, but I can't find the PR. 
Comment 6 Paul Webster CLA 2006-01-27 07:27:07 EST
Reviewed and it looks good.

PW
Comment 7 Nick Edgar CLA 2006-01-27 10:23:01 EST
Thanks.  Closing.
Comment 8 Paul Webster CLA 2006-02-16 14:10:24 EST
verified in I20060216-0010