How to programmtically add EObject into Resource [message #1830726] |
Sat, 01 August 2020 11:25  |
Eclipse User |
|
|
|
Hi,
Sometimes the datamodel is incomplete, and I want to programmtically generate a default EObject and add it into Resource.
I know emf provide a Ecore Factory to new a EObject. I did and add that into resource.resourSet.
But, XText seems packaged more things into resource, when I'm trying to follow "The index and the containers", like:
def getVisibleContainers(EObject o) { val index = rdp.getResourceDescriptions(o.eResource) val rd = index.getResourceDescription(o.eResource.URI) cm.getVisibleContainers(rd, index) }...
to get the Visible Eobjects of the resource, none of the generated EObject was returned.
what should I do?
|
|
|
|
|
|
|
|
|
|
Powered by
FUDForum. Page generated in 0.05592 seconds