SWT Syntax highlighting widget

2019-02-17 07:16发布

Anyone know of an SWT widget that can be a text editor with support for syntax highlighting? I'm aware of the StyledText widget but I'm hoping that somebody has already written some libraries so one can just specify the keywords that should be highlighted.

标签: java swt
3条回答
家丑人穷心不美
2楼-- · 2019-02-17 07:23

Perhaps what you are looking for is Eclipse Colorer plug-in.

I have no idea though if and how would the colorer be usable as an SWT widget.

查看更多
Melony?
3楼-- · 2019-02-17 07:25

I'd look into what Eclipse uses in their code editor. Because if any SWT application uses syntax highlighting, its Eclipse.

查看更多
混吃等死
4楼-- · 2019-02-17 07:29

Indeed, the general principle of syntax highlighting are using the StyledText Widget. StyledText Widget

The JavaSourcecodeViewer is a more advanced example. alt text

The JavaViewer is even more detailed (source code).

查看更多
登录 后发表回答