|
Re: p.type.name is not transforming in the code [message #1808291 is a reply to message #1808262] |
Fri, 21 June 2019 07:12   |
Eclipse User |
|
|
|
HI
You omit all the relevant parts of your repro but it looks like a FAQ.
Shortly after your empty string is a proxy URI that reveals that you are using UML and that like many others you have neglected to read the instructions in the generated Java that tell you how to initialize usage of the UML metamodel.
Regards
Ed Willink
|
|
|
|
Re: p.type.name is not transforming in the code [message #1808355 is a reply to message #1808320] |
Fri, 21 June 2019 20:49   |
Eclipse User |
|
|
|
Hi
Yes and there is a TODO that you have ignored:
/**
* This can be used to update the resource set's resource factory registry with all needed factories.
*
* @param resourceSet
* The resource set which registry has to be updated.
* @generated
*/
@Override
public void registerResourceFactories(ResourceSet resourceSet) {
super.registerResourceFactories(resourceSet);
/*
* If you want to change the content of this method, do NOT forget to change the "@generated"
* tag in the Javadoc of this method to "@generated NOT". Without this new tag, any compilation
* of the Acceleo module with the main template that has caused the creation of this class will
* revert your modifications.
*/
/*
* TODO If you need additional resource factories registrations, you can register them here. the following line
* (in comment) is an example of the resource factory registration.
*
* If you want to use the generator in stand alone, the resource factory registration will be required.
*
* To learn more about the registration of Resource Factories, have a look at the Acceleo documentation (Help -> Help Contents).
*/
// resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(XyzResource.FILE_EXTENSION, XyzResource.Factory.INSTANCE);
/*
* Some metamodels require a very complex setup for standalone usage. For example, if you want to use a generator
* targetting UML models in standalone, you NEED to use the following:
*/
// UMLResourcesUtil.init(resourceSet)
}
Regards
Ed Willink
|
|
|
|
Re: p.type.name is not transforming in the code [message #1808366 is a reply to message #1808362] |
Sat, 22 June 2019 04:53   |
Eclipse User |
|
|
|
Hi Ed Willink,
Thanks so much for your help. I resolved the problem by the following two steps
1) In Generate.java file i removed comment from statment "UMLResourcesUtil.init(resourceSet);"
2) In MANIFEST.MF file i added statemtent " org.eclipse.uml2.uml.resources, "
Than so much for guiding me very well... I appreciate your help.
Cab you please send me some good links of best tutorials of acceleo .
Regards
Mohammad Inayatuallah
|
|
|
|
Powered by
FUDForum. Page generated in 0.05484 seconds