Just out of curiosity I decided to explore how hard it would be to create an Eclipse IDE for GDL. Part of my motivation was that I would be able to use the same IDE interchangeably with the real IDL backend as I find that the real IDL IDE is frustratingly buggy. How cool would it be to be able to use an Open Source IDE to develop in IDL, faster updates and the ability to fix bugs yourself. Anyway this blog post is dedicated to sharing what I found and is intended to help anyone who has wanted to create an IDE for GDL but didnt know where to start.
Creating the Eclipse Editor
I discovered an Eclipse project that is design to make the process of creating an IDE easier called IMP the project doesnt seem to be as active it has been in the past but the tools are actually top notch (well as least what I have used so far). There is a great guide to using the tools here.
IMP uses a parser to do the code syntax checking called LPG so unfortunately the ANTLR definitions used in GDL itself cannot be reused ( it seems like ANTLR support was a goal for IMP but it has not been implemented yet). After a quick play I managed to get it to parse some simple stuff like procedures, while/for loops, as can be seen in the picture below. Note: I just adapted the LPG template that was automatically generated so anyone downloading my source code will probably see stuff in there that doesnt make much sense in ÍDL.
Creating a GDL interactive console
In order to create an interactive console in eclipse a solution would be to pipe the output from the existing GDL/IDL command line tools into an Eclipse console the best example of this that I have found is the WickedShell plugin which pipes a plan linux/windows terminal into eclipse. Borrowing some code from this project would be ideal. This is likely where I will focus my effort if I get time to work on this project as its likely to be easier than learning about parsers/lexers and LPG.
As I dont have the time to create a GDL IDL on my own I have decided to post the above findings and my code so far and see what people think so I look forward to your feedback.
No Comments Yet