News‎ > ‎

Auto brackets insert in eclihx editor

posted Dec 24, 2011, 4:32 PM by Nikolay Krasko   [ updated Dec 24, 2011, 4:39 PM ]
I have finally finished an auto brackets insertion for haXe editor in eclihx project. Now when you type an open bracket, the close one will automatically appear in the text with the cursor placed between them. Notice that if you type both open and close brackets, the editor will produce an expected pair of brackets but not something like ()).

There're a lot of implementations of bracket auto "inserters" mostly based on JDT, but I chose the code from EPIC project that fintanboyle (many thanks!) advised to me in Issue 87. In order to get more general and configurable solution I did some refactorings that I hope will be useful in future. Also, a function testing framework for automatically typing and checking result of placed brackets is created. This framework is based on JDT source, because I didn't find analog in standard PDE plugins.

I should also mention that while doing this feature I added a standard eclipse auto indentation strategy and did a number of fixes in code coloring.  

To try new features, please proceed with trunk update site as described at installation notes.  

Current state of eclihx editor could be seen from this video: