| Summary: | [Compatibility] Parts that implement ISaveableSources do not have their Saveables queried or saved | ||||||
|---|---|---|---|---|---|---|---|
| Product: | [Eclipse Project] e4 | Reporter: | Michael Valenta <Michael.Valenta> | ||||
| Component: | UI | Assignee: | Remy Suen <remy.suen> | ||||
| Status: | RESOLVED FIXED | QA Contact: | Remy Suen <remy.suen> | ||||
| Severity: | major | ||||||
| Priority: | P3 | CC: | pwebster, remy.suen | ||||
| Version: | 1.0 | ||||||
| Target Milestone: | 4.1 M4 | ||||||
| Hardware: | All | ||||||
| OS: | All | ||||||
| Whiteboard: | |||||||
| Attachments: |
|
||||||
|
Description
Michael Valenta
(In reply to comment #0) > We have an editor that uses the Saveable interface to perform a background > save. When I tried to save in Eclipse 4.1 I got the following exception because > we do not support saving without a progress monitor. This is very weird because the value should be non-null. Unless the UOE is asserting on something else? void doSave(@Optional IProgressMonitor monitor) { monitor = SubMonitor.convert(monitor); if (wrapped instanceof ISaveablePart) { ((ISaveablePart) wrapped).doSave(monitor); } } I thought it was asserting on calling doSave(*) at all, as they expect it to be done as part of a background save? PW Sorry, I was off on my original assessment. The part in question is returning a saveable from getSaveables() so it doesn't expect its (i.e. the part's) doSave to be called but instead expects save to be called on the saveable. (In reply to comment #3) > The part in question is returning a > saveable from getSaveables() so it doesn't expect its (i.e. the part's) doSave > to be called but instead expects save to be called on the saveable. Noted. We need to check if the IWorkbenchPart implementation is also an implementation of ISaveablesSource and then take it from there instead of invoking doSave(IProgressMonitor) directly on the part in question. Created attachment 183150 [details]
Saveable handling patch v1
(In reply to comment #5) > Created an attachment (id=183150) [details] > Saveable handling patch v1 Fix released to CVS HEAD. Thanks for the bug report, Michael. |