Syntax highlighter for .feature files in Eclipse

4,732 views
Skip to first unread message

Ilan Pillemer

unread,
Apr 4, 2012, 10:33:13 AM4/4/12
to cu...@googlegroups.com
Hi,

Is there currently an editor/syntax colourer for .feature files in Eclipse?

If there is not and I make the time to do the R&D on how create one for Eclipse and do it..

What would be requirements?

--
Ilan


Aaron VonderHaar

unread,
Apr 4, 2012, 11:09:39 AM4/4/12
to cu...@googlegroups.com

There's a page here started by Aslak describing desired features for cucumber IDE plugins: https://github.com/cucumber/cucumber-jvm/wiki/IDE-support

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cukes/-/tdDD5HebhuUJ.
To post to this group, send email to cu...@googlegroups.com.
To unsubscribe from this group, send email to cukes+un...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/cukes?hl=en.

Niklas Delißen

unread,
Apr 4, 2012, 12:56:48 PM4/4/12
to cu...@googlegroups.com

hey, there is a zuchini plugin for eclipse which gives annotation highlited and autocomplete the steps in the feature files.

~snow

Ilan Pillemer

unread,
Apr 4, 2012, 3:31:03 PM4/4/12
to cu...@googlegroups.com


On Wednesday, 4 April 2012 18:56:48 UTC+2, Snow wrote:
 

hey, there is a zuchini plugin for eclipse which gives annotation highlited and autocomplete the steps in the feature files.

 Thanks for the pointer. I looked at it and saw things I immediately did not like.. such as all keywords being the same colour.
 
So I went to try get the source code and did not enjoy so much. 
Its stored in Subversion; but the code is not even in the trunk folder. 
The trunk folder contains nothing. So not sure how to branch. 

 And there is not any significant code worth evolving in there anyways.

 I am going to build a new one from scratch if this is all there is.

 Though if you see something else tell me!
-- 
ilAn
 

Aslak Hellesøy

unread,
Apr 4, 2012, 4:46:18 PM4/4/12
to cu...@googlegroups.com




On Apr 4, 2012, at 20:31, Ilan Pillemer <ilan.p...@gmail.com> wrote:



On Wednesday, 4 April 2012 18:56:48 UTC+2, Snow wrote:
 

hey, there is a zuchini plugin for eclipse which gives annotation highlited and autocomplete the steps in the feature files.

 Thanks for the pointer. I looked at it and saw things I immediately did not like.. such as all keywords being the same colour.
 

I think that's a good thing. See cucumber/gherkin-syntax-highlighters on github.

So I went to try get the source code and did not enjoy so much. 
Its stored in Subversion; but the code is not even in the trunk folder. 
The trunk folder contains nothing. So not sure how to branch. 

 And there is not any significant code worth evolving in there anyways.

 I am going to build a new one from scratch if this is all there is.


If you come up with something good I'd be happy to give you a repo under cucumber/ on github,

Aslak

 Though if you see something else tell me!
-- 
ilAn
 

--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cukes/-/XdVDO9eaJDsJ.

Ilan Pillemer

unread,
Apr 4, 2012, 5:29:16 PM4/4/12
to cu...@googlegroups.com

 

hey, there is a zuchini plugin for eclipse which gives annotation highlited and autocomplete the steps in the feature files.

 Thanks for the pointer. I looked at it and saw things I immediately did not like.. such as all keywords being the same colour.
I think that's a good thing. See cucumber/gherkin-syntax-highlighters on github.

I'll read that and follow the advice if its convincing.
 
So I went to try get the source code and did not enjoy so much. 
Its stored in Subversion; but the code is not even in the trunk folder. 
The trunk folder contains nothing. So not sure how to branch. 

 And there is not any significant code worth evolving in there anyways.

 I am going to build a new one from scratch if this is all there is.
If you come up with something good I'd be happy to give you a repo under cucumber/ on github,


Great!. Well I have started a project for it. 


(1) I basically ran the wizard for generating Eclipse Plugins to create the boilerplate code.
  (i) Went and refactored file names, etc..
  (ii) Still some of that clean up left.
(2) I checked out the plugin example for text editors that you can download from Eclipse. (Its for a simplified Java editor
  (i) Specifically I read up on syntax highlighting, 
  (ii) but the documentation seems pretty good for auto completion; right click contextual menus etc etc..
(3) It took me about two hours of figuring my way around Eclipse (I am not that used to plain Eclipse) and the example files
  (i) to get very basic syntax highlighting working.

So its a long way from good; but its a start. I know I will be using it already to get some colour going; as I have started already using cucumber-jvm in my projects at the work office and the lack of colour has been annoying me.

--
Ilan

Ilan Pillemer

unread,
Apr 5, 2012, 2:53:44 AM4/5/12
to cu...@googlegroups.com


Here is a screenshot of the first basic syntax highlighting from the plugin;

I see why you probably will want to have keywords all the same colour.

Excuse the mostly imperative style of the feature; I was mainly experimenting with Selenium.

Any recommendations of what Eclipse files to also include to make it easier for people to grab the project?


Ilan Pillemer

unread,
Apr 5, 2012, 4:51:10 PM4/5/12
to cu...@googlegroups.com

Added more syntax highlighting; as well as made installing easy.



Aslak Hellesøy

unread,
Apr 5, 2012, 5:13:28 PM4/5/12
to cu...@googlegroups.com, cu...@googlegroups.com
Looking nice! Did you know the Gherkin jar has an I18n class you can use to get keywords at runtime? It can also determine the language of a file based on the language header, allowing you to automatically pick the correct keywords. It would be nice if the Eclipse plugin used this.

Aslak

On Apr 5, 2012, at 9:51 PM, Ilan Pillemer <ilan.p...@gmail.com> wrote:


Added more syntax highlighting; as well as made installing easy.



--
You received this message because you are subscribed to the Google Groups "Cukes" group.
To view this discussion on the web visit https://groups.google.com/d/msg/cukes/-/Hg0dfIKQyksJ.

Ilan Pillemer

unread,
Apr 5, 2012, 5:42:24 PM4/5/12
to cu...@googlegroups.com


On Thursday, 5 April 2012 23:13:28 UTC+2, Aslak Hellesøy wrote:
Looking nice! Did you know the Gherkin jar has an I18n class you can use to get keywords at runtime? It can also determine the language of a file based on the language header, allowing you to automatically pick the correct keywords. It would be nice if the Eclipse plugin used this.

Will do next. Created an issue to track it. If you think of anything else I should know or should do please just add as a comment on the issue.

--
Ilan
 

Ilan Pillemer

unread,
Apr 9, 2012, 4:40:11 PM4/9/12
to cu...@googlegroups.com


On Thursday, 5 April 2012 23:13:28 UTC+2, Aslak Hellesøy wrote:
Looking nice! Did you know the Gherkin jar has an I18n class you can use to get keywords at runtime? It can also determine the language of a file based on the language header, allowing you to automatically pick the correct keywords. It would be nice if the Eclipse plugin used this.


Done. 

The Eclipse plugin now uses the Gherkin jar to get keywords at runtime.
The Eclipse plugin now also determines the language to do this from the language header, automatically picking the keywords.

Here is a screenshot.


--
Ilan

Javix

unread,
Jul 23, 2012, 7:45:37 AM7/23/12
to cu...@googlegroups.com
It didn't work for Eclipse: Build id: 20100218-1602, Windows XP Pro, SP3. No highliting at all. I just copy pasted the jar 'za.co.hardlyhere.gherkin.plugin_1.0.3.SNAPSHOT.jar' into %eclipse_folder%/plugins directory. Restarted Eclipse.

Any idea?

Javix

unread,
Jul 23, 2012, 5:02:07 PM7/23/12
to cu...@googlegroups.com
Just tried it on a Ubuntu 12.04 box, the latest Eclipse Version: Juno Release
Build id: 20120614-1722.

The highlighting works pretty well.
So sorry for that, I have no idea why on a previous version of Eclipse it didn't work at all.

Tom Barber

unread,
Dec 18, 2013, 5:59:38 AM12/18/13
to cu...@googlegroups.com
FYI for anyone stumbling across this, there is an eclipse plugin that includes syntax highlighting:

http://cukes.info/cucumber-eclipse/

Roberto Lo Giacco

unread,
Dec 18, 2013, 7:47:05 AM12/18/13
to cu...@googlegroups.com


Il giorno mercoledì 18 dicembre 2013 11:59:38 UTC+1, Tom Barber ha scritto:
FYI for anyone stumbling across this, there is an eclipse plugin that includes syntax highlighting:

http://cukes.info/cucumber-eclipse/


Roberto Lo Giacco

unread,
Dec 18, 2013, 7:48:52 AM12/18/13
to cu...@googlegroups.com
Il giorno mercoledì 4 aprile 2012 16:33:13 UTC+2, Ilan Pillemer ha scritto:
Hi,

Is there currently an editor/syntax colourer for .feature files in Eclipse?

If there is not and I make the time to do the R&D on how create one for Eclipse and do it..

There are a couple of Eclipse plugins now available, I've developed one called Natural (https://github.com/rlogiacco/Natural) which is looking for contributors.
Reply all
Reply to author
Forward
0 new messages