void (@NotNull AnActionEvent e) { VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); boolean enabled = file != null && FileTypeRegistry.getInstance().isFileOfType(file, SvgFileType.INSTANCE); e.getPresentation().setEnabledAndVisible(enabled); }