Eclipse RCP: how to display source code?

I wandered if it is possible to open the source code in a text editor and display it with decorations (e.g. Java)? I don’t need the fancy features of the eclipse editor, only the correctly formatted source code with line numbers, it can even be read-only. I read that RCP has many limitations with text editors as it pulls on heavy plugins. Can this be done at all? Can I go to a specific line of code when opening a file? It would be great if someone would point me in the right direction or give me some examples ... Thanks in advance!

+3
source share
2 answers

Eclipse itself (3.4.2) comes with a sample XML editor that implements syntax highlighting. Just create a new plugin project, select "This plugin will contribute to the user interface" and select "No" for the rich client application. The next page of the wizard offers the "Plugin with Editor" template, which is your friend.

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

+4
source

eclipse, TTCN, . , Eclipse. , , . . Andreads_D, , . , , . https://quitus-kitt.googlecode.com/svn/trunk. , .:)

0

Source: https://habr.com/ru/post/1707448/


All Articles