How to add a type to eclipse colorer?

359 views
Skip to first unread message

Andy Flury

unread,
Apr 7, 2013, 1:21:09 PM4/7/13
to col...@googlegroups.com
Hi All

I would like to add an additional type to eclipse colorer. However, Eclipse does not color anything in the editor.

The type is called Esper which is a little bit similar to MySql. This is what I did:

I add the new type to the file eclipse\plugins\net.sf.colorer_0.9.9\colorer\hrc\proto.hrc:

  <prototype name="esper" group="database" description="Esper">
   <location link="esper.hrc"/>
   <filename>/\.epl$/i</filename>
  </prototype> 

Then I copied the file db/mysql.hrc to esper.hrc and modified the top:

<?xml version="1.0" encoding="Windows-1251"?>
<!DOCTYPE hrc PUBLIC "-//Cail Lomecb//DTD Colorer HRC take5//EN" "http://colorer.sf.net/2003/hrc.dtd">
<hrc version="take5" xmlns="http://colorer.sf.net/2003/hrc" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://colorer.sf.net/2003/hrc http://colorer.sf.net/2003/hrc.xsd">
    <type name="esper">
        <annotation>
            <documentation>Support ESPER EQL languare </documentation>
            <appinfo>
                  <prototype name="esper" group="database" description="Esper">
                   <location link="file://esper.hrc"/>
                   <filename>/\.epl$/i</filename>
                  </prototype> 
                <require>
                    <package name="regexp"/>
                </require>
            </appinfo>
        </annotation>
        .....
    </type>
</hrc>        

I can now see the the new type in the Eclipse Preferences, but *.epl files do not get colored at all!

Also, I do not see any logging entries in the Eclipse Error Log.

Any help is appreciated

Andy

Igor Russkih

unread,
Apr 8, 2013, 1:14:05 AM4/8/13
to colorer
Hi Andy,

You have to explicitly assign eclipse colorer as an editor for epl files in eclipse' file type preferences.

Or just use "open with.." eclipsecolorer context menu item.

  Igor




Andy

--
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.
 
 

Aleksey Dobrunov

unread,
Apr 8, 2013, 1:15:07 AM4/8/13
to col...@googlegroups.com
Hi Andy.
where there is a file esper.hrc?
from this record
 <location link="esper.hrc"/>
follows that it has to be here eclipse\plugins\net.sf.colorer_0.9.9\colorer\hrc\esper.hrc . 

Aleksey.


2013/4/7 Andy Flury <andy...@gmail.com>


Andy

--

Andy Flury

unread,
Apr 9, 2013, 8:34:28 AM4/9/13
to col...@googlegroups.com

Hi Aleksey

 

Yes, the file is under: eclipse\plugins\net.sf.colorer_0.9.9\colorer\hrc\esper.hrc

 

Anything I am doing wrong?

 

Andy

Andy Flury

unread,
Apr 9, 2013, 8:36:18 AM4/9/13
to col...@googlegroups.com

Hi Igor

 

Yes, I did use open with Colorer Editor. I can see the Colorer Toolbar. But even if I click “reload highlighting syntax rules” there are no colors showing up.

 

Any idea?

 

Thanks

Andy

 

From: col...@googlegroups.com [mailto:col...@googlegroups.com] On Behalf Of Igor Russkih
Sent: Montag, 8. April 2013 07:14
To: colorer
Subject: Re: How to add a type to eclipse colorer?

 

Hi Andy,

Aleksey Dobrunov

unread,
Apr 9, 2013, 11:22:16 AM4/9/13
to col...@googlegroups.com
Hi.
1. in esper.hrc change
<scheme name="mysql">
on
<scheme name="esper">
2. in eclipse
Windows -> Preferences ->General --> Editors -> file associations 
add filetype *.epl and editor Colorer
 
Aleksey


2013/4/9 Andy Flury <andy...@gmail.com>

Andy Flury

unread,
Apr 9, 2013, 11:49:02 AM4/9/13
to col...@googlegroups.com

Thank you Aleksey!

 

It is still not working.

 

Please find attached my proto.hrc and the esper.hrc files which are located under: eclipse\plugins\net.sf.colorer_0.9.9\colorer\hrc\

 

Is there something else I need to change?

 

Thank you

esper.hrc
proto.hrc

Aleksey Dobrunov

unread,
Apr 9, 2013, 12:06:23 PM4/9/13
to col...@googlegroups.com
Andy,
try this

you need default scheme  with name 'esper'.
and for region need parent from hrd file
Aleksey.


2013/4/9 Andy Flury <andy...@gmail.com>
esper.hrc

Andy Flury

unread,
Apr 9, 2013, 12:13:45 PM4/9/13
to col...@googlegroups.com

Thank you so much Aleksey

 

That is now working!

 

Great!

Reply all
Reply to author
Forward
0 new messages