Show Some Inline Texts (with Accept/Ignore options) In Editor

已回答

Hi There!

During a keyboard action in a Java based IntelliJ plugin, I'm looking for a way to show some inline texts (in grey color) in the editor with an Accept/Ignore options such that when Accept is pressed, the contents get added to the editor and ignored when Ignore is pressed. 

I've the following in hand:

1.) Action implementation which is ready

2.) Editor Instance

3.) Texts (to be shown inline during the keyboard action)

Which Open API do you recommend for displaying some inline texts with Accept/Ignore behavior?

0

Can anyone support this please?

0

Hard to guess without knowing more context, but you can always use generic Popup APIs with customized content and let user select from entries, for example. https://plugins.jetbrains.com/docs/intellij/popups.html

0

 

Here's the context explained with a screenshot.

When uses types “#print random numbers” in the editor and presses two keys (I configured in the plugin.xml), I will pull the required code snippet from my API and show the snippet as ghosts texts (https://brainly.com/question/51627401) with Accept and Ignore buttons. On pressing Accept, I'll have to add the ghost texts to the editor. On pressing Ignore, I'll have to hide the ghost texts being shown

Which API do you recommend to implement this functionality? 

0

请先登录再写评论。