void (@NotNull AnActionEvent e) { Project project = e.getProject(); if (project == null) { e.getPresentation().setEnabledAndVisible(false); return; } if (ActionPlaces.isPopupPlace(e.getPlace())) { VirtualFile file = e.getData(CommonDataKeys.VIRTUAL_FILE); if (file != null && !(file.isInLocalFileSystem() || VersionManagingFileSystem.isEnforcedNonLocal(file))) { e.getPresentation().setEnabledAndVisible(false); return; } if (file == null && e.getData(CommonDataKeys.PSI_ELEMENT) != null) { e.getPresentation().setEnabledAndVisible(false); return; } } super.update(e); }