在选中的代码旁边显示弹框 Override public void actionPerformedNotNull AnActionEvent e key = Optimize this code; Editor editor = egetDataCommonDataKeysEDITOR;
if (editor != null) { SelectionModel selectionModel = editor.getSelectionModel(); String selectedText = selectionModel.getSelectedText(); if (selectedText != null && !selectedText.isEmpty()) { HintManager.getInstance().showInformationHint(editor, key); } } }
原文地址: https://www.cveoy.top/t/topic/brHw 著作权归作者所有。请勿转载和采集!