Skip to main content



      Home
Home » Modeling » TMF (Xtext) » QNames with dots in segments
QNames with dots in segments [message #1015992] Mon, 04 March 2013 09:17 Go to next message
Eclipse UserFriend
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 14:44 Go to previous messageGo to next message
Eclipse UserFriend
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 09:36 Go to previous message
Eclipse UserFriend
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 Jul 03 21:43:45 EDT 2025

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

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

Back to the top