Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [sapphire-dev] SapphireEditorForXml dynamic model type

Sounds like a reasonable request. Please open an enhancement request and we can discuss this further there. Note that if you wish to make a patch contribution, there is slightly more than a week left to contribute the patch and get it reviewed/merged in time for 0.4 release’s 11/17 IP Log deadline.

 

- Konstantin

 

 

From: sapphire-dev-bounces@xxxxxxxxxxx [mailto:sapphire-dev-bounces@xxxxxxxxxxx] On Behalf Of Greg Amerson
Sent: Tuesday, November 08, 2011 7:34 PM
To: Sapphire project
Subject: [sapphire-dev] SapphireEditorForXml dynamic model type

 

Hello Sapphire-ians, 

 

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 and not have to copy all of that code into my own subclass of SapphireEditor.  So, I'd rather just extend the XMLeditor class, but when I do that I am unload to modify the portions sneak a peak at the file that is being opened, in Editor.init() to see the IEditorInput so that I can then call the API, setRootModelElementType(...).

 

All of the methods that I would be interested in overriding to do this are set to final in SapphireEditorForXml or its superclasses.  So my request would be one of the following:

  • Details on how to do this with current API or
  • make some finals methods in SapphireEditorForXml, non-final or
  • Introduce a new API/method in SapphireEditorForXml that sub-classes can override to perform this logic

I can submit a patch for this with some guidance if we choose door #2 or #3.  Thanks everyone!

 

--

Greg Amerson

Liferay, Inc.


Back to the top