Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    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 09:18 Go to next message
dieppi is currently offline dieppi
Messages: 27
Registered: November 2010
Junior Member
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 10:25 Go to previous messageGo to next message
dieppi is currently offline dieppi
Messages: 27
Registered: November 2010
Junior Member
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 12:27 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane Begaudeau
Messages: 413
Registered: April 2010
Location: Nantes (France)
Senior Member

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 12:30 Go to previous messageGo to next message
Stephane Begaudeau is currently offline Stephane Begaudeau
Messages: 413
Registered: April 2010
Location: Nantes (France)
Senior Member

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 08:52 Go to previous messageGo to next message
dieppi is currently offline dieppi
Messages: 27
Registered: November 2010
Junior Member
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 14:38 Go to previous message
Anil Bhatia is currently offline Anil Bhatia
Messages: 23
Registered: February 2011
Junior Member
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 Oct 31 20:14:27 GMT 2014

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

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