Hi Mickael, thanks for the answer however that isn't quite what I
had in mind. I want the mathematically typeset formulas to appear inline along with the java code
That's a very fun but not trivial topic!
As Alex mentioned, you can try using code-minings for that. Code Minings are attached to a some ranges of code in your editor, and can be used to draw extra things; they are more or less a combination for SWT's StyleRange & GlyphMetrics class which already allows to replace some text ranges by blank area, and of extra painting instructions to add your content in here. I think you can implement something similar for latex expressions, detect them,replace the text by a StyleRange/GlyphMetrics and draw a rendered image in place.
is probably the best source of inspiration.
This would most likely mean that the
lines which do have formulas to render with latex would probably have to be
a bit taller to make them visible which might break the existing
display code which I presume requires a fixed vertical spacing of
The underlying StyledText widget doesn't mandate fixed vertical spacing of lines. it has a lot of flexibility: allow some vertical indent per line, and even characters/areas of different sizes on one line... See for example SWT's Snippet205 and Snippet211, and some others. Basically the low-level API is really capable of anything, the harder work is to interfere safely with lower level widget when coming from an editor.
An alternative would be to develop a convention, so that latex
formulas would be represented as being within a Javadoc and within
a special tag
Sorry, I don't know whether the Javadoc processor is extensible or customizable. That's something you should ask to the