我想实现一个 Action 监听器,当单击intellij编辑器列表时,应该能够获取编辑器的内容。(已经在编辑器中输入的内容)。我已经使用 TypedActionHaqndler 实现了一种方法,但在编辑器中键入时它会提供字母。( http://www.jetbrains.org/intellij/sdk/docs/tutorials/editor_basics/editor_events.html )。单击编辑器时有什么方法可以获取操作。知道的请帮忙。
最佳答案
在 CompletionContributor
中,使用 CompletionParameters.getEditor()
获取调用完成的编辑器,并使用 CompletionParameters.getOffset()
获取插入符号偏移量。
关于java - Intellij 编辑器点击事件,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/35130703/