Custom Bubble help on mouse cursor ?

Hi, I wanted to know, how do I show a custom bubblehelp when I move my mouse cursor on a specific function ? It is even possible please ? (see example below)

Thank you !

Best regards

 

Example :  

When I move my cursor on the method "translate(1)", I wanna a bubbleHelp which shows "Hello". When I move my cursor on "translate(2)", the bubbleHelp shows "Goodbye".

-main.js-

translate(1);

translate(2);

 

-language_en.js-

var language = { 1: 'Hello', 2: 'Goodbye'};

 

0
2 comments

You can implement whatever custom logic you want by registering an editor mouse listener (Editor.addEditorMouseMotionListener, EditorEventMulticaster.addEditorMouseMotionListener), tracking mouse position, and showing any popups.

There's also a standard functionality of showing 'quick doc' on mouse movement (disabled by default, configured in Settings->Editor->General->Show quick documentation on mouse move). You can register your DocumentationProvider as an extension point, its 'generateDoc' method will be called for element under mouse cursor to generate content for popup.

1
Avatar
Permanently deleted user

Hey Dmitry, 

Thank you very much for your help and your detailed answer ! I'll check that.

See you

0

Please sign in to leave a comment.