Popup when CMD+clicking String constant
已回答
Hi!
I have constants defined in my code which are feature flag names, lie
private static final String MY_CONFIG = “my.awesome.feature.config”
It's tedious to go every time to external system to check actual value behind these ff, so I want to write a plugin which will display a popup with the actual value (fetched via http endpoint) on Cmd+Click. Ideally I woud take into account constant's name, so the action should work only for constanst ending with _CONFIG
What components should I use for it?
请先登录再写评论。
Hi Gennadiy,
Showing it via Cmd+Click is not a good idea as this is a core shortcut for going to declaration/finding usages.
I suggest implementing this feature via quick documentation feature. For more details, see:
https://plugins.jetbrains.com/docs/intellij/documentation.html
Users will be allowed to see the fetched values in the documentation popup shown on hover or when the Quick Documentation shortcut is invoked.
Thanks!