Eclipse Community Forums - RDF feed
https://www.eclipse.org/forums/
Eclipse Community Forums[Acceleo] The generation fail to generate any file because there are no model elements that matches
https://www.eclipse.org/forums/index.php/mv/msg/279865/784240/#msg_784240
I am an old user of Acceleo (v2.x). But I have a little experience of version 3.x using UML model as source.
I try to experiment Acceleo with another metamodel: without success.
The response of the generation process is:
"The generation fail to generate any file because there are no model elements that matches at least the type of the first parameter of one of your main templates.
The problem may be caused by a problem with the registration of your metamodel, please see the method named "registerPackages" in the Java launcher of your generator."
the source model is a XMI file with the metamodel 'www.eclipse.org/ocl/1.1.0/Ecore' resulting from the serialization of an OCL expression.
The Acceleo version used is 3.1.1.v20110914-0246
Eclipse version 3.7.1
What should I look to resolve this issue?
Best regards]]>D O2012-01-27T08:39:09-00:00Re: [Acceleo] The generation fail to generate any file because there are no model elements that matc
https://www.eclipse.org/forums/index.php/mv/msg/279865/787150/#msg_787150
These error message indicate that you tried to launch a generation on a model which does not contain any element that can be used as target of your main template. For example if you used Ecore as metamodel, and your main template looks like this :
Then you should have at least one "EClass" in the model you feed to Acceleo.
However, the "metamodel" you indicate here, "www.eclipse.org/ocl/1.1.0/Ecore" (which seems to be missing its leading "http" btw), is probably not what you should be using. What exactly are you trying to generate, with which metamodel?
Laurent Goubet
Obeo.]]>Laurent Goubet2012-01-31T08:12:16-00:00Re: [Acceleo] The generation fail to generate any file because there are no model elements that matc
https://www.eclipse.org/forums/index.php/mv/msg/279865/787361/#msg_787361
The input model is a XMI file with the metamodel 'www.eclipse.org/ocl/1.1.0/Ecore' resulting from the serialization of an OCL expression.
In attachments, you will find all the resources.
]]>D O2012-01-31T13:55:12-00:00Re: [Acceleo] The generation fail to generate any file because there are no model elements that matc
https://www.eclipse.org/forums/index.php/mv/msg/279865/787382/#msg_787382
You may need to be aware of https://bugs.eclipse.org/bugs/show_bug.cgi?id=345708 that prevents me as
an OCL developer using Acceleo when I have the ...ocl.ecore plugin open
in the workspace. The ...ocl.ecore plugin defines the
www.eclipse.org/ocl/1.1.0/Ecore model, so you may well have that plugin
open.
[If you are happy with experimental software, you might prefer to use
the prototype 'OCL 2.5' implementation in Pivot.ecore in the Examples
plugins. This is approximately UML aligned with modeled library
operations permitting all references to be persisted in XMI. Using
Pivot.ecore rather than Ecore.ecore avoids the Acceleo conflict between
www.eclipse.org/ocl/1.1.0/Ecore as a user and as built-in tool support.
You will Acceleo templates that generate Java code from OCL embedded in
Ecore models.]
Regards
Ed Willink
On 31/01/2012 13:55, D O wrote:
> Thank you for your response.
>
> The input model is a XMI file with the metamodel 'www.eclipse.org/ocl/1.1.0/Ecore' resulting from the serialization of an OCL expression.
>
> In attachments, you will find all the resources.
>]]>Ed Willink2012-01-31T14:11:09-00:00Re: [Acceleo] The generation fail to generate any file because there are no model elements that matc
https://www.eclipse.org/forums/index.php/mv/msg/279865/787432/#msg_787432
If so, you know how to use this version for creating an XMI file?
Best.
DO]]>D O2012-01-31T15:20:16-00:00Re: [Acceleo] The generation fail to generate any file because there are no model elements that matc
https://www.eclipse.org/forums/index.php/mv/msg/279865/787456/#msg_787456
You will broadly similar Java APIs in org.eclipse.ocl.examples.pivot to
org.eclipse.ocl.ecore.
Additionally there are Xtext editors and code generators.
You can find examples of most things in the
org.eclipse.ocl.examples.xtext.tests plugin.
Regards
Ed Willink
On 31/01/2012 15:20, D O wrote:
> Want to talk about what www.eclipse.org/ocl/3.1.0/Pivot metamodel
> (present in the org.eclise.ocl plugin version 3.1)?
>
> If so, you know how to use this version for creating an XMI file?
>
> Best.
>
> DO]]>Ed Willink2012-01-31T15:50:15-00:00Re: [Acceleo] The generation fail to generate any file because there are no model elements that matc
https://www.eclipse.org/forums/index.php/mv/msg/279865/788843/#msg_788843
I looked at the XText console example using the metamodel Pivot.
I changed my example to use the imports Pivot objects. But I have a problem to adapt the UML objects into Pivot objects.
Can you tell me how to make this adaptation as efficiently as possible?
Thanks in advance.
DO]]>D O2012-02-02T09:37:43-00:00Re: [Acceleo] The generation fail to generate any file because there are no model elements that matc
https://www.eclipse.org/forums/index.php/mv/msg/279865/788864/#msg_788864
Please continue this thread with a new title on the OCL newsgroup.
You should find that UML objects are automatically converted to Ecore
and then to Pivot by UML2Pivot, but since I have little idea what you're
doing I can't comment further.
Regards
Ed Willink
On 02/02/2012 09:37, D O wrote:
> Dear Ed,
>
> I looked at the XText console example using the metamodel Pivot.
>
> I changed my example to use the imports Pivot objects. But I have a
> problem to adapt the UML objects into Pivot objects.
>
> Can you tell me how to make this adaptation as efficiently as possible?
>
> Thanks in advance.
>
> DO]]>Ed Willink2012-02-02T09:55:47-00:00