private static Javadoc getJavadocNode(IJavaElement element, String rawJavadoc) { //FIXME: take from SharedASTProvider if available //Caveat: Javadoc nodes are not available when Javadoc processing has been disabled! //https://bugs.eclipse.org/bugs/show_bug.cgi?id=212207 String source= rawJavadoc + "class C{}"; //$NON-NLS-1$ CompilationUnit root= createAST(element, source); if (root == null) return null; List<AbstractTypeDeclaration> types= root.types(); if (types.size() != 1) return null; AbstractTypeDeclaration type= types.get(0); return type.getJavadoc(); }
private static Javadoc getJavadocNode(IJavaElement element, String rawJavadoc) { //FIXME: take from SharedASTProvider if available //Caveat: Javadoc nodes are not available when Javadoc processing has been disabled! //https://bugs.eclipse.org/bugs/show_bug.cgi?id=212207 String source= rawJavadoc + "class C{}"; //$NON-NLS-1$ CompilationUnit root= createAST(element, source); if (root == null) return null; List<AbstractTypeDeclaration> types= root.types(); if (types.size() != 1) return null; AbstractTypeDeclaration type= types.get(0); return type.getJavadoc(); }
private static Javadoc getJavadocNode(IJavaElement element, String rawJavadoc) { //FIXME: take from SharedASTProvider if available //Caveat: Javadoc nodes are not available when Javadoc processing has been disabled! //https://bugs.eclipse.org/bugs/show_bug.cgi?id=212207 String source = rawJavadoc + "class C{}"; //$NON-NLS-1$ CompilationUnit root = createAST(element, source); if (root == null) { return null; } List<AbstractTypeDeclaration> types = root.types(); if (types.size() != 1) { return null; } AbstractTypeDeclaration type = types.get(0); return type.getJavadoc(); }
if (typeDeclaration.getJavadoc() != null) typeLine = typeLine.substring(typeDeclaration.getJavadoc().toString().length());