code: public final void checkApplicableIn(ItemGroup parent) {
          if (!isApplicableIn(parent)) {
              throw new AccessDeniedException(
                      Messages.TopLevelItemDescriptor_NotApplicableIn(getDisplayName(), parent.getFullDisplayName()));
          }
      }
docs: Checks if this top level item is applicable within the specified item group.
  <p>
  This is just a convenience function.
  @since 1.607