According to the ATL/EMFTVM wiki, ATL/EMFTVM
can be run standalone by using
ResourceSet moduleRS = new ResourceSetImpl();
moduleRS.getResourceFactoryRegistry().getExtensionToFactoryMap().put(Resource.Factory.Registry.DEFAULT_EXTENSION, new XMIResourceFactoryImpl());
DefaultModuleResolver mr = new DefaultModuleResolver("pathToModuleDirectory", moduleRS);
TimingData td = new TimingData();
env.loadModule(mr, "ModuleName");
td.finishLoading();
env.run(td);
td.finish();
However, this always yields an exception saying Module not found
. I debugged the code into great detail. Internally, a SaxParseException
is thrown, which is weird since my .emftvm file is not a XML file. Any ideas how I can load the file properly? Thanks in advance!
I got the old version of EMFTVM, and have the same problem as you. I pull the latest version from github, and it is fine now.
Updates: @dwagelaar, aha, yes, I used EMFTVMResourceFactoryImpl; Here is the code I used btw:
Also, instead of passing a new ResourceSetImpl(as indicated in Wiki),
I passed in the rs object initialized above.