@Nullable
  private static Pair<ExcludesConfiguration, VirtualFile> getExcludedConfigurationAndFile(final AnActionEvent event, Project project) {
    Navigatable navigatable = event.getData(CommonDataKeys.NAVIGATABLE);
    if (project == null) return null;
    final VirtualFile file;
    if (navigatable instanceof OpenFileDescriptor) {
      file = ((OpenFileDescriptor)navigatable).getFile();
    }
    else if (navigatable instanceof FileNavigatable) {
      OpenFileDescriptor fileDescriptor = ((FileNavigatable)navigatable).getFileDescriptor();
      file = fileDescriptor != null ? fileDescriptor.getFile() : null;
    }
    else {
      file = null;
    }
    if (file == null) return null;
    final ExcludesConfiguration configuration = ValidationConfiguration.getExcludedEntriesConfiguration(project);
    return Pair.create(configuration, file);
  }
@Nullable
  private static Pair<ExcludesConfiguration, VirtualFile> getExcludedConfigurationAndFile(final AnActionEvent event, Project project)