EMF models <-> extension points [message #81051] |
Sat, 13 January 2007 14:50  |
Eclipse User |
|
|
|
Why are extension point schemas not real XSD? Maybe there are good
reasons for that, and someone could point me to some place where these
reasons are described?
I'm not that familiar with all the EMF related technologies yet, but it
seems that if extension point schemas were real XSD, it would be
possible to generate them and the extensions from EMF models. Or is this
already possible somehow?
Where I'm coming from is that I've developed a somewhat complex
extension point for defining GUIs that follow our internal best
practices and I'd like to create a GMF based editor for them at some
point. Maybe I'm thinking the wrong way and there is some other way that
should be done.
For example, maybe the GUI definitions should be plain XML and not
extension points, and the extensions would just tell which XML file
defines the GUI, or maybe they should be EMF models stored in some other
way. Or maybe I should use some existing generator to generate the
plugin.xml files?
Thanks,
Erkki Lindpere
|
|
|
Re: EMF models <-> extension points [message #81079 is a reply to message #81051] |
Sun, 14 January 2007 19:48  |
Eclipse User |
|
|
|
Hi Erkki,
See my comments below.
Cheers,
Marcelo
Erkki Lindpere wrote:
> Why are extension point schemas not real XSD? Maybe there are good
> reasons for that, and someone could point me to some place where these
> reasons are described?
I also would love if the extension point schemas were actual XML
schemas. I believe only the PDE guys can answer why it is not ;-)
>
> I'm not that familiar with all the EMF related technologies yet, but it
> seems that if extension point schemas were real XSD, it would be
> possible to generate them and the extensions from EMF models. Or is this
> already possible somehow?
Yes, it would be very easy to create a model to represent your extension
point in memory if "schemas were actually schemas" ;-) I think you
could implement a specialized version of the XMLResourceImpl to handle
the extension points specific details. Maybe just customizing
XMLHelper, XMLSave, or XMLLoad would be enough. Btw, this is not the
first time that I am hearing about this. Perhaps someone in the
community has some pointers to give you.
>
> Where I'm coming from is that I've developed a somewhat complex
> extension point for defining GUIs that follow our internal best
> practices and I'd like to create a GMF based editor for them at some
> point. Maybe I'm thinking the wrong way and there is some other way that
> should be done.
>
> For example, maybe the GUI definitions should be plain XML and not
> extension points, and the extensions would just tell which XML file
> defines the GUI, or maybe they should be EMF models stored in some other
> way. Or maybe I should use some existing generator to generate the
> plugin.xml files?
>
Both approaches seem reasonable to me at a first glance. The former is
pretty much on the DSL land, where plugins and extension points would be
the subjects of your language. The latter is a transformation approach
to which the Modeling Project has a good answer too: the JET template
engine.
I think you should choose the one you feel more comfortable with.
> Thanks,
> Erkki Lindpere
|
|
|
Powered by
FUDForum. Page generated in 0.05335 seconds