|Plug-in Profile URI_Mapping [message #1752602]
||Wed, 25 January 2017 15:00
| Daniel Clarke
Registered: March 2016
I've created a UML Profile in Papyrus. I then conveted this to an Eclipse Plugin Project. I've created a number of extensions below as specified in another thread: https://www.eclipse.org/forums/index.php/t/604098/
description="A test UML profile"
However, I am unsure what these values should be set to... Anyway, if I export this profile using "Deployable plug-ins and fragments" and install on the host Eclipse, when it restarts I can select the profile to apply to a model and all is good...
However, I have another project in which I am trying to interogate the UML model (which references the profile) in order to generate code. When I attempt to run this, I get the following error:
Exception in thread "main" org.eclipse.emf.ecore.resource.impl.ResourceSetImpl$1DiagnosticWrappedException: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http:///schemas/Test_Profile/_I0W14KAUEeaf1fcNl03atw/51' not found. (file:/D:/Test_Model, 261, 104)
So it appears it cannot load the profile for some reason. I presume it is because the URI mapping is not correct? I have tried many different things, but do not really understand how everything is tied together.
Any help is appreciated.
|Re: Plug-in Profile URI_Mapping [message #1781610 is a reply to message #1781566]
||Fri, 09 February 2018 12:11
| Michael Nestler
Registered: September 2014
ok. To describe my problem I have created a static UML plugin, containing 2 stereotypes MyStereotype1 and MyStereotype2 extending the <<Metaclass>> class.
This plugin is exported as a deployable plugin and copied to the eclipse plugins Directory.
The UML model MyProject.uml (in com.mycompany.myproject.model) uses this UML plugin via Apply Registered Profile. It contains
two classes Class1 and Class2, which are applying the both stereotype MyStereotype1 and MyStereotype2 from the profile.
With the Acceleo plugin com.mycompany.myproject.acceleo I want to generate to two files Class1 and Class2 with the class name and
the applied stereotypes.
Content of generate.mtl:
[comment encoding = UTF-8 /]
[module generate('http://www.mycompany.com/MyProject/1', 'http://www.eclipse.org/uml2/5.0.0/UML')]
[template public generateElement(aClass : Class)]
[file (aClass.name, false, 'UTF-8')]
class: [aClass.name/], applied stereotypes: [aClass.getAppliedStereotypes().name/]
My problem is, that the used stereotypes names are not reported.
I just get the class names.
the deployable UML profile plugin
-Papyrus profile project: com.mycompany.myproject.static.profile
-Papyrus model project: com.mycompany.myproject.model
-Acceleo project: com.mycompany.myproject.acceleo
I hope, it is possible the reproduce the problem.
Powered by FUDForum
. Page generated in 0.01735 seconds