Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 363258 - Allow dynamic model types for SapphireEditorForXml
Summary: Allow dynamic model types for SapphireEditorForXml
Status: CLOSED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Sapphire (show other bugs)
Version: unspecified   Edit
Hardware: All All
: P3 enhancement (vote)
Target Milestone: ---   Edit
Assignee: Konstantin Komissarchik CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-11-09 00:18 EST by Greg Amerson CLA
Modified: 2021-11-19 09:22 EST (History)
1 user (show)

See Also:


Attachments
patch1 - createModel() switched to non-final (1014 bytes, patch)
2011-11-09 00:21 EST, Greg Amerson CLA
no flags Details | Diff
Patch v2 (1.27 KB, patch)
2011-11-09 00:23 EST, Greg Amerson CLA
konstantin: iplog+
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.