Skip to content
Discussion options

You must be logged in to vote

Hi,
I'm coming back to this post to report that after doing some research I understood that there is no easy way to duplicate the node model associated with a Resource/EObject. For reference, see https://www.eclipse.org/forums/index.php/t/489882/ and https://www.eclipse.org/forums/index.php/t/1095332/
The standard approach to overcome this limitation is to create a new Resource and reparse the content of the Resource to be cloned into it. This means that one has to work at the level of the Resources and not of the single EObjects. For example, this is what I am doing in my project:

		final ResourceSet newResourceSet = new XtextResourceSet();
		resourceSet.getResources().forEach(originalRe…

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by tfonda-fbk
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
1 participant