private static String getHTMLContentFromSource(IJavaElement element) throws JavaModelException { IMember member; if (element instanceof ILocalVariable) { member = ((ILocalVariable) element).getDeclaringMember(); } else if (element instanceof ITypeParameter) { member = ((ITypeParameter) element).getDeclaringMember(); } else if (element instanceof IMember) { member = (IMember) element; } else { return null; } IBuffer buf = member.getOpenable().getBuffer(); if (buf == null) { return null; // no source attachment found } ISourceRange javadocRange = member.getJavadocRange(); if (javadocRange == null) { if (canInheritJavadoc(member)) { // Try to use the inheritDoc algorithm. String inheritedJavadoc = javadoc2HTML(member, element, "/***/"); //$NON-NLS-1$ if (inheritedJavadoc != null && inheritedJavadoc.length() > 0) { return inheritedJavadoc; } } return getJavaFxPropertyDoc(member); } String rawJavadoc = buf.getText(javadocRange.getOffset(), javadocRange.getLength()); return javadoc2HTML(member, element, rawJavadoc); }
private static String getHTMLContentFromSource(IJavaElement element) throws JavaModelException { IMember member; if (element instanceof ILocalVariable) { member= ((ILocalVariable) element).getDeclaringMember(); } else if (element instanceof ITypeParameter) { member= ((ITypeParameter) element).getDeclaringMember(); } else if (element instanceof IMember) { member= (IMember) element; } else { return null; } IBuffer buf= member.getOpenable().getBuffer(); if (buf == null) { return null; // no source attachment found } ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange == null) { if (canInheritJavadoc(member)) { // Try to use the inheritDoc algorithm. String inheritedJavadoc= javadoc2HTML(member, element, "/***/"); //$NON-NLS-1$ if (inheritedJavadoc != null && inheritedJavadoc.length() > 0) { return inheritedJavadoc; } } return getJavaFxPropertyDoc(member); } String rawJavadoc= buf.getText(javadocRange.getOffset(), javadocRange.getLength()); return javadoc2HTML(member, element, rawJavadoc); }
private static String getHTMLContentFromSource(IJavaElement element) throws JavaModelException { IMember member; if (element instanceof ILocalVariable) { member= ((ILocalVariable) element).getDeclaringMember(); } else if (element instanceof ITypeParameter) { member= ((ITypeParameter) element).getDeclaringMember(); } else if (element instanceof IMember) { member= (IMember) element; } else { return null; } IBuffer buf= member.getOpenable().getBuffer(); if (buf == null) { return null; // no source attachment found } ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange == null) { if (canInheritJavadoc(member)) { // Try to use the inheritDoc algorithm. String inheritedJavadoc= javadoc2HTML(member, element, "/***/"); //$NON-NLS-1$ if (inheritedJavadoc != null && inheritedJavadoc.length() > 0) { return inheritedJavadoc; } } return getJavaFxPropertyDoc(member); } String rawJavadoc= buf.getText(javadocRange.getOffset(), javadocRange.getLength()); return javadoc2HTML(member, element, rawJavadoc); }
/** * Gets a reader for an IMember's Javadoc comment content from the source attachment. * The content does contain only the text from the comment without the Javadoc leading star characters. * Returns <code>null</code> if the member does not contain a Javadoc comment or if no source is available. * @param member The member to get the Javadoc of. * @return Returns a reader for the Javadoc comment content or <code>null</code> if the member * does not contain a Javadoc comment or if no source is available * @throws JavaModelException is thrown when the elements javadoc can not be accessed * @since 3.4 */ private static Reader internalGetContentReader(IMember member) throws JavaModelException { IBuffer buf= member.getOpenable().getBuffer(); if (buf == null) { return null; // no source attachment found } ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange != null) { JavaDocCommentReader reader= new JavaDocCommentReader(buf, javadocRange.getOffset(), javadocRange.getOffset() + javadocRange.getLength() - 1); if (!containsOnlyInheritDoc(reader, javadocRange.getLength())) { reader.reset(); return reader; } } return null; }
/** * Gets a reader for an IMember's Javadoc comment content from the source attachment. * The content does contain only the text from the comment without the Javadoc leading star characters. * Returns <code>null</code> if the member does not contain a Javadoc comment or if no source is available. * @param member The member to get the Javadoc of. * @return Returns a reader for the Javadoc comment content or <code>null</code> if the member * does not contain a Javadoc comment or if no source is available * @throws JavaModelException is thrown when the elements javadoc can not be accessed * @since 3.4 */ private static Reader internalGetContentReader(IMember member) throws JavaModelException { IBuffer buf= member.getOpenable().getBuffer(); if (buf == null) { return null; // no source attachment found } ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange != null) { JavaDocCommentReader reader= new JavaDocCommentReader(buf, javadocRange.getOffset(), javadocRange.getOffset() + javadocRange.getLength() - 1); if (!containsOnlyInheritDoc(reader, javadocRange.getLength())) { reader.reset(); return reader; } } return null; }
/** * Gets a reader for an IMember's Javadoc comment content from the source attachment. * The content does contain only the text from the comment without the Javadoc leading star characters. * Returns <code>null</code> if the member does not contain a Javadoc comment or if no source is available. * @param member The member to get the Javadoc of. * @return Returns a reader for the Javadoc comment content or <code>null</code> if the member * does not contain a Javadoc comment or if no source is available * @throws JavaModelException is thrown when the elements javadoc can not be accessed * @since 3.4 */ private static Reader internalGetContentReader(IMember member) throws JavaModelException { IBuffer buf= member.getOpenable().getBuffer(); if (buf == null) { return null; // no source attachment found } ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange != null) { JavaDocCommentReader reader= new JavaDocCommentReader(buf, javadocRange.getOffset(), javadocRange.getOffset() + javadocRange.getLength() - 1); if (!containsOnlyInheritDoc(reader, javadocRange.getLength())) { reader.reset(); return reader; } } return null; }
/** * Gets a reader for an IMember's Javadoc comment content from the source attachment. * The content does contain only the text from the comment without the Javadoc leading star characters. * Returns <code>null</code> if the member does not contain a Javadoc comment or if no source is available. * @param member The member to get the Javadoc of. * @return Returns a reader for the Javadoc comment content or <code>null</code> if the member * does not contain a Javadoc comment or if no source is available * @throws JavaModelException is thrown when the elements javadoc can not be accessed * @since 3.4 */ private static Reader internalGetContentReader(IMember member) throws JavaModelException { IBuffer buf= member.getOpenable().getBuffer(); if (buf == null) { return null; // no source attachment found } ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange != null) { JavaDocCommentReader reader= new JavaDocCommentReader(buf, javadocRange.getOffset(), javadocRange.getOffset() + javadocRange.getLength() - 1); if (!containsOnlyInheritDoc(reader, javadocRange.getLength())) { reader.reset(); return reader; } } return null; }
ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange == null) return InheritDocVisitor.CONTINUE; // this method doesn't have javadoc, continue to look.
ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange == null) return InheritDocVisitor.CONTINUE; // this method doesn't have javadoc, continue to look.
ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange == null) return InheritDocVisitor.CONTINUE; // this method doesn't have javadoc, continue to look.
ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange == null) return InheritDocVisitor.CONTINUE; // this method doesn't have javadoc, continue to look.
ISourceRange javadocRange= member.getJavadocRange(); if (javadocRange == null) return InheritDocVisitor.CONTINUE; // this method doesn't have javadoc, continue to look.