Java Code Examples for org.eclipse.jdt.core.dom.TagElement#getStartPosition()
The following examples show how to use
org.eclipse.jdt.core.dom.TagElement#getStartPosition() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: JavadocContentAccess2.java From Eclipse-Postfix-Code-Completion with Eclipse Public License 1.0 | 5 votes |
private void handleInlineTagElement(TagElement node) { String name= node.getTagName(); if (TagElement.TAG_VALUE.equals(name) && handleValueTag(node)) return; boolean isLink= TagElement.TAG_LINK.equals(name); boolean isLinkplain= TagElement.TAG_LINKPLAIN.equals(name); boolean isCode= TagElement.TAG_CODE.equals(name); boolean isLiteral= TagElement.TAG_LITERAL.equals(name); if (isLiteral || isCode) fLiteralContent++; if (isLink || isCode) fBuf.append("<code>"); //$NON-NLS-1$ if (isLink || isLinkplain) handleLink(node.fragments()); else if (isCode || isLiteral) handleContentElements(node.fragments(), true); else if (handleInheritDoc(node)) { // handled } else if (handleDocRoot(node)) { // handled } else { //print uninterpreted source {@tagname ...} for unknown tags int start= node.getStartPosition(); String text= fSource.substring(start, start + node.getLength()); fBuf.append(removeDocLineIntros(text)); } if (isLink || isCode) fBuf.append("</code>"); //$NON-NLS-1$ if (isLiteral || isCode) fLiteralContent--; }
Example 2
Source File: JavadocContentAccess2.java From eclipse.jdt.ls with Eclipse Public License 2.0 | 4 votes |
@SuppressWarnings("unchecked") private void handleInlineTagElement(TagElement node) { String name = node.getTagName(); if (TagElement.TAG_VALUE.equals(name) && handleValueTag(node)) { return; } boolean isLink = TagElement.TAG_LINK.equals(name); boolean isLinkplain = TagElement.TAG_LINKPLAIN.equals(name); boolean isCode = TagElement.TAG_CODE.equals(name); boolean isLiteral = TagElement.TAG_LITERAL.equals(name); if (isLiteral || isCode) { fLiteralContent++; } if (isCode) { fBuf.append("<code>"); //$NON-NLS-1$ } if (isLink || isLinkplain) { handleLink(node.fragments()); } else if (isCode || isLiteral) { handleContentElements(node.fragments(), true); } else if (handleInheritDoc(node)) { // handled } else if (handleDocRoot(node)) { // handled } else { //print uninterpreted source {@tagname ...} for unknown tags int start = node.getStartPosition(); String text = fSource.substring(start, start + node.getLength()); fBuf.append(removeDocLineIntros(text)); } if (isCode) { fBuf.append("</code>"); //$NON-NLS-1$ } if (isLiteral || isCode) { fLiteralContent--; } }