Skip to main content



      Home
Home » Modeling » M2T (model-to-text transformation) » Acceleo 3.x - differences between ant task launcher and acceleo launcher
Acceleo 3.x - differences between ant task launcher and acceleo launcher [message #643522] Tue, 07 December 2010 04:18 Go to next message
Eclipse UserFriend
Hi,

there are some differences between ant task launcher and acceleo launcher.

Extract from template

[file ('webapp/'+state.qualifiedName.packagePathWithoutClassAndMod elName().concat(state.name).concat('.jsp'), false))]

After running these template with acceleo lauchner from eclipse, directorys with files have been created but if i run these template from ant task nothing will be generated.

Another template works fine with ant task and acceleo launcher

file ('java/'+stateMachine.qualifiedName.packagePathWithoutClassA ndModelName().concat(stateMachine.getUseCaseName()).concat(' Form.java'), false)]

Could you help me with these problem?

Best regards
Maik
Re: Acceleo 3.x - differences between ant task launcher and acceleo launcher [message #643539 is a reply to message #643522] Tue, 07 December 2010 05:25 Go to previous messageGo to next message
Eclipse UserFriend
I found something in generation of my propertys. Running in eclipse as acceleo launcher works fine but if i run these as ant task i get the following for the type of property

org.eclipse.uml2.uml.internal.impl.PrimitiveTypeImpl@569c60 (eProxyURI: pathmap://UML_LIBRARIES/UMLPrimitiveTypes.library.uml#Boolea n)

Need i register UML profile? I also created my own profile. In method registerResourceFactories i added the following lines

resourceSet.getResourceFactoryRegistry().getExtensionToFacto ryMap()
.put(UMLResource.FILE_EXTENSION, UMLResource.Factory.INSTANCE);
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put(
"uml", UMLResource.Factory.INSTANCE);

Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "ecore", new EcoreResourceFactoryImpl());
Resource.Factory.Registry.INSTANCE.getExtensionToFactoryMap( ).put( "emtl", new EMtlResourceFactoryImpl());

Map<URI, URI> uriMap = resourceSet.getURIConverter().getURIMap();
URI uri = URI.createURI(" jar:file:/C:/eclipse/plugins/org.eclipse.uml2.uml_3.1.1.v200 606221411.jar!/ ");
uriMap.put(URI.createURI(UMLResource.LIBRARIES_PATHMAP), uri.appendSegment("libraries").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.METAMODELS_PATHMAP), uri.appendSegment("metamodels").appendSegment(""));
uriMap.put(URI.createURI(UMLResource.UML_PRIMITIVE_TYPES_LIB RARY_URI), uri.appendSegment("profiles").appendSegment(""));

But i get the same for the property. Exists another way for registering packages?

Best regards
Maik
Re: Acceleo 3.x - differences between ant task launcher and acceleo launcher [message #643557 is a reply to message #643522] Tue, 07 December 2010 07:27 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

To handle UML profile, you should consult the MDT/UML FAQ : http://wiki.eclipse.org/index.php/MDT-UML2-FAQ#What.27s_requ ired_to_load_a_UML_.28.uml.29_resource_from_a_standalone_app lication.3F
If you still have some problem, you should ask the question on the MDT/UML forum.

Stephane Begaudeau, Obeo
Re: Acceleo 3.x - differences between ant task launcher and acceleo launcher [message #643559 is a reply to message #643522] Tue, 07 December 2010 07:30 Go to previous messageGo to next message
Eclipse UserFriend
Hi,

If nothing is generated from the ant taks, you should use some breakpoint to check if your model is loaded correctly. Because the ant task will use the stand alone mode, it can create some problem if your model requires some specific loading (like UML profiles).

Stephane Begaudeau, Obeo
Re: Acceleo 3.x - differences between ant task launcher and acceleo launcher [message #644042 is a reply to message #643559] Thu, 09 December 2010 03:52 Go to previous messageGo to next message
Eclipse UserFriend
Ok i solved the problem.

Thanks
Maik
Re: Acceleo 3.x - differences between ant task launcher and acceleo launcher [message #673148 is a reply to message #644042] Sun, 22 May 2011 10:38 Go to previous message
Eclipse UserFriend
Maik,

Please share how you solved this problem...

Thanks
Anil
Previous Topic:OWL
Next Topic:[Acceleo] Can Acceleo do something like JET's c:dump
Goto Forum:
  


Current Time: Fri Jul 18 04:09:21 EDT 2025

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

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

Back to the top