简体   繁体   English

SWT语法突出显示小部件

[英]SWT Syntax highlighting widget

Anyone know of an SWT widget that can be a text editor with support for syntax highlighting? 有人知道SWT小部件可以是支持语法高亮的文本编辑器吗? 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. 我知道StyledText小部件,但我希望有人已经编写了一些库,因此可以指定应该突出显示的关键字。

Indeed, the general principle of syntax highlighting are using the StyledText Widget . 实际上,语法高亮的一般原则是使用StyledText Widget StyledText小部件

The JavaSourcecodeViewer is a more advanced example. JavaSourcecodeViewer是一个更高级的示例。 替代文字

The JavaViewer is even more detailed ( source code ). JavaViewer更加详细( 源代码 )。

Perhaps what you are looking for is Eclipse Colorer plug-in . 也许您正在寻找的是Eclipse Colorer插件

I have no idea though if and how would the colorer be usable as an SWT widget. 我不知道是否以及如何将colorer用作SWT小部件。

I'd look into what Eclipse uses in their code editor. 我将研究Eclipse在其代码编辑器中使用的内容。 Because if any SWT application uses syntax highlighting, its Eclipse. 因为如果任何SWT应用程序使用语法高亮,那么它的Eclipse。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM