Examples of Javadoc


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

        enumNode.setProperty(ClassFileSequencerLexicon.NAME, name);
        enumNode.setProperty(ClassFileSequencerLexicon.SEQUENCED_DATE, this.context.getTimestamp());
        enumNode.setProperty(ClassFileSequencerLexicon.INTERFACE, false);

        { // javadocs
            final Javadoc javadoc = enumType.getJavadoc();

            if (javadoc != null) {
                record(javadoc, enumNode);
            }
        }
View Full Code Here

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

        final Node fieldNode = parentNode.addNode(name, ClassFileSequencerLexicon.FIELD);
        fieldNode.setProperty(ClassFileSequencerLexicon.NAME, name);

        { // javadocs
            final Javadoc javadoc = field.getJavadoc();

            if (javadoc != null) {
                record(javadoc, fieldNode);
            }
        }
View Full Code Here

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

        final String name = method.getName().getFullyQualifiedName();
        final Node methodNode = parentNode.addNode(name, ClassFileSequencerLexicon.METHOD);
        methodNode.setProperty(ClassFileSequencerLexicon.NAME, name);

        { // javadocs
            final Javadoc javadoc = method.getJavadoc();

            if (javadoc != null) {
                record(javadoc, methodNode);
            }
        }
View Full Code Here

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

                typeNode.setProperty(ClassFileSequencerLexicon.INTERFACES, interfaceNames);
            }
        }

        { // javadocs
            final Javadoc javadoc = type.getJavadoc();

            if (javadoc != null) {
                record(javadoc, typeNode);
            }
        }
View Full Code Here

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

                }
            }
        }

        { // Javadocs
            final Javadoc javadoc = pkg.getJavadoc();

            if (javadoc != null) {
                record(javadoc, pkgNode);
            }
        }
View Full Code Here

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

    if (cu != null) {
      ASTNode[] nodes = ASTNodeSearchUtil.getDeclarationNodes(element, cu);
      if (nodes != null && nodes.length > 0){
        int offset = nodes[0].getStartPosition();
        if (nodes[0] instanceof BodyDeclaration){
          Javadoc docs = ((BodyDeclaration)nodes[0]).getJavadoc();
          if (docs != null){
            offset += docs.getLength() + 1;
          }
        }
        return offset;
      }
    }
View Full Code Here

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

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

   * @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

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

    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

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

     */
   
    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
TOP
Copyright © 2018 www.massapi.com. 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.