void (@NotNull AnActionEvent e) { final Presentation presentation = e.getPresentation(); final DataContext dataContext = e.getDataContext(); final VirtualFile vFile = CommonDataKeys.VIRTUAL_FILE.getData(dataContext); final EditorWindow window = EditorWindow.DATA_KEY.getData(dataContext); if (ActionPlaces.isPopupPlace(e.getPlace())) { presentation.setVisible(isEnabled(vFile, window)); } else { presentation.setEnabled(isEnabled(vFile, window)); } }