Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » embedded xtext DSL - exporting names
embedded xtext DSL - exporting names [message #1235902] Sat, 25 January 2014 16:36 Go to next message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member

Hello,

My use case refers to an xtext grammar that is bound to a *part* of a domain model.
The model would be stored in a .mydsl file, with XMI serialization, where the xtext parts would be serialized as string values of attributes of instances of classes from the non-xtext part.

I have followed other threads on this topic, as well as the example:

https://code.google.com/a/eclipselabs.org/p/xtext-forms-integration/

The goal is to process the embedded text during xtext build, so that exported names from the embedded resources are made visible in the global index.

The problem is that the embedded resource has an URI which is generated programatically from the host (workspace) resource URI, while the Xtext builder seems to index only resources that it finds in the workspace.

The example does not help here, because the embedded DSLs do not export names, and no cross-references between distinct embedded resource instances are done.


Is there a way to programatically add some URIs to include in the indexing by the Xtext Builder ?


Best regards
Vlad Gheorghe



Re: embedded xtext DSL - exporting names [message #1239706 is a reply to message #1235902] Tue, 04 February 2014 21:05 Go to previous message
Vlad Gheorghe is currently offline Vlad GheorgheFriend
Messages: 127
Registered: May 2011
Senior Member
Just to report some progress on the xtext-embedded-in-xmi.

We have found some sort of work-around for this problem.

Instead of having the "embedded" part serialized as text in EString attributes of the "host" resource (serialized as xml/xmi), one can serialize those as proper workspace resources, and have a cross-document containment reference from the model serialized as xmi to the model serialized as xtext.
The big advantage is that it works almost out-of-the-box with the generated EMF model editor (for the full model) and XText editors (for the text part).
One has just to implement the global scoping for the text sub-resources, which has to
navigate by some URI convention to the 'host' resource. (e.g. to figure out which are the imported 'modules' ).


Does anyone have other ideas ?

Did I get it right that the xtext-forms-integration does not show linking from embedded resources to other embedded resources ?
(Or is that even a non-sense in the context of that example ?)


Cheers
Vlad Gheorghe

[Updated on: Tue, 04 February 2014 21:09]

Report message to a moderator

Previous Topic:Creating Xtext release locally
Next Topic:Example of the power of Xtext and Xbase
Goto Forum:
  


Current Time: Thu Jul 09 09:49:11 GMT 2020

Powered by FUDForum. Page generated in 0.01664 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top