Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » QNames with dots in segments
QNames with dots in segments [message #1015992] Mon, 04 March 2013 14:17 Go to next message
Jérôme Fouletier is currently offline Jérôme FouletierFriend
Messages: 33
Registered: September 2010
Location: France
Member
Our language uses some references found in a custom EMF resource (i.e. not managed by XText), and the names of some of these references may contain dots. They are exported as single-segment QNames by the customized IResourceDescription.
These specific references only occur at a given point in the grammar, however, I cannot use this fact in a custom IQualifiedNameConverter since this class is not sensitive to grammar context. This means the strings entered in the DSL text will be split when searching the object descriptions provided by the global scope, and the scope search will fail.

Should I implement some form of escaping of the dot character in both the custom resource description and the qualified name provider of the grammar? I'm not sure of the latter, since the DSL has no grammar rule to define the objects I'm trying to import.

Any advice would be great.
Re: QNames with dots in segments [message #1016069 is a reply to message #1015992] Mon, 04 March 2013 19:44 Go to previous messageGo to next message
Christian Dietrich is currently online Christian DietrichFriend
Messages: 6499
Registered: July 2009
Senior Member
Hi,

do you care about the segments in the names. if not what about customizing the ResourceServiceProvider for your emf resource
(bind custom IDefaultResourceDescriptionStrategy in your AbstractGenericResourceRuntimeModule subclass)
Re: QNames with dots in segments [message #1016219 is a reply to message #1016069] Tue, 05 March 2013 14:36 Go to previous message
Jérôme Fouletier is currently offline Jérôme FouletierFriend
Messages: 33
Registered: September 2010
Location: France
Member
Thanks, it works if I split the names containing dots in the custom emf resource description, and it's not a problem to have them in several segments (although it makes no semantic sense, it's not visible anyway)
Previous Topic:Bug with EcoreGeneratorFragment in xtext 2.4M5?
Next Topic:Content assist strangely behaving in relation to scoping
Goto Forum:
  


Current Time: Thu Nov 27 10:00:53 GMT 2014

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

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