EcoreUtil.delete giving UnsupportedOperationException [message #1815523] |
Fri, 04 October 2019 05:48 |
Prajna VG Messages: 54 Registered: July 2018 |
Member |
|
|
Hi all,
I am getting following exception while deleting an object using
EcoreUtil.delete(eObject, true);
java.lang.UnsupportedOperationException
at org.eclipse.emf.common.util.BasicEList$UnmodifiableEList.remove(BasicEList.java:948)
at org.eclipse.emf.ecore.util.EcoreUtil.remove(EcoreUtil.java:3220)
at org.eclipse.emf.ecore.util.EcoreUtil.delete(EcoreUtil.java:3449)
Anyone knows the cause/solution for this exception? Any other way is there to delete an EObject programmatically?
[Updated on: Fri, 04 October 2019 05:51] Report message to a moderator
|
|
|
|
Re: EcoreUtil.delete giving UnsupportedOperationException [message #1815529 is a reply to message #1815526] |
Fri, 04 October 2019 09:19 |
Prajna VG Messages: 54 Registered: July 2018 |
Member |
|
|
Hi Ed Willink,
Thanks for replying.
Yes exactly in that code you mentioned, I am getting that exception. But if I use EcoreUtil.remove(eObject); the exception will not occur.
But I am not sure I can use remove method instead of delete. Because delete method has parameter - recursive whether references to contained children should also be removed. I am not able to understand the exact difference between delete and remove!!
Regards,
Prajna
[Updated on: Fri, 04 October 2019 09:20] Report message to a moderator
|
|
|
|
Powered by
FUDForum. Page generated in 0.04446 seconds