Bug 126230

Summary: CompareEditor and ISaveableModelSource
Product: [Eclipse Project] Platform Reporter: Michael Valenta <Michael.Valenta>
Component: CompareAssignee: Andre Weinand <andre_weinand>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.2   
Target Milestone: 3.2 M5   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on:    
Bug Blocks: 119621    
Attachments:
Description Flags
Patch to add saveable model support to compare editor none

Description Michael Valenta CLA 2006-02-02 13:16:42 EST
The Workbench has introduced a new interface, ISaveableModelSource, which gives views more control over the save lifecycle of their models. The ISaveableModel API is similar to an IDocument but only only deals with the save lifecycle. What it allows is for a model to be shared between views and editors. The model can be saved in either the view or the editor. The workbench will prompt based on saveable models on shutdown and will only prompt when closing the last view or editor with a referecne to a model.

We are using this to support model based synchronization. What we would like is the ability to open and work in multiple compare editors from the sync view and only get prompted when all the editors and the sync view are closed. In other words, the sync view will manage the save lifecycle of the model instead of the editor. In order to support this, a small number of changes are required to CompareEditor. I will attach the proposed patch.
Comment 1 Michael Valenta CLA 2006-02-02 13:48:12 EST
Created attachment 34039 [details]
Patch to add saveable model support to compare editor
Comment 2 Andre Weinand CLA 2006-02-06 06:17:37 EST
Thanks, Michael.
patch reviewed and applied.