private Reader getHTMLContentReader(IMember member, IProgressMonitor monitor) throws JavaModelException { Reader contentReader= JavadocContentAccess.getContentReader(member, true); if (contentReader != null) return new JavaDoc2HTMLTextReader(contentReader); if (true && member.getOpenable().getBuffer() == null) { // only if no source available String s= member.getAttachedJavadoc(monitor); if (s != null) return new StringReader(s); } return null; }
/** * Returns the IBuffer for the IMember represented by this CallLocation. * * @return IBuffer for the IMember or null if the member doesn't have a buffer (for * example if it is a binary file without source attachment). */ private IBuffer getBufferForMember() { IBuffer buffer = null; try { IOpenable openable = fMember.getOpenable(); if (openable != null && fMember.exists()) { buffer = openable.getBuffer(); } } catch (JavaModelException e) { JavaPlugin.log(e); } return buffer; }
/** * Returns the IBuffer for the IMember represented by this CallLocation. * * @return IBuffer for the IMember or null if the member doesn't have a buffer (for * example if it is a binary file without source attachment). */ private IBuffer getBufferForMember() { IBuffer buffer = null; try { IOpenable openable = fMember.getOpenable(); if (openable != null && fMember.exists()) { buffer = openable.getBuffer(); } } catch (JavaModelException e) { JavaPlugin.log(e); } return buffer; }
/** * Returns the IBuffer for the IMember represented by this CallLocation. * * @return IBuffer for the IMember or null if the member doesn't have a buffer (for * example if it is a binary file without source attachment). */ private IBuffer getBufferForMember() { IBuffer buffer = null; try { IOpenable openable = fMember.getOpenable(); if (openable != null && fMember.exists()) { buffer = openable.getBuffer(); } } catch (JavaModelException e) { JavaPlugin.log(e); } return buffer; }
if (useAttachedJavadoc && member.getOpenable().getBuffer() == null) { // only if no source available String s= member.getAttachedJavadoc(null); if (s != null) {
/** * Gets a reader for an IMember's Javadoc comment content from the source attachment. * and renders the tags in HTML. * 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. * @param allowInherited for methods with no (Javadoc) comment, the comment of the overridden * class is returned if <code>allowInherited</code> is <code>true</code> * @param useAttachedJavadoc if <code>true</code> Javadoc will be extracted from attached Javadoc * if there's no source * @return a reader for the Javadoc comment content in HTML 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.2 */ public static Reader getHTMLContentReader(IMember member, boolean allowInherited, boolean useAttachedJavadoc) throws JavaModelException { Reader contentReader= internalGetContentReader(member); if (contentReader != null) return new JavaDoc2HTMLTextReader(contentReader); if (useAttachedJavadoc && member.getOpenable().getBuffer() == null) { // only if no source available String s= member.getAttachedJavadoc(null); if (s != null) return new StringReader(s); } if (allowInherited && (member.getElementType() == IJavaElement.METHOD)) return findDocInHierarchy((IMethod) member, true, useAttachedJavadoc); return null; }
/** * Gets a reader for an IMember's Javadoc comment content from the source attachment. * and renders the tags in HTML. * 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. * @param allowInherited for methods with no (Javadoc) comment, the comment of the overridden * class is returned if <code>allowInherited</code> is <code>true</code> * @param useAttachedJavadoc if <code>true</code> Javadoc will be extracted from attached Javadoc * if there's no source * @return a reader for the Javadoc comment content in HTML 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.2 */ public static Reader getHTMLContentReader(IMember member, boolean allowInherited, boolean useAttachedJavadoc) throws JavaModelException { Reader contentReader= internalGetContentReader(member); if (contentReader != null) return new JavaDoc2HTMLTextReader(contentReader); if (useAttachedJavadoc && member.getOpenable().getBuffer() == null) { // only if no source available String s= member.getAttachedJavadoc(null); if (s != null) return new StringReader(s); } if (allowInherited && (member.getElementType() == IJavaElement.METHOD)) return findDocInHierarchy((IMethod) member, true, useAttachedJavadoc); return null; }
return new JavaDoc2HTMLTextReader(contentReader); if (useAttachedJavadoc && member.getOpenable().getBuffer() == null) { // only if no source available String s= member.getAttachedJavadoc(null); if (s != null)
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; }
IOpenable openable = member.getOpenable(); if (openable == null) return InheritDocVisitor.CONTINUE;
IOpenable openable = member.getOpenable(); if (openable == null) return InheritDocVisitor.CONTINUE;
IOpenable openable = member.getOpenable(); if (openable == null) return InheritDocVisitor.CONTINUE;
IOpenable openable = member.getOpenable(); if (openable == null) return InheritDocVisitor.CONTINUE;
IOpenable openable = member.getOpenable(); if (openable == null) return InheritDocVisitor.CONTINUE;