private static int getAccessLevel(@NotNull Object element) {
    if (element instanceof AccessLevelProvider) {
      return ((AccessLevelProvider)element).getAccessLevel() * (GROUP_ACCESS_SUBLEVEL + 1) + ((AccessLevelProvider)element).getSubLevel();
    }
    else {
      if (!(element instanceof CustomRegionTreeElement)) {
        LOG.error(element.getClass().getName());
      }
      return UNKNOWN_ACCESS_LEVEL;
    }
  }
private static int getAccessLevel(@NotNull Object element)