Exemplo n.º 1
0
  private static MarkupException createMarkupException(
      Component component, ComponentTag tag, Set<? extends String> tagNames) {
    String msg =
        String.format(
            "Component [%s] (path = [%s]) must be applied to a tag of type [%s], not: %s",
            component.getId(),
            component.getPath(),
            Joiner.on(',').join(tagNames),
            tag.toUserDebugString());

    throw new MarkupException(component.getMarkup().getMarkupResourceStream(), msg);
  }
Exemplo n.º 2
0
 /** {@inheritDoc} */
 @Override
 public ComponentTag getComponentTag(Component c) {
   IMarkupFragment markup = c.getMarkup();
   MarkupStream stream = new MarkupStream(markup);
   return stream.getTag();
 }