1

I've been trying develop my custom plugin for Eclipse, and basically I want to make is a "richer" version on the current TextHover. I don't know what widget(?) Eclipse uses to display the hovering text, but I want to use something different, like SWT Image or SWT Browser.

Most of the tutorials that I've read suggest that I have to implement my own Java Editor to do this, but I don't want the user to switch to my custom editor just for a simple feature (and I don't want to implement a whole editor).

Some Tests: I've already created two Eclipse Plugin Projects. The first one is a extension for the JavaEditorTextHovers, and with this project I managed to show some custom Strings when hovering some random texts, but wasn't able to change the hover appearance. The second project was a editor plugin. With this last one I managed to get a Browser to appear when hovering a random text(this tutorial helped me), but again, this editor had nothing, no syntax coloring, no rules, etc., and for the previous reasons, I couldn't accept this has a solution.

Maybe if there was way to change the (or set a new) SourceViewerConfiguration of the current editor I could pass my custom SourceViewerConfiguration, but I'm not sure if this is possible.

mobileDev07
  • 155
  • 1
  • 3
  • 7
  • Look at the `getTextHover`, `getInformationControlCreator`, and `getInformationPresenter` methods in `SourceViewerConfiguration` – greg-449 Aug 17 '14 at 08:05
  • @greg-449 I get that, by implementing SourceViewerConfiguration and those methods, I'm able to change the Text Hover appearance but how can I set a custom SourceViewerConfiguration to the editor when I only create a class that implements IJavaEditorTextHover for the . – mobileDev07 Aug 17 '14 at 17:12
  • possible duplicate of [Creating a eclipse plugin with text hover](http://stackoverflow.com/questions/12956666/creating-a-eclipse-plugin-with-text-hover) – Eyal Dec 30 '14 at 14:47
  • Look at the answer given to [this question](http://stackoverflow.com/questions/12956666/creating-a-eclipse-plugin-with-text-hover) - I believe it is exactly what you need. – Eyal Dec 30 '14 at 14:48

0 Answers0