I wan to scope by reference to existing in-memory ecore objects from xText DSL editor. I intend to do this by subtyping/mapping the types defined in the ecore model from the types defined in my xText DSL at runtime.
Essentially, I want to achieve a content-assist with elements from the in-memory ecore objects, which are not created using my xText DSL. How can I achieve such functionalities in Xtext. Thank you for your help.
Jan Koehnlein Messages: 757 Registered: July 2009 Location: Hamburg
Depends on the lifecycle of the ecore objects. If these models are alive (changing) maybe this blogpost can help: http://typefox.io/linking-xtext-models-with-other-emf-models
If the are fixed at runtime, you could just add them in the scopes your scope provider produces. Maybe even the global scope provider.
Get professional support from the Xtext committers at www.typefox.io