XText issue with LiteralValueUse value
I have defined a TDL model programmatically (i.e., a Resource) and I want to save it as a .tdlan2 file. As in the current version of TDL metamodel, the value of the value
feature of LiteralValueUse instances is no longer set between quotation marks, when I save the Resource, all LiteralValueUse instances are saved as DataInstanceUse.
For example, consider the following TDL model:
Package TestSuite { Type String; Type A (_name of type String); A a (_name = "2"); }
If I save this model as a .tdlan2 file, the result would be:
Package TestSuite { Type String; Type A (_name of type String); A a (_name = 2); }
Here is my code for saving the file:
ResourceSet resSet = new ResourceSetImpl();
resSet.getResourceFactoryRegistry().getExtensionToFactoryMap().put(".tdlan2", new tdlResourceFactoryImpl());
resSet.getPackageRegistry().put(tdlPackage.eNS_URI, tdlPackage.eINSTANCE);
Resource res = resSet.createResource(URI.createURI("path.tdlan2"));
try {
newTestSuiteRes.save(null);
} catch (IOException e) {
e.printStackTrace();
}