📜  intellij 插件获取当前选择 - Kotlin 代码示例

📅  最后修改于: 2022-03-11 14:53:34.546000             🧑  作者: Mango

代码示例1
override fun actionPerformed(e: AnActionEvent) {
    var editor=e.getData(PlatformDataKeys.EDITOR);
    var selectedText= editor?.selectionModel?.getSelectedText();
}