开发者

Widget inside a custom text editor in Eclipse

开发者 https://www.devze.com 2023-01-08 13:09 出处:网络
I\'m developing a custom text editor for a programming language in Eclipse. Is it possible to put a widget (a button, for instance开发者_如何学C) inside a custom text editor?For all SWT related questi

I'm developing a custom text editor for a programming language in Eclipse. Is it possible to put a widget (a button, for instance开发者_如何学C) inside a custom text editor?


For all SWT related questions, always have a look at the official Snippet page first. Often it is really helpful. This is one of these cases: Snippet217 shows how to embed arbitrary controls in a StyledText, which seems to be what you aim for.


It doesn't directly awnser your question but I would recommend using http://www.eclipse.org/Xtext/ (Xtext). By defining a grammar for your programming language, Xtext generates a whole IDE for your language including an editor with syntax highlighting and auto-completion, an outline and hooks for builders etc.

It really is amazing, the first time I used it my jaw just dropped.

0

精彩评论

暂无评论...
验证码 换一张
取 消