How to display a button at the mouse position, similar to Run to cursor?

Answered

I want to display an icon on the left side when I move the mouse to a certain location, similar to the run to cursor in Idea debug

 

Do you have any suggestions

 

0
6 comments

It's not quite trivial, see com.intellij.xdebugger.impl.InlayRunToCursorEditorListener

Please explain your use case, maybe there is a simpler solution.

0

Thank you, what I want to do is the same as Run to cursor. When the mouse moves inside the method, a button will be displayed on the left side, and clicking it will get the method name and other information

0

It might be possible to achieve a similar thing with Inlay Hints https://plugins.jetbrains.com/docs/intellij/inlay-hints.html in a much simpler fashion.

0

Thank you, I will try inlay-hints. first.

Another question, what is the name of this feature? What I want to do is to add an Action in the floating window when the mouse moves over a certain parameter.

 

0

Thanks and have a nice day

0

Please sign in to leave a comment.