Caused by: org.eclipse.emf.ecore.xmi.PackageNotFoundException: Package with uri 'http://org/model/ros' not found. (file:/C:/Users/Jakub%20Kitaj/Downloads/ObeoDesigner-Community-8.1-win32.win32.x86/ObeoDesigner-Community/workspace/TestAcceleo/model/example.ros, 2, 120) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getPackageForURI(XMLHandler.java:2625) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.getFactoryForPrefix(XMLHandler.java:2458) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createObjectByType(XMLHandler.java:1335) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.createTopObject(XMLHandler.java:1504) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.processElement(XMLHandler.java:1026) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.processElement(XMIHandler.java:78) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:1008) at org.eclipse.emf.ecore.xmi.impl.XMLHandler.startElement(XMLHandler.java:719) at org.eclipse.emf.ecore.xmi.impl.XMIHandler.startElement(XMIHandler.java:190) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.dtd.XMLDTDValidator.startElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanStartElement(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$ContentDriver.scanRootElementHook(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl$FragmentContentDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl$PrologDriver.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentScannerImpl.next(Unknown Source) at com.sun.org.apache.xerces.internal.impl.XMLDocumentFragmentScannerImpl.scanDocument(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source) at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl.parse(Unknown Source) at org.eclipse.emf.ecore.xmi.impl.XMLLoadImpl.load(XMLLoadImpl.java:175) at org.eclipse.emf.ecore.xmi.impl.XMLResourceImpl.doLoad(XMLResourceImpl.java:261) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1518) at org.eclipse.emf.ecore.resource.impl.ResourceImpl.load(ResourceImpl.java:1297) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoad(ResourceSetImpl.java:259) at org.eclipse.emf.ecore.resource.impl.ResourceSetImpl.demandLoadHelper(ResourceSetImpl.java:274) ... 6 more
* @generated [b]NOT[/b] */ @Override public void registerPackages(ResourceSet resourceSet) { super.registerPackages(resourceSet); --> register here your package/model.
@Override public void registerPackages(ResourceSet resourceSet) { super.registerPackages(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. */ /* * If you need additional package registrations, you can register them here. The following line * (in comment) is an example of the package registration for UML. * * You can use the method "isInWorkspace(Class c)" to check if the package that you are about to * register is in the workspace. * * To register a package properly, please follow the following conventions: * * If the package is located in another plug-in, already installed in Eclipse. The following content should * have been generated at the beginning of this method. Do not register the package using this mechanism if * the metamodel is located in the workspace. * * if (!isInWorkspace(UMLPackage.class)) { * // The normal package registration if your metamodel is in a plugin. * resourceSet.getPackageRegistry().put(UMLPackage.eNS_URI, UMLPackage.eINSTANCE); * } * * If the package is located in another project in your workspace, the plugin containing the package has not * been register by EMF and Acceleo should register it automatically. If you want to use the generator in * stand alone, the regular registration (seen a couple lines before) is needed. * * To learn more about Package Registration, have a look at the Acceleo documentation (Help -> Help Contents). */ }
resourceSet.getPackageRegistry().put("/ROS-metamodel/model/ros.ecore", Package.class);
resourceSet.getPackageRegistry().put("http://org/model/ros", Package.class);
resourceSet.getPackageRegistry().put("http://org/model/ros", RosPackage.eINSTANCE);