List of usage examples for org.eclipse.jdt.internal.core JavadocConstants H2_SUFFIX_LENGTH
int H2_SUFFIX_LENGTH
To view the source code for org.eclipse.jdt.internal.core JavadocConstants H2_SUFFIX_LENGTH.
Click Source Link
From source file:com.codenvy.ide.ext.java.server.internal.core.JavadocContents.java
License:Open Source License
public String getPackageDoc() throws JavaModelException { if (this.content == null) return null; int[] range = null; int index = CharOperation.indexOf(JavadocConstants.PACKAGE_DESCRIPTION_START, this.content, false, 0); if (index == -1) return null; index = CharOperation.indexOf(JavadocConstants.ANCHOR_SUFFIX, this.content, false, index); if (index == -1) return null; int start = CharOperation.indexOf(JavadocConstants.H2_PREFIX, this.content, false, index); if (start != -1) { start = CharOperation.indexOf(JavadocConstants.H2_SUFFIX, this.content, false, start); if (start != -1) index = start + JavadocConstants.H2_SUFFIX_LENGTH; }//w ww . j av a 2 s . c o m if (index != -1) { int end = CharOperation.indexOf(JavadocConstants.BOTTOM_NAVBAR, this.content, false, index); if (end == -1) end = this.content.length - 1; range = new int[] { index, end }; return String.valueOf(CharOperation.subarray(this.content, range[0], range[1])); } return null; }