@Override public String getTagName(E element) { return getDelegate().getTagName(element); }
@Override public <N, E extends N, T extends N> void exec(MutableDocument<N, E, T> doc) { for (E el : DocIterate.deepElements(doc, doc.getDocumentElement(), null)) { if (Blips.THREAD_INLINE_ANCHOR_TAGNAME.equals(doc.getTagName(el))) { String threadId = doc.getAttribute(el, Blips.THREAD_INLINE_ANCHOR_ID_ATTR); if ((threadId != null) && !anchors.containsKey(threadId)) { anchors.put(threadId, doc.getLocation(el)); } } } } });
@Override public <N, E extends N, T extends N> void exec(MutableDocument<N, E, T> doc) { List<E> elementsToDelete = CollectionUtils.newArrayList(); for (E el : DocIterate.deepElements(doc, doc.getDocumentElement(), null)) { if (Blips.THREAD_INLINE_ANCHOR_TAGNAME.equals(doc.getTagName(el))) { elementsToDelete.add(el); } } // Reverse elements to delete so we always delete bottom up if one // contains another (which would be really weird anyway). Collections.reverse(elementsToDelete); for (E el : elementsToDelete) { doc.deleteNode(el); } } });
@Override public <N, E extends N, T extends N> void exec(MutableDocument<N, E, T> doc) { List<E> elementsToDelete = CollectionUtils.newArrayList(); for (E el : DocIterate.deepElements(doc, doc.getDocumentElement(), null)) { if (Blips.THREAD_INLINE_ANCHOR_TAGNAME.equals(doc.getTagName(el))) { String elId = doc.getAttribute(el, Blips.THREAD_INLINE_ANCHOR_ID_ATTR); if (threadIds.contains(elId)) { elementsToDelete.add(el); } } } // Reverse elements to delete so we always delete bottom up if one // contains another (which would be really weird anyway). Collections.reverse(elementsToDelete); for (E el : elementsToDelete) { doc.deleteNode(el); } } });
String actualTag = doc.getTagName(firstElement); if (!tag.equals(actualTag)) { throw new RuntimeException("Document already has non-matching top-level element: "
if (doc.getTagName(el).equals(LineContainers.LINE_TAGNAME)) { if (firstLineReached != null) { end = doc.getLocation(node);
public <N, E extends N, T extends N> void exec(MutableDocument<N, E, T> doc) { E anchor = Point.elementAfter(doc, doc.locate(location)); E anchorParent = doc.getParentElement(anchor); doc.createChildElement(anchorParent, doc.getTagName(anchor), doc.getAttributes(anchor)); } });
public <N, E extends N, T extends N> void exec(MutableDocument<N, E, T> doc) { E anchor = Point.elementAfter(doc, doc.locate(location)); E anchorParent = doc.getParentElement(anchor); doc.createChildElement(anchorParent, doc.getTagName(anchor), doc.getAttributes(anchor)); } });