Reputation: 515
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?
Upvotes: 1
Views: 380
Reputation: 916
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.
Upvotes: 0
Reputation: 6406
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.
Upvotes: 2