Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Case Insensitivity for the 5 min Tutorial
Case Insensitivity for the 5 min Tutorial [message #890181] Thu, 21 June 2012 11:44 Go to next message
Prajeet Missing name is currently offline Prajeet Missing nameFriend
Messages: 14
Registered: November 2010
Location: B'Lore
Junior Member
My aim is to create a case insensitive syntax highlighting for the 5 min tutorial.

I did the following changes to the "GenerateMyDsl.mwe2" file
they are:

 fragment = parser.antlr.XtextAntlrGeneratorFragment {
              options = {
            //      backtrack = true
            		ignoreCase=true
              }
            }

fragment = scoping.ImportNamespacesScopingFragment {ignoreCase=true}

fragment = parser.antlr.XtextAntlrUiGeneratorFragment {
            	options = {
            		ignoreCase=true
            		//backtrack = true
            	}
            }


Still the editor does not recognize
hello ID!

Can anyone tell me what's wrong?


In order to gain something, something of equal value must be sacrificed.
Re: Case Insensitivity for the 5 min Tutorial [message #890244 is a reply to message #890181] Thu, 21 June 2012 15:14 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
Which Xtext version do you use?

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Case Insensitivity for the 5 min Tutorial [message #890268 is a reply to message #890244] Thu, 21 June 2012 17:15 Go to previous messageGo to next message
Prajeet Missing name is currently offline Prajeet Missing nameFriend
Messages: 14
Registered: November 2010
Location: B'Lore
Junior Member
Christian Dietrich wrote on Thu, 21 June 2012 20:44
Which Xtext version do you use?


I am using the eclipse Xtext/Xtend 2.2.1 Distribution(indigo)(windows 64 bit version) downloaded from the xtext.itemis download page [cannot post links yet Sad ]

If anyone has accomplished this, then please do help me out.


In order to gain something, something of equal value must be sacrificed.
Re: Case Insensitivity for the 5 min Tutorial [message #890269 is a reply to message #890268] Thu, 21 June 2012 17:25 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
Hi,

there are errors in the workflow (when running it). at least if i try it. it tells me to use

            fragment = org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment {
              options = {
                  ignoreCase = true
              }
            }
      fragment = org.eclipse.xtext.generator.parser.antlr.ex.ca.ContentAssistParserGeneratorFragment{
            	options = {
            		ignoreCase = true
            	}
            }



Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Case Insensitivity for the 5 min Tutorial [message #890272 is a reply to message #890269] Thu, 21 June 2012 17:43 Go to previous messageGo to next message
Prajeet Missing name is currently offline Prajeet Missing nameFriend
Messages: 14
Registered: November 2010
Location: B'Lore
Junior Member
Christian Dietrich wrote on Thu, 21 June 2012 22:55
Hi,

there are errors in the workflow (when running it). at least if i try it. it tells me to use

            fragment = org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment {
              options = {
                  ignoreCase = true
              }
            }
      fragment = org.eclipse.xtext.generator.parser.antlr.ex.ca.ContentAssistParserGeneratorFragment{
            	options = {
            		ignoreCase = true
            	}
            }


Are you able to achieve the case insensitivity? And which version of Xtext and eclipse are you using ?


In order to gain something, something of equal value must be sacrificed.
Re: Case Insensitivity for the 5 min Tutorial [message #890273 is a reply to message #890272] Thu, 21 June 2012 17:46 Go to previous messageGo to next message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14669
Registered: July 2009
Senior Member
As i said: using the itemis Xtext disto (on mac) and exchanging the std antlr fragments with the ones i posted above. running the workflow works and the editor is case insensitive as expected.

Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Re: Case Insensitivity for the 5 min Tutorial [message #890275 is a reply to message #890272] Thu, 21 June 2012 17:49 Go to previous messageGo to next message
Prajeet Missing name is currently offline Prajeet Missing nameFriend
Messages: 14
Registered: November 2010
Location: B'Lore
Junior Member
I got it!!!

THANK YOU SO MUCH!!!

This is such a huge help!!! Thank you thank you Smile))))


In order to gain something, something of equal value must be sacrificed.
Re: Case Insensitivity for the 5 min Tutorial [message #1081024 is a reply to message #890181] Tue, 06 August 2013 17:54 Go to previous message
Ray Wu is currently offline Ray WuFriend
Messages: 4
Registered: August 2013
Junior Member
Hi, I am using xtext 2.4.

I replace

/ The antlr parser generator fragment.
fragment = parser.antlr.XtextAntlrGeneratorFragment auto-inject {
options = {
backtrack = true
}
}

to

fragment = org.eclipse.xtext.generator.parser.antlr.ex.rt.AntlrGeneratorFragment auto-inject{
options = {
ignoreCase = true
}
}

and

fragment = parser.antlr.XtextAntlrUiGeneratorFragment auto-inject {}

to

fragment = org.eclipse.xtext.generator.parser.antlr.ex.ca.ContentAssistParserGeneratorFragment auto-inject{
options = {
ignoreCase = true
}
}

, not only doesn't work but it also break my UI editor.
The error red cross becomes un-clickable.

Any help?
Previous Topic:Another scoping Problem
Next Topic:How to set multiple properties of a java annotation
Goto Forum:
  


Current Time: Sat Apr 27 03:59:34 GMT 2024

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

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

Back to the top