@Override
  public ErrorTreeElement @NotNull [] getChildElements(@NotNull Object element) {
    if (element == myRoot) {
      final List<ErrorTreeElement> children = new ArrayList<>();
      // simple messages
      synchronized (myLock) {
        for (final ErrorTreeElementKind kind : ourMessagesOrder) {
          if (shouldHide(kind)) {
            continue;
          }
          final List<ErrorTreeElement> elems = mySimpleMessages.get(kind);
          if (elems != null) {
            children.addAll(elems);
          }
        }
        // files
        for (final String myGroupName : myGroupNames) {
          final GroupingElement groupingElement = myGroupNameToElementMap.get(myGroupName);
          if (shouldShowFileElement(groupingElement)) {
            children.add(groupingElement);
          }
        }
      }
      return children.toArray(ErrorTreeElement.EMPTY_ARRAY);
    }

    if (element instanceof GroupingElement) {
      synchronized (myLock) {
        final List<NavigatableMessageElement> children = myGroupNameToMessagesMap.get(((GroupingElement)element).getName());
        if (children != null && !children.isEmpty()) {
          if (isFilteringNeeded()) {
            final List<ErrorTreeElement> filtered = new ArrayList<>(children.size());
            for (final NavigatableMessageElement navigatableMessageElement : children) {
              if (!shouldHide(navigatableMessageElement.getKind())) {
                filtered.add(navigatableMessageElement);
              }
            }
            return filtered.toArray(ErrorTreeElement.EMPTY_ARRAY);
          }
          return children.toArray(new NavigatableMessageElement[0]);
        }
      }
    }

    return ErrorTreeElement.EMPTY_ARRAY;
  }
@Override
  public ErrorTreeElement @NotNull [] getChildElements(@NotNull Object element)