|
Re: Multiple ecore files with similar structure [message #622221 is a reply to message #622214] |
Wed, 24 February 2010 16:24 |
Ed Merks Messages: 33137 Registered: July 2009 |
Senior Member |
|
|
Sui,
Comments below.
Sui wrote:
> Hi, i have the following problem.
>
> My primary goal is to create a GMF-editor for a XML-based language.
>
> I created three ecore Files out of XSD Files.
> The difference between them is that they have advanced capabilities
> that are caused by redefines in the XSD files
Redefines are, in my opinion, an abomination. They're so poorly defined
by the specification they're basically unimplementable. I believe
they've been deprecated in the 1.1 revision of the specification.
>
> example:
> The Root Tag <shxml> has a option "mode".
> mode can be either "normal", "extra" or "extra2". (<shxml mode="extra">
>
> So, if the mode is "extra", the <scxml> (EClass) have an extra
> Tag<something> (EReference to an extra EType) and if the mode is
> "normal", this Tag (EReferece and EClass) don't exists.
>
> So, i am searching for the best way to create the editor and load the
> needed ecore-model in dependence of the mode setting
You'd be best off to define a model that could accept any variant.
>
> Or maybe its a better solution to create three Editors and switch
> between them depending of the mode setting? problem then.. the .shxml
> extension?!?
You could take advantage of registering a factory based on content type
and then do extra analysis based on this attribute's value.
>
> I hope my description is understandable, because my English is not
> very good.
It sounds like a hard problem.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
Powered by
FUDForum. Page generated in 0.03297 seconds