Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 363258

Summary: Allow dynamic model types for SapphireEditorForXml
Product: z_Archived Reporter: Greg Amerson <gregory.amerson>
Component: SapphireAssignee: Konstantin Komissarchik <konstantin>
Status: CLOSED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: konstantin
Version: unspecified   
Target Milestone: ---   
Hardware: All   
OS: All   
Whiteboard:
Attachments:
Description Flags
patch1 - createModel() switched to non-final
none
Patch v2 konstantin: iplog+

Description Greg Amerson CLA 2011-11-09 00:18:37 EST
I have a case where I would like to dynamically switch the model type for a sapphire editor on open.  This is easy enough to do if I extend SapphireEditor.  However, this editor is going to be standard MasterDetailsPage with a source editor page, and I'd like to use SapphireEditorForXml but when I do that I am unable to set the model type after the file editor input has been set but before the model is created.
Comment 1 Greg Amerson CLA 2011-11-09 00:21:30 EST
Created attachment 206643 [details]
patch1 - createModel() switched to non-final

This patch simply switching the protected createModel() method in the SapphireEditorForXml to non-final so subclass can set the model type just before it is created.
Comment 2 Greg Amerson CLA 2011-11-09 00:23:32 EST
Created attachment 206644 [details]
Patch v2

Same patch as patch 1 but with source attribution in header comments.
Comment 3 Konstantin Komissarchik CLA 2011-11-09 10:32:11 EST
Patch accepted. Please verify.
Comment 4 Konstantin Komissarchik CLA 2011-11-09 10:32:36 EST
Comment on attachment 206644 [details]
Patch v2

Same as patch v1 but when source attribution.
Comment 5 Greg Amerson CLA 2011-11-09 22:13:54 EST
Verified with latest CVS.
Comment 6 Konstantin Komissarchik CLA 2011-11-09 22:23:00 EST
Thanks. Closing.