RefEntity @NotNull [] getElementsFromSelection(TreePath @NotNull [] selectionPaths) {
    InspectionToolWrapper<?,?> toolWrapper = getSelectedToolWrapper(true, selectionPaths);
    if (toolWrapper == null) return RefEntity.EMPTY_ELEMENTS_ARRAY;
    Set<RefEntity> result = new LinkedHashSet<>();
    for (TreePath selectionPath : selectionPaths) {
      final InspectionTreeNode node = (InspectionTreeNode)selectionPath.getLastPathComponent();
      addElementsInNode(node, result);
    }
    return ArrayUtil.reverseArray(result.toArray(RefEntity.EMPTY_ELEMENTS_ARRAY));
  }
RefEntity @NotNull [] getElementsFromSelection(TreePath @NotNull [] selectionPaths)