@Override
  public Object @NotNull [] getChildElements(final @NotNull Object element) {
    if (element == myRootElement) {
      ArrayList<Object> elements = new ArrayList<>();
      final RadRootContainer rootContainer = myEditor.getRootContainer();
      elements.add(new ComponentPtr(myEditor, rootContainer));
      final LwInspectionSuppression[] suppressions = rootContainer.getInspectionSuppressions();
      if (suppressions.length > 0) {
        elements.add(suppressions);
      }
      RadButtonGroup[] buttonGroups = rootContainer.getButtonGroups();
      if (buttonGroups.length > 0) {
        elements.add(buttonGroups);
      }
      return elements.toArray();
    }
    else if (element instanceof ComponentPtr ptr) {
      LOG.assertTrue(ptr.isValid()); // pointer must be valid
      final RadComponent component = ptr.getComponent();
      if (component instanceof RadContainer container) {
        final ComponentPtr[] ptrs = new ComponentPtr[container.getComponentCount()];
        for (int i = 0; i < ptrs.length; i++) {
          ptrs[i] = new ComponentPtr(myEditor, container.getComponent(i));
        }
        return ptrs;
      }
      else {
        return ArrayUtil.EMPTY_OBJECT_ARRAY;
      }
    }
    else if (element instanceof LwInspectionSuppression[]) {
      ArrayList<LwInspectionSuppression> result = new ArrayList<>();
      for (LwInspectionSuppression suppression : (LwInspectionSuppression[])element) {
        if (suppression.getComponentId() == null ||
            FormEditingUtil.findComponent(myEditor.getRootContainer(), suppression.getComponentId()) != null) {
          result.add(suppression);
        }
      }
      return ArrayUtil.toObjectArray(result);
    }
    else if (element instanceof RadButtonGroup[]) {
      return (RadButtonGroup[])element;
    }
    else if (element instanceof LwInspectionSuppression || element instanceof RadButtonGroup) {
      return ArrayUtilRt.EMPTY_OBJECT_ARRAY;
    }
    else {
      throw new IllegalArgumentException("unknown element: " + element);
    }
  }
@Override
  public Object @NotNull [] getChildElements(final @NotNull Object element)