private Set<PsiFile> getSelectedScope(final Tree tree) {
    TreePath[] paths = tree.getSelectionPaths();
    return getSelectedScope(paths != null ? ContainerUtil.map2Array(paths, p -> p.getLastPathComponent()) : null);
  }
private Set<PsiFile> getSelectedScope(final Tree tree)