Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[cdt-dev] Syntax highlighting in own view

Hi there

I try to use syntax highlighting in my own view. I display with org.eclipse.cdt.internal.core.dom.rewrite.astwriter.ASTWriter formatted code in a org.eclipse.swt.custom.StyledText component (but that should be no problem to change).

I want the same behavior as the hover for defintions (org.eclipse.cdt.internal.ui.text.c.hover.CSourceHover) so I tried it first with an own hover. But I’m not able to get any color for my own hover even though I display the same code, extend the same class (AbstractCEditorTextHover) and the definition in my plugin.xml does not look different. I can’t even have line breaks in my own hover but I use the same sequence of escape chars as generated by the CSourceHover class.

Can anyone point me to a direction how to implement the syntax highlighting for my view or explain where this is done in the CSourceHover class since I can’t find it, so I can see how it is done there?

Thanks
Marco

Back to the top