I had presented a tutorial on implementing Eclipse Editor plugin a couple of years ago. Recently when I started implementing a new Eclipse editor, I was looking for that presentation, but couldn’t find it easily. I like to use my blog as reference for myself, so I thought I would post my Eclipse editor tutorial here.
For the tutorial, I created a new language called VGL (Vector Graphics Language) and built Eclipse editor plugin for it. The language is not important, and just serves the purpose for explaining how to create an editor. The tutorial starts with defining the language and then incrementally builds features of a typical Eclipse editor. I created separate projects for each step in the tutorial. There are nine Eclipse projects. Download and import project in Eclipse for each step if you want to see how it is built incrementally. The last project contains all the editor features covered in this tutorial.
Projects (as Zip files):
- Creating parser for the language
- Creating Editor plugin
- Code Assist
- Error recovery in parser
- Code Outline
- Syntax coloring
- Code Folding
- Error reporting
- Code Hyperlink
I had plans to extend this tutorial to include launcher and debugger (which requires me to implement runtime for the language first), but haven’t got time to do that yet. May be sometime in future…
I was evaluating options for putting presentation in my blog. I like to keep all assets of my blog (code, images, presentations etc.) on my hosting server and do not like to have them distributes across multiple sites. So I ruled out hosting options like SlideShare etc. I then decided to implement a simple presentation viewer myself. Turned out, it wasn’t so difficult. You can see the interface below. All slides are HTML pages. You can navigate to next/prev slides. If you want to go to a specific slide, type the slide number in the text box and press Enter.The interface is not very fancy, but I think it is good enough for the presentation I wanted to share.