The approach I took to resolve ST6RI-594 is using a dummy resource as a context to get the global scope. A dummy resource is created with a bogus URI (new ResourceImpl(URI.createURI("dummy"))) to prevent local file lookups. SysMLInteractive.resolve() uses it for scopeProvider.getScope() to avoid exclusions from the local context.
I made a change how to create a Xtext resource by injecting xtextResourceFactory (createNonPersistentXtextResource). The previous code relies on suffix matching and might make a problem in resource creations.
Also I created a getter for resouceSet, getResourceSet() in SysMLUtil. So I made resourceSet private and I needed to modify KerML2XMI.createOutputResources().
I also made SysMLUtil.addResourceToIndex() public for other programs to put resources into the index.
The approach I took to resolve ST6RI-594 is using a dummy resource as a context to get the global scope. A dummy resource is created with a bogus URI (
new ResourceImpl(URI.createURI("dummy"))
) to prevent local file lookups. SysMLInteractive.resolve() uses it for scopeProvider.getScope() to avoid exclusions from the local context.I made a change how to create a Xtext resource by injecting xtextResourceFactory (createNonPersistentXtextResource). The previous code relies on suffix matching and might make a problem in resource creations.
Also I created a getter for resouceSet, getResourceSet() in SysMLUtil. So I made resourceSet private and I needed to modify KerML2XMI.createOutputResources().
I also made SysMLUtil.addResourceToIndex() public for other programs to put resources into the index.