@Nullable
  @Override
  public Object getData(@NotNull DataProvider dataProvider) {
    VirtualFile[] files = CommonDataKeys.VIRTUAL_FILE_ARRAY.getData(dataProvider);
    if (files != null) {
      return JBIterable.of(files);
    }

    VirtualFile file = CommonDataKeys.VIRTUAL_FILE.getData(dataProvider);
    if (file != null) {
      return JBIterable.of(file);
    }

    IdeView view = LangDataKeys.IDE_VIEW.getData(dataProvider);
    if (view != null) {
      JBIterable<PsiDirectory> directories = JBIterable.of(view.getDirectories());
      if (directories.isNotEmpty()) {
        if (directories.contains(null)) {
          LOG.error("Array with null provided by " + view.getClass().getName());
        }
        return directories.filterNotNull().filterMap(o -> o.getVirtualFile()).collect();
      }
    }

    return null;
  }
@Nullable
  @Override
  public Object getData(@NotNull DataProvider dataProvider)