Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » inconsistency of case sensitivity in xtext suffix(xtext is only sometimes sensitive to case of suffix)
inconsistency of case sensitivity in xtext suffix [message #1787405] Thu, 24 May 2018 20:47 Go to next message
Jay Norwood is currently offline Jay NorwoodFriend
Messages: 155
Registered: July 2009
Senior Member
I pulled down the tracing_codegen example from github and substituted 2.14 xtext on the oxygen DSL eclipse, on Windows 10.

Things were looking good.

I created a file with .MyDsl suffix and eclipse recognized it and converted my project to an xtext project.

I edited the model, using the example dsl code from github, and the editor accepted all that, and the outline view updated.

However, the .c and .h suffix files weren't generated, and no clue given why.

After debugging, I found that the code that does the generation was more picky about the suffix, and was accepting only "mydsl", all lower case, which is in fact the suffix in the genmodel file.

So, I don't know, but seems like it should consistently accept or reject if the case doesn't match.

I believe it came down to registry.getExtensionToFactoryMap.containsKey(name.substring(index+1)), which apparently doesn't ignore case (in the UriValidator isPossiblyManaged()

Re: inconsistency of case sensitivity in xtext suffix [message #1787406 is a reply to message #1787405] Thu, 24 May 2018 20:49 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
first thought:

mydsl != MyDsl

yes the editor works regardless the case but builders wont,
thats a well known ugly behaviour


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: inconsistency of case sensitivity in xtext suffix [message #1787407 is a reply to message #1787406] Thu, 24 May 2018 21:00 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
btw e.g. java/jdt behave the same

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Associating data with EMF model
Next Topic:interface default method: how to implement
Goto Forum:
  


Current Time: Fri Apr 26 16:00:54 GMT 2024

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

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

Back to the top