I'm developing a custom text editor for a programming language in Eclipse. Is it possible to put a widget (a button, for instance) inside a custom text editor?
+2
A:
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.
the.duckman
2010-07-24 20:01:58
That's perfect, thank you :)
Allan
2010-07-24 20:21:59
A:
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.
BernardMarx
2010-07-26 14:49:03