tags:

views:

457

answers:

1

I was wandering if it's possible to open a source code in text editor and display it with decorations (Java for example)? I don't need fancy eclipse editor features, just properly decorated source code with line numbers, it can even be read-only. I read that RCP have many limitations with text editors as it drags behind heavy plug-ins. Can it be done at all? Is it possible to navigate to particular line of code when file is opened? It would be really great if someone would point me out to the right direction or give some examples... Thanks in advance!

+2  A: 

Eclipse (3.4.2) itself ships with a sample XML editor that implements syntax highlighting. Just create a new plugin project, select 'This plugin will make contributions to the UI' and choose 'No' for Rich client application. The following wizard page offers a 'Plugin with an editor' template, which is your friend.

It may be too simple to use it as real template for your task, but it demonstrate how to create colourful editors for text files.

Andreas_D
Great, thanks!This is exactly what I was looking for :)
Dima

related questions