For the love of humanity, syntax highlighting

167 views
Skip to first unread message

dustContributor

unread,
Nov 12, 2015, 11:10:59 PM11/12/15
to Xtend Programming Language
Hi! I'll just let you know, Xtend is great. It does exactly the couple of things that I really want from a JVM language: No semicolons, type inference, compact syntax without redundant characters, leaves primitives alone, type inference, seamless java interop, did I said type inference? Its awesome. And it works really really well, I'd thought that automatic Java transpiling would be an issue but it works great!

But there is one caveat... This annoys me a lot, look:


Leaving aesthetic color choices aside, do you see the difference? With Java syntax highlighter I can configure everything, colors for classes, enums, interfaces, local variables, fields, parameters, method calls, static method calls, abstract method calls, constructors, keywords, if you can name it, you can put a specific color on it.

I'd love if I could have that level of customization in Xtend's editor. Otherwise Xtend code looks like a seamless blob of text :(

PD: Incidentally, it would be nice to have instance method references so I could do filter(matcher::matches).

Efftinge, Sven

unread,
Nov 13, 2015, 2:22:48 AM11/13/15
to xtend...@googlegroups.com
Ok that's not too hard to improve on. 
Could you file an enhancement for it, in our bugtracker? enter_bug
That way you'll also get notifications, when someone comments or works on it.

Cheers,
Sven

--
You received this message because you are subscribed to the Google Groups "Xtend Programming Language" group.
To unsubscribe from this group and stop receiving emails from it, send an email to xtend-lang+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Message has been deleted

dustContributor

unread,
Nov 13, 2015, 11:26:50 AM11/13/15
to Xtend Programming Language
Sweet. I'll do it, but it would be much, much nicer if you could also enable GitHub issues in your repository. Having yet an another account just for submitting a bug is cumbersome.


And thank you for your time.

lum...@gmail.com

unread,
Nov 27, 2015, 7:31:35 AM11/27/15
to Xtend Programming Language
This request has been lying around for a while now: https://bugs.eclipse.org/bugs/show_bug.cgi?id=392705 (2012-10).
As there was no response on this from the team I've actually tried looking into the codebase to implement it myself (and remember asking about where to be within the codebase on this forum), but to no avail..

I really hope there will be progress on this soon, as Sven indicated it shouldn't take too much time.

dustContributor

unread,
Nov 27, 2015, 2:47:34 PM11/27/15
to Xtend Programming Language, lum...@gmail.com
Ah I see. Well, it would be nice if I could merge my bug into that one. 

Efftinge, Sven

unread,
Nov 28, 2015, 1:49:40 PM11/28/15
to xtend...@googlegroups.com
I marked it as a duplicate, which is kind of a merge :-)

lum...@gmail.com

unread,
Feb 2, 2016, 3:50:46 AM2/2/16
to Xtend Programming Language
Could one of the contributors maybe point me in the right direction with regards to which classes are currently in charge of this?

dustContributor

unread,
Feb 5, 2016, 6:33:42 AM2/5/16
to Xtend Programming Language, lum...@gmail.com
Yeah that'd be nice. I tried looking for it but I didn't found it.

lum...@gmail.com

unread,
Mar 21, 2016, 5:36:09 PM3/21/16
to Xtend Programming Language
Is there any update on this yet? Or things we could look into?

Sven Efftinge (sven@efftinge.de)

unread,
Mar 22, 2016, 3:34:21 AM3/22/16
to xtend...@googlegroups.com
Hi Lumenon,

thanks for pinging again. So if you want to have a look, these are the classes that are involved.

*org.eclipse.xtext.xbase.ide.highlighting.XbaseHighlightingCalculator*

Contains coloring code for expressions. I.e. see 
computeFeatureCallHighlighting(XAbstractFeatureCall, IHighlightedPositionAcceptor) for how member accesses get colored differently, depending on whether they are static, extensions, methods or fields.

On this level we apply coloring IDs (string constants, defined in XbaseHighlightingStyles). The corresponding font styles need to be defined on a platform specific level. For Eclipse this is XbaseHighlightingConfiguration.

If you want to color other things than expressions, than you need to look into the corresponding subclasses starting with 'Xtend' suffix.

You can add test cases to org.eclipse.xtend.ide.tests.highlighting.XtendHighlightingCalculatorTest.

hth,
Sven



--

GJ Roelofs (CodePoKE)

unread,
Mar 22, 2016, 8:16:55 AM3/22/16
to xtend...@googlegroups.com
Thank you for the support, and the effort spent in Xtend. (!)

I'll look into this over the week and see if I can scrounge some spare time to address the matter.

Cheers,

GJ

Gijs-Jan Roelofs

CodePoKE  -  AI Consultation, Software Development & Game Design

VAT: 1938.99.388B02
Address: Maasboulevard 1, Maastricht, 6211 JW, Netherlands





--
You received this message because you are subscribed to a topic in the Google Groups "Xtend Programming Language" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/xtend-lang/rO-_EqNokng/unsubscribe.
To unsubscribe from this group and all its topics, send an email to xtend-lang+...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages