[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Newsgroup Home]
[news.eclipse.tools.emf] Re: GenModel and file extension

Cyril,

Comments below.

Cyril Faucher wrote:
Hi,

I am discovering a new (for me) parameter in the GenModel: file extension.
Firstly, this parameter has replaced prefix to calculate the file extension ?
Yes, this gives you explicit control over what file extensions will be used; you can specify several...

Where is it reused in the generated code by EMF: model, edit, editor ?
It's used in the model's plugin.xml; remember that plugin.xml doesn't regenerate.  It's also used to register the editors and is needed in the wizard to make sure a good file extension is chosen.  So again, it affects the plugin.xml and it affects the generated plugin.properties; the former of course doesn't regenerate, and the latter while supporting merging will not change the value of an existing property.
I wish to get it throw the model source code. In my application, I have not access from the genmodel and the edit or editor plugins are not generated.
I see.

So the question: is there a workaround for getting the file extension without the *.genmodel, edit and editor plugins, but only with the model plugins.
Hmmm.  No.  If you declare a content type, a constant for that is generated in the XyxFactory interface, and with content types, many different extensions could be supported at the same time, including extensions also used by other models...

Are you writing a generic application or can you just declare a constant for your model that you use elsewhere?

Best regards,
Cyril.