|
|
|
|
Re: how to add resources to a resource set [message #1799465 is a reply to message #1799414] |
Fri, 07 December 2018 09:46 |
Sharmila D Messages: 81 Registered: June 2018 |
Member |
|
|
HI
Ed Merks
Thanks for the reply
As you said I am getting the existing resource but I was not able to add resources to existing resource set.
Please find the below code
Session local_createdSession = SessionManager.INSTANCE.
getExistingSession(sessionResourceURI);
TransactionalEditingDomain local_domain = local_createdSession.
getTransactionalEditingDomain();
Resource Res= local_domain.getResourceSet().getResource(local_createPlatformResourceURI, true);
EObject local_rootObject1 = EcoreResourceUtil.getModelRoot(Res);
local_domain .getCommandStack().
execute(new RecordingCommand(local_domain ) {
@Override
protected void doExecute() {
Res.getContents.add(global_arEobject)
Res.save
}
});
when I try to add contents to existing rootobject it is throwing me error.
How to add resource contents to model.
am I doing correct ?
Please help me
[Updated on: Fri, 07 December 2018 09:48] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.03625 seconds