The DSL I'm working on has some rudimentary object oriented features. One creates an object with a special method as follows:
load(name,"object\myobject.obj") //construct object
name.someMethod()//call a metho
where name is the object name and the second argument points to the object implementation.
In the scope provider I try to load the implementation file as follows:
def scopeObjectMethod(ObjectMethod method) {
.....
val uri = reslover.doResolve(method.eResource, path) //URI is correct
val rs = method.eResource.resourceSet //Same resource set as the object method
try {
rs.getResource(uri, true)
} catch (Exception ex) {
println('Error:' + ex.message) //produces Error:org.xml.sax.SAXParseException
}
ResourceSet expects an XMI file, when in fact is a file in the same DSL. This is strange since the .obj' extension is registered to my DSL.
How can I instruct ResourceSet to expect a file of my DSL instead of XMI?
Regards