help with custom Julia template

43 views
Skip to first unread message

Joachim Dahl

unread,
Oct 29, 2013, 2:40:56 PM10/29/13
to col...@googlegroups.com
I tried installing a Julia template for Colorer from here:


using these instructions:
http://ohadsc.wordpress.com/2012/05/26/adding-syntax-highlighting-for-new-languages-to-eclipse-with-the-colorer-library/

In other words, I copied the hrc file to colorer/hrc/auto/types and I updated colorer/hrc/auto/empty.hrc to:

<?xml version="1.0" encoding='Windows-1251'?>
 <!DOCTYPE hrc PUBLIC
 "-//Cail Lomecb//DTD Colorer HRC take5//EN"
 >
 <hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc"
 ><annotation><documentation>
 'auto' is a place for include
 to colorer your own HRCs
</documentation></annotation>
<prototype name="julia" group="main" description="Julia">
 <location link="types/julia.hrc"/>
 <filename>/\.jl$/i</filename>
 </prototype>
</hrc>


Then I attached filetypes, etc, and restarted Eclipse,  but there is no syntax highlighting.  My problem seems
similar to the problem reported here:


but I haven't been able see what changes I need to make.

Best regards
Joachim

Aleksey Dobrunov

unread,
Oct 30, 2013, 1:59:28 AM10/30/13
to col...@googlegroups.com
Joachim, hi.
1. check the file extension julia.hrc. When I kept the file from
Chrome his name became julia.hrc.txt
2. Check whether items 10-13 from
http://ohadsc.wordpress.com/2012/05/26/adding-syntax-highlighting-for-new-languages-to-eclipse-with-the-colorer-library/
. You had to add the extension *.jl

attached a screenshot. there are some phrases in Russian, do not pay attention.

Aleksey

2013/10/30 Joachim Dahl <dahl.j...@gmail.com>:
> --
> You received this message because you are subscribed to the Google Groups
> "Colorer" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to colorer+u...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
ecl_jl.jpg
ecl_settings.jpg

Joachim Dahl

unread,
Oct 30, 2013, 3:11:38 AM10/30/13
to col...@googlegroups.com
Thank you for the prompt answer.

It seems that colorer/hrc/auto/empty.hrc is ignored on my system.  If I update colorer/hrc/proto.hrc instead, everything works.

Thank you for providing this software!
Joachim

Bohuslav Roztočil

unread,
Aug 11, 2014, 10:30:35 AM8/11/14
to col...@googlegroups.com
Hi,

I have the same experience. Editing auto/empty.hrc adds the definition to the list of languages, makes the files recognized by Eclipse plugin, but doesn't turn the hiliting on. It's somewhere deep in the implementation - i tried it with colorer.exe with the same results.

When I add into proto.hrc the same definition as I put into auto/empty.hrc (prepended auto/ to the file path, of cource) then everything works fine, as I've expected.

It took me some nasty hours to figure that empty.hrc is not the right way. :(
Bohusz


anatoly techtonik

unread,
Oct 8, 2014, 10:33:23 AM10/8/14
to col...@googlegroups.com
Where is that advice about empty.hrc comes from? The language definition is in separate file, the file is not autodiscovered (I don't know why there is "auto" in the folder name), so you specify that in proto.hrc and colorer.exe (or FarColorer) should work. For Eclipse there seems to be an extra step. If I am not mistaken, there are no people maintaining Eclipse code currently, so there is no answer how to handle that. I'd probably add a check that when scheme DB changes, Colorer shows messages about new schemes and link to preferences to enable them.

If you use Eclipse and know Java, it might be an interesting challenge to tackle, but be prepared to explain your hacking journey well. )
Reply all
Reply to author
Forward
0 new messages