Skip to main content



      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 09:40 Go to next message
Eclipse UserFriend
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 13:05 Go to previous message
Eclipse UserFriend
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
Previous Topic:Customization of Scope error message
Next Topic:Manipulate getExportedObjects from third party DSL
Goto Forum:
  


Current Time: Tue Jul 08 08:42:11 EDT 2025

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

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

Back to the top