Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Issues Generating with JavaImporterApplication
Issues Generating with JavaImporterApplication [message #691841] Sat, 02 July 2011 14:32 Go to next message
Alain Picard is currently offline Alain PicardFriend
Messages: 266
Registered: July 2009
Senior Member
I'm trying to use the JavaImporterApplication to generate a genmodel and
ecore from some annotated Java programmatically.

The process works quite well but with a few issues:
1- I can't seem to be able to set my ecore file name
I have a package called demo and I want to get my ecore to be MyDemo.ecore

2- My package nsURI seems to be changed:
I am submitting a package with an nsURI of:
http://demo.ist.emf.iris.castortech.com/spec/1.0
and I get:
http:///com/castortech/iris/emf/language/demo.ecore

3- My template directory is being screwed up:
I submit: "/com.castortech.jtb/templates/emfgen"
and I get: "file:/C:/com.castortech.jtb/templates/emfgen", which is
invalid by the way, as the right version is rooted at the workspace not
the drive, which is also non-portable.

4- How can I set other genmodel features for which there are not
arguments, like rootExtendsInterface, rootExtendsClass,
modelPluginVariables?

Thanks
Alain
Re: Issues Generating with JavaImporterApplication [message #691876 is a reply to message #691841] Sat, 02 July 2011 17:13 Go to previous messageGo to next message
Ed Merks is currently offline Ed MerksFriend
Messages: 33145
Registered: July 2009
Senior Member
Alain,

Comments below.


On 02/07/2011 7:32 AM, Alain Picard wrote:
> I'm trying to use the JavaImporterApplication to generate a genmodel
> and ecore from some annotated Java programmatically.
>
> The process works quite well but with a few issues:
> 1- I can't seem to be able to set my ecore file name
> I have a package called demo and I want to get my ecore to be
> MyDemo.ecore
Gosh, it's been a while since I did this...
>
> 2- My package nsURI seems to be changed:
> I am submitting a package with an nsURI of:
> http://demo.ist.emf.iris.castortech.com/spec/1.0
> and I get:
> http:///com/castortech/iris/emf/language/demo.ecore
The nsURI is specified in the @model information?
>
> 3- My template directory is being screwed up:
> I submit: "/com.castortech.jtb/templates/emfgen"
> and I get: "file:/C:/com.castortech.jtb/templates/emfgen", which is
> invalid by the way, as the right version is rooted at the workspace
> not the drive, which is also non-portable.
You're running this application with a workspace?
>
> 4- How can I set other genmodel features for which there are not
> arguments, like rootExtendsInterface, rootExtendsClass,
> modelPluginVariables?
You don't...

It would be better if you created your *.genmodel in the IDE and then
used the importer application to reload it. That way you can specify
everything you want and have it stay that way. It's would be a huge
task to make everything that can be configured in the GenModel be
controllable via a command line equivalent.
> Thanks
> Alain
>
>


Ed Merks
Professional Support: https://www.macromodeling.com/
Re: Issues Generating with JavaImporterApplication [message #692205 is a reply to message #691876] Sun, 03 July 2011 22:07 Go to previous message
Alain Picard is currently offline Alain PicardFriend
Messages: 266
Registered: July 2009
Senior Member
See below
On 7/2/2011 1:13 PM, Ed Merks wrote:
> Alain,
>
> Comments below.
>
>
> On 02/07/2011 7:32 AM, Alain Picard wrote:
>> I'm trying to use the JavaImporterApplication to generate a genmodel
>> and ecore from some annotated Java programmatically.
>>
>> The process works quite well but with a few issues:
>> 1- I can't seem to be able to set my ecore file name
>> I have a package called demo and I want to get my ecore to be
>> MyDemo.ecore
> Gosh, it's been a while since I did this...
There's a time for trying everything. So is there a way to specify the
..ecore name, that is one of my biggest remaining issue.

>>
>> 2- My package nsURI seems to be changed:
>> I am submitting a package with an nsURI of:
>> http://demo.ist.emf.iris.castortech.com/spec/1.0
>> and I get:
>> http:///com/castortech/iris/emf/language/demo.ecore
> The nsURI is specified in the @model information?
Do you mean that I need to provide a certain annotation and if so where,
in a package interface?

>>
>> 3- My template directory is being screwed up:
>> I submit: "/com.castortech.jtb/templates/emfgen"
>> and I get: "file:/C:/com.castortech.jtb/templates/emfgen", which is
>> invalid by the way, as the right version is rooted at the workspace
>> not the drive, which is also non-portable.
> You're running this application with a workspace?
Yes, I am. I've changed it by extending JavaImporterApplication and
providing for the setting of the options in 4 and also for the template
directory, which fixed the problem. But I believe the code in the
generator is wrong in not directly taking the string supplied and trying
to do some sort of URI manipulation on it.

>>
>> 4- How can I set other genmodel features for which there are not
>> arguments, like rootExtendsInterface, rootExtendsClass,
>> modelPluginVariables?
> You don't...
Well I do now, see above.

>
> It would be better if you created your *.genmodel in the IDE and then
> used the importer application to reload it. That way you can specify
> everything you want and have it stay that way. It's would be a huge task
> to make everything that can be configured in the GenModel be
> controllable via a command line equivalent.
I absolutely need to automate the full generation process, as I'm also
intertwining other steps in the process.

>> Thanks
>> Alain
>>
>>
Previous Topic:Issues generating model code with Generator
Next Topic:How to put EMF editor in view
Goto Forum:
  


Current Time: Sun May 05 16:00:21 GMT 2024

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

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

Back to the top