Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » Deserialize an Ecore File
Deserialize an Ecore File [message #1423306] Sun, 14 September 2014 07:21 Go to next message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
I am trying to deserialize an ecore file. But the code given below does not do anything. I do not get any exceptions. The file is not created in the specified location at all.

Any guess? What am I doing wrong here?

File file=new File("d:\\","newFile.ecore");

URI fileURI = URI.createFileURI(file.getAbsolutePath());
ResourceSet resourceSet = new ResourceSetImpl();
Resource resource = resourceSet.createResource(fileURI);

try {
resource.load(inputStream,null);
} catch (IOException e) {
e.printStackTrace();
}
Re: Deserialize an Ecore File [message #1423307 is a reply to message #1423306] Sun, 14 September 2014 07:23 Go to previous message
UmaShankar Subramani is currently offline UmaShankar SubramaniFriend
Messages: 194
Registered: December 2011
Location: SWEDEN
Senior Member
It works now. resource save statement was missing.

resource.save(null);

Previous Topic:Metameta modeling with EMF?
Next Topic:Using CDORemoteSessionManager
Goto Forum:
  


Current Time: Mon Aug 26 00:56:06 GMT 2019

Powered by FUDForum. Page generated in 0.02406 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top