jetplugins / apidocx

Generate API documents to any place: YApi, RAP2, Eolink, etc.
https://plugins.jetbrains.com/plugin/17425-apidocx/
Apache License 2.0
177 stars 39 forks source link

feat: 选中非java文件但未打开编辑器的情况下, 不显示yapix菜单 #16

Closed BOFA1ex closed 2 years ago

BOFA1ex commented 2 years ago
Editor editor = event.getDataContext().getData(CommonDataKeys.EDITOR);
VirtualFile file = event.getDataContext().getData(CommonDataKeys.VIRTUAL_FILE);
// 当选中非java文件, 但未打开编辑器时, yapix正常回显.
if (editor != null && file != null && !"java".equals(file.getExtension())) {
    visible = false;
}