List of usage examples for org.eclipse.jdt.internal.core JavadocConstants ANCHOR_SUFFIX_LENGTH
int ANCHOR_SUFFIX_LENGTH
To view the source code for org.eclipse.jdt.internal.core JavadocConstants ANCHOR_SUFFIX_LENGTH.
Click Source Link
From source file:com.codenvy.ide.ext.java.server.internal.core.JavadocContents.java
License:Open Source License
private int[] computeChildRange(int anchorEndStart, char[] anchor, int indexOfBottom) { int[] range = null; // try to find the bottom of the section if (indexOfBottom != -1) { // try to find the end of the anchor int indexOfEndLink = CharOperation.indexOf(JavadocConstants.ANCHOR_SUFFIX, this.content, false, anchorEndStart + anchor.length); if (indexOfEndLink != -1) { // try to find the next anchor int indexOfNextElement = CharOperation.indexOf(JavadocConstants.ANCHOR_PREFIX_START, this.content, false, indexOfEndLink); int javadocStart = indexOfEndLink + JavadocConstants.ANCHOR_SUFFIX_LENGTH; int javadocEnd = indexOfNextElement == -1 ? indexOfBottom : Math.min(indexOfNextElement, indexOfBottom); range = new int[] { javadocStart, javadocEnd }; } else {//from w w w . ja v a2s .com // the anchor has no suffix range = UNKNOWN_FORMAT; } } else { // the detail section has no bottom range = UNKNOWN_FORMAT; } return range; }