I would like to make a Eclipse plugin (text editor). I would “read” the text under the cursor and show a dynamical generated hover that depends on the text. Now I have the problem that I don’t know how I can read the text and “add” the hover.
It’s my first Eclipse Plugin so I am happy for each tip I can get.
Edit:
I’d like to integrate it into the default Eclipse Java editor. I have tried to create a new plugin with a editor template but I think it is the wrong way.
Last Edit:
The answer from PKeidel is exactly what I’m looking for 🙂
Thanks PKeidel
Your fault is that you created a completly new Editor instead of a plugin for the existing Java Editor. Plugins will be activated via
extension points. In your case you have to useorg.eclipse.jdt.ui.javaEditorTextHoversmore….The class argument holds the path to your Class that
implements IJavaEditorTextHover.That should do it 😉