[Acceleo/EMF] Problem in Main.java after refactoring one meta-model into two [message #639820] |
Wed, 17 November 2010 23:03 |
Glenview Jeff Messages: 79 Registered: September 2010 |
Member |
|
|
I just refactored my meta-model by splitting it into two separate ecore files, one for application-specific components and one for platform-specific components.
I loaded the resources from the application-specific meta-model into the platform-specific meta-model, created a single genmodel that contains both meta-models, and successfully generated the model editor plugin and started the new Eclipse. In my existing mtl file templates, I added the module imports to the top line of the mtl files to successfully wire the new dependencies.
However, one last problem remains that is stumping me. I recreated a new clean main.mtl and Main.java files.
Inside Main.java, there is a method called registerPackages. In the method, there are a bunch of calls to: resourceSet.getPackageRegistry().put(packagepath...)
They are all unresolved. Is there something obvious I'm missing?
Thanks for any help!
[Updated on: Wed, 17 November 2010 23:50] Report message to a moderator
|
|
|
|
Re: [Acceleo/EMF] Problem in Main.java after refactoring one meta-model into two [message #639868 is a reply to message #639826] |
Thu, 18 November 2010 08:00 |
|
This is a multi-part message in MIME format.
--------------040005050906040707080200
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Jeff,
I'd say you're missing the required dependencies for these packages to
be resolved. If these packages are necessary (and I believe they are),
you'll have to open the META-INF/MANIFEST.MF file of your plugin and, on
the "dependencies" tab (at the bottom of the editor), you'll have to
"Add" dependencies towards the required plugins.
Laurent Goubet
Obeo
On 18/11/2010 00:59, glenviewjeff wrote:
> I realized my description was a little vague. Specifically, it's the
> "packagexyz" top-level package that's causing the "packagexyz cannot be
> resolved" error.
>
> resourceSet.getPackageRegistry().put(packagexyz.path.eINSTAN CE.getNsURI(),
> android.AndroidPackage.eINSTANCE);
>
>
> Thanks for any help!
--------------040005050906040707080200
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------040005050906040707080200--
|
|
|
|
Re: [Acceleo/EMF] Problem in Main.java after refactoring one meta-model into two [message #640115 is a reply to message #640056] |
Fri, 19 November 2010 07:27 |
|
This is a multi-part message in MIME format.
--------------030302050007060805040007
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Jeff,
If the "bin" folder of one of your projects doesn't contain the "class"
files corresponding to your "java" sources, the most probable cause is
that you have disabled the automatic build of your Eclipse. "Project" >
"Automatic Build" must be ticked.
Laurent Goubet
Obeo
On 18/11/2010 21:40, glenviewjeff wrote:
> Hi Laurent:
>
> I'm not sure if there's really a problem with the manifest file
> dependencies. I made some new changes to the meta-models and the problem
> returned again.
> Recall that I have two meta-models, where the application meta-model is
> dependent upon the platform-specific meta-model. I had created a
> genmodel file that contains both meta-models.
> Some further information about the problem: I browsed through the
> plug-in dependencies in the project containing the main.mtl file. I
> found something strange in the bin folder which corresponds to the
> meta-model project from the parent Eclipse session.
> Inside that bin folder, the packages are absent that correspond to the
> errored lines Main.java.
>
> What could prevent those packages from not being generated?
> One additional piece of information: I had created a new meta-model
> empty EMF project and copied the meta-models over to the fresh project,
> and this did fix a few of the missing packages, but not all of them.
> Thanks as usual for any help!
>
--------------030302050007060805040007
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------030302050007060805040007--
|
|
|
|
|
Re: [Acceleo/EMF] Problem in Main.java after refactoring one meta-model into two [message #640454 is a reply to message #640255] |
Mon, 22 November 2010 08:12 |
|
This is a multi-part message in MIME format.
--------------030607070700010808010908
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Hi Jeff,
I must admit I'm quite confused right now.
Could you briefly describe which projects you have in which Eclipse
workspace? If you followed one of the EMF tutorials I can think of when
defining your metamodel (the project that contains your genmodel), you
should have something resembling this :
"main" Eclipse, the first you launch :
com.xyz
|- src
| |- com
| |- xyz
| |- XYZPackage
| |- ...
|- model
|- xyz.ecore
|- xyz.genmodel
com.xyz.edit
|- ...
com.xyz.editor
|- ...
Then, in the "runtime" Eclipse, the one you launch from the "main", you
should have all of the projects that depend on the "xyz" model,
including your Acceleo project.
You shouldn't have _twice_ your metamodel project (containing your
"XYZPackage"), it should only exist in the "main" Eclipse workspace.
Laurent Goubet
Obeo
On 19/11/2010 19:44, glenviewjeff wrote:
> I found something that will likely indicate the problem, I just don't
> know how to fix it. I bet it stems from my ignorance of Eclipse/plugin
> development.
> In my project that contains the genmodel, I opened up the filesystem to
> look at the bin directory. I noticed that it contains a structure like
> this: bin\com\xyz\package123.
> However, the project in the child Eclipse that contains the installed
> model editor shows in its bin directory a different structure as I said
> in my previously posted message. (bin\package123)
>
> Also, I noticed that if I double click on one of the class files in the
> child Eclipse, Eclipse reports that it can't find the file.
> This is probably the wrong forum to be asking this question, but how
> does the plug-in dependency get updated in the Child Eclipse?
> Thanks for your help!
> Jeff
--------------030607070700010808010908
Content-Type: text/x-vcard; charset=utf-8;
name="laurent_goubet.vcf"
Content-Transfer-Encoding: base64
Content-Disposition: attachment;
filename="laurent_goubet.vcf"
YmVnaW46dmNhcmQNCmZuOkxhdXJlbnQgR291YmV0DQpuOkdvdWJldDtMYXVy ZW50DQpvcmc6
PGEgaHJlZj0iaHR0cDovL3d3dy5vYmVvLmZyIj5PYmVvPC9hPg0KZW1haWw7 aW50ZXJuZXQ6
bGF1cmVudC5nb3ViZXRAb2Jlby5mcg0KdXJsOmh0dHA6Ly93d3cub2Jlby5m cg0KdmVyc2lv
bjoyLjENCmVuZDp2Y2FyZA0KDQo=
--------------030607070700010808010908--
|
|
|
|
Powered by
FUDForum. Page generated in 0.04448 seconds