/** * Returns the Javadoc for a PackageDeclaration. * * @param packageDeclaration the Java element whose Javadoc has to be retrieved * @return the package documentation in HTML format or <code>null</code> if there is no * associated Javadoc * @throws CoreException if the Java element does not exists or an exception occurs while * accessing the file containing the package Javadoc * @since 3.9 */ public static String getHTMLContent(IPackageDeclaration packageDeclaration) throws CoreException { IJavaElement element= packageDeclaration.getAncestor(IJavaElement.PACKAGE_FRAGMENT); if (element instanceof IPackageFragment) { return getHTMLContent((IPackageFragment) element); } return null; }
/** * Returns the Javadoc for a PackageDeclaration. * * @param packageDeclaration * the Java element whose Javadoc has to be retrieved * @return the package documentation in HTML format or <code>null</code> if * there is no associated Javadoc * @throws CoreException * if the Java element does not exists or an exception occurs while * accessing the file containing the package Javadoc * @since 3.9 */ public static String getHTMLContent(IPackageDeclaration packageDeclaration) throws CoreException { IJavaElement element = packageDeclaration.getAncestor(IJavaElement.PACKAGE_FRAGMENT); if (element instanceof IPackageFragment) { return getHTMLContent((IPackageFragment) element); } return null; }
/** * Returns the Javadoc for a PackageDeclaration. * * @param packageDeclaration the Java element whose Javadoc has to be retrieved * @return the package documentation in HTML format or <code>null</code> if there is no * associated Javadoc * @throws CoreException if the Java element does not exists or an exception occurs while * accessing the file containing the package Javadoc * @since 3.9 */ public static String getHTMLContent(IPackageDeclaration packageDeclaration) throws CoreException { IJavaElement element= packageDeclaration.getAncestor(IJavaElement.PACKAGE_FRAGMENT); if (element instanceof IPackageFragment) { return getHTMLContent((IPackageFragment) element); } return null; }