Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF "Technology" (Ecore Tools, EMFatic, etc)  » Multiple ecore files with similar structure
Multiple ecore files with similar structure [message #622214] Wed, 24 February 2010 14:27 Go to next message
Dennis sui is currently offline Dennis suiFriend
Messages: 35
Registered: February 2010
Member
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

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

Or maybe its a better solution to create three Editors and switch between them depending of the mode setting? problem then.. the .shxml extension?!?

I hope my description is understandable, because my English is not very good.
Re: Multiple ecore files with similar structure [message #622221 is a reply to message #622214] Wed, 24 February 2010 16:24 Go to previous message
Ed Merks is currently offline Ed MerksFriend
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/
Previous Topic:Multiple ecore files with similar structure
Next Topic:[EEF] Recipe for incorporating related views
Goto Forum:
  


Current Time: Fri Apr 19 21:27:33 GMT 2024

Powered by FUDForum. Page generated in 0.03297 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top