Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » TMF (Xtext) » Multiline comments Xtext(Write custom multiline comments work only if commentary is closed)
icon9.gif  Multiline comments Xtext [message #1235507] Fri, 24 January 2014 14:40 Go to next message
raphael hounsell is currently offline raphael hounsellFriend
Messages: 2
Registered: January 2014
Junior Member
Hi, i'm new at Xtext and grammar writing stuff and i need to write a multiline comment. The Xtext rule stands for:
 ML_COMMENT: '/*' -> '*/';

But my ML_COMMENT must be:
ML_COMMENT: '(*' -> '*)';


The rule seems to be right. The expected behavior is when the first '(*' appears, all the next lines must change to comment color.
The actual behavior is when type '(' the editor automatically completes the parentesis, and if i type '(*' the lines doesn't show in comment color, only if i close the token.

Just like this:

(* this shows work perfectly *)

(* this not works          //must already be in commentary 


Thanks for any tips.
Re: Multiline comments Xtext [message #1235578 is a reply to message #1235507] Fri, 24 January 2014 18:05 Go to previous message
Christian Dietrich is currently offline Christian DietrichFriend
Messages: 14665
Registered: July 2009
Senior Member
Hi,

this is the very same how /* */ multi line comments behave. i dont think it is easy to detect this in semantic highlighting.
what you could do is to fix the AutoEditStrategyProvider. configureMultilineComments


Twitter : @chrdietrich
Blog : https://www.dietrich-it.de
Previous Topic:Customization of Scope error message
Next Topic:Manipulate getExportedObjects from third party DSL
Goto Forum:
  


Current Time: Sat Apr 20 01:47:03 GMT 2024

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

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

Back to the top