Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » Ecore Tools » Resource creation ignores an attribute while saving to output file!
Resource creation ignores an attribute while saving to output file! [message #1256724] Tue, 25 February 2014 18:36
Parsa Pourali is currently offline Parsa Pourali
Messages: 1
Registered: February 2014
Junior Member
Hi,
I'm new to the forum, I hope here is the right place to bring this topic !

I am working with ecore models, I set the attributes value for one of the models, everything is fine, but one attribute will not appear in the output file:

as it can be seen in the code below, I set 4 of the attributes hard coded before saving the output file, 3 of them work grete, but the one which is the first one does not appear in the output ! the funny thing is that if I change its type to string it works !

the thing is that it was working fine, unless I have added other attributes in its sibling models (that have nothing to do with this one) !


here is the code:

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

uiRoot.getMagicUiAdminDomainSgTemplates().get(0).setMagicUiSgTempRedundancyModel(SaAmfRedundancyModelT.SA_AMF_2N_REDUNDANCY_MODEL); // This one has problem

uiRoot.getMagicUiAdminDomainSgTemplates().get(0).setMagicUiSgTempNumberofActiveSus(10);
uiRoot.getMagicUiAdminDomainSgTemplates().get(0).setMagicUiSgTempNumberofSpareSus(1);
uiRoot.getMagicUiAdminDomainSgTemplates().get(0).setMagicUiSgTempNumberofStdbSus(5);

res.getContents().add(uiRoot);
try {
res.save(Collections.EMPTY_MAP);
} catch (Exception e) {
JOptionPane.showMessageDialog(null, "Error occured in saving the user input \n(Utility.Loader.saveUserInput error)","Saving Error", JOptionPane.ERROR_MESSAGE);
e.printStackTrace();
}


Thanks,
Parsa
Previous Topic:[teneo]recover bad connections
Next Topic:Fragment and partially load EMF models in xmi format
Goto Forum:
  


Current Time: Sun Oct 26 00:33:07 GMT 2014

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

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