Hot start in plugin development
已回答
Hello.
First, I am sorry for being lazy :) .
My question is not so simple, but... I think, it's possible to create such plugin.
I need to find all int values in PyCharm, like this:
if trait in (
102785, 155999, 136437, 155997, 119668, 129480, 40467, 40359, 141854, 16853, 16852, 130541, 139879,
10581,
139513, 147121, 108760, 122820, 133800, 187088, 177810, 178437, 186785, 183343, 133798, 112688, 202424,
191783,
155998):
On mouse hover on each int value plugin should trigger event with passed int value of hovered int. After that plugin should show pop-up near hovered int with some text. For example, with hovered int value.
I found http://www.jetbrains.org/intellij/sdk/docs/products/pycharm.html docs, but I did't find interested me answers.
So, my questions about docs are:
1) How to get all int values in opened and active *.py file in IDE?
2) How to make event for int mouse hover?
3) How to show pop-up message (window) near hovered int?
Thank you.
请先登录再写评论。
You can use underlying PSI to access any element. To achieve popup for each separate number, one way could be to use Annotator and provide INFO-level annotation for each number, passed in text will be used as tooltip automatically. http://www.jetbrains.org/intellij/sdk/docs/reference_guide/custom_language_support/syntax_highlighting_and_error_highlighting.html#annotator