This page is no longer maintained — Please continue to the home page at www.scala-lang.org

Scala plug-in for Intellij, XML, and syntax highlighting

1 reply
Anthony B. Coates
Joined: 2009-09-12,
User offline. Last seen 2 years 35 weeks ago.

Hi. I'm using the latest Scala plugin for Intellij 8.1.3. Is there a
known problem with syntax highlighting in code that has inline XML? I
find that if I have inline XML, red error underlines appears in much of
the rest of the code following it. In many cases, I have found that I can
work around it by putting a /* */ comment on the line after the end of the
XML. Is this a known issue, or something I should provide more details
for. What is the best way to report such things - via this list? Thanks
a lot in advance,

Cheers, Tony.

Ilya Sergey
Joined: 2009-02-02,
User offline. Last seen 42 years 45 weeks ago.
Re: Scala plug-in for Intellij, XML, and syntax highlighting
Hello, Tony.

Sorry for the late answer. Yes, XML highlighting in a presence of comments is a bug pin and issue you've mentioned is a known one. Let me describe briefly how things work in Scala plugin for IDEA. In fact, we have three lexer - the first on strips comments, the second one recognizes XML by maintaining an appropriate stack and the last one fetches Scala tokens themselves.
In the way these lexers are implemented now there might be some problems when comments and XML tags stay close. In near-term future we're going to change this design which will allow to avoid such a nasty errors.
Sorry for the inconvenience.

With best regards,
Ilya Sergey

2009/9/12 Anthony B. Coates (Londata) <abcoates@londata.com>
Hi.  I'm using the latest Scala plugin for Intellij 8.1.3.  Is there a known problem with syntax highlighting in code that has inline XML?  I find that if I have inline XML, red error underlines appears in much of the rest of the code following it.  In many cases, I have found that I can work around it by putting a /* */ comment on the line after the end of the XML.  Is this a known issue, or something I should provide more details for.  What is the best way to report such things - via this list?  Thanks a lot in advance,

Cheers, Tony.

Copyright © 2012 École Polytechnique Fédérale de Lausanne (EPFL), Lausanne, Switzerland