Package org.eclipse.jdt.core.dom

Examples of org.eclipse.jdt.core.dom.Javadoc


      // re-grab the compilation unit + node so we can get the javadoc node w/
      // its position and length set.
      cu = ASTUtils.getCompilationUnit(src, true);
      node = ASTUtils.findNode(cu, offset, element);
      Javadoc javadoc = (node instanceof PackageDeclaration) ?
        ((PackageDeclaration)node).getJavadoc() :
        ((BodyDeclaration)node).getJavadoc();
      JavaUtils.format(
          src, CodeFormatter.K_COMPILATION_UNIT,
          javadoc.getStartPosition(), javadoc.getLength());
    }

    return null;
  }
View Full Code Here


   * @param element The IJavaElement this node corresponds to.
   */
  private void comment(ICompilationUnit src, ASTNode node, IJavaElement element)
    throws Exception
  {
    Javadoc javadoc = null;
    boolean isNew = false;
    if (node instanceof PackageDeclaration){
      javadoc = ((PackageDeclaration)node).getJavadoc();
      if(javadoc == null){
        isNew = true;
View Full Code Here

    if (defaultPackage) {
      // remove existing package statement
      PackageDeclaration pkg = astCU.getPackage();
      if (pkg != null) {
        int pkgStart;
        Javadoc javadoc = pkg.getJavadoc();
        if (javadoc != null) {
          pkgStart = javadoc.getStartPosition() + javadoc.getLength() + 1;
        } else {
          pkgStart = pkg.getStartPosition();
        }
        int extendedStart = astCU.getExtendedStartPosition(pkg);
        if (pkgStart != extendedStart) {
View Full Code Here

     */
   
    int altStartPos = thisNode.getStartPosition();
    log("1.Altspos " + altStartPos);
    thisNode = thisNode.getParent();
    Javadoc jd = null;
   
    /*
     * There's another case that needs to be handled. If a TD, MD or FD
     * contains javadoc comments(multi or single line) the starting position
     * of the javadoc is treated as the beginning of the declaration by the AST parser.
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private boolean isGenerated(BodyDeclaration node) {
        boolean rc = false;
        Javadoc jd = node.getJavadoc();
        if (jd != null) {
            List<TagElement> tags = jd.tags();
            for (TagElement tag : tags) {
                String tagName = tag.getTagName();
                if (tagName == null) {
                    continue;
                }
View Full Code Here

    }

    @SuppressWarnings("unchecked")
    private boolean isGenerated(BodyDeclaration node) {
        boolean rc = false;
        Javadoc jd = node.getJavadoc();
        if (jd != null) {
            List<TagElement> tags = jd.tags();
            for (TagElement tag : tags) {
                String tagName = tag.getTagName();
                if (tagName == null) {
                    continue;
                }
View Full Code Here

TOP

Related Classes of org.eclipse.jdt.core.dom.Javadoc

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.