|
Re: XMI from java discoverer [message #855790 is a reply to message #855748] |
Wed, 25 April 2012 05:18 |
Ed Merks Messages: 33145 Registered: July 2009 |
Senior Member |
|
|
Juan,
Using XyzPackage.eINSTANCE.eClass() is an idiom for initializing the
package instance, and as a side-effect it will register itself in the
EPackage.Registry.INSTANCE, or you can use
resourceSet.getPackageRegistry().put(XyzPackage.eNS_URI,
XyzPackage.eINSTANCE). Note that Xyz is the name of the package.
On 25/04/2012 6:21 AM, Juan Castel wrote:
> Hi.
>
> I have the XMI model result of MoDisco java discoverer, but I cannot
> load it and navigate nor use it in ATL, since it simply does not work.
> When you choose that XMI from an ATL configuration as MM:IN, the
> content assist (ctrl+spacebar) in Eclipse ATL doesn't give me any
> element of the XMI model.
>
> How can I register the java metamodel of MoDisco and then do something
> like:
>
> ResourceSet resourceSet = new ResourceSetImpl();
> resourceSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION,
>
> URI uri = URI.createFileURI(file.getAbsolutePath());//MoDisco XMI
> absolute path
> Resource resource =
> resourceSet.getResource(uri,true); new
> XMIResourceFactoryImpl());
>
>
> Thank you.
Ed Merks
Professional Support: https://www.macromodeling.com/
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.03566 seconds