Examples of fragments()


Examples of org.eclipse.jdt.core.dom.MethodDeclaration.fragments()

                  decl, assistContext));
            }
          }
          else if (node instanceof FieldDeclaration) {
            FieldDeclaration decl = (FieldDeclaration) node;
            List<VariableDeclarationFragment> fragments = decl.fragments();
            // SimpleName name = fragments.get(0).getName();
            if (fragments.size() > 0) {
              if (problemType.equals(AutowireDependencyProvider.TOO_MANY_MATCHING_BEANS)) {
                proposals.addAll(new QualifierAnnotationQuickAssistProcessor().getAssists(decl,
                    assistContext));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

        if (m_class instanceof AbstractTypeDeclaration) {
            Javadoc javadoc = getAST().newJavadoc();
            TextElement element = getAST().newTextElement();
            element.setText(text);
            TagElement tag = getAST().newTagElement();
            tag.fragments().add(element);
            javadoc.tags().add(tag);
            ((AbstractTypeDeclaration)m_class).setJavadoc(javadoc);
        } else {
            throw new IllegalStateException("Internal error - cannot add JavaDoc to non-class type");
        }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

        if (doc != null) {
            Javadoc javadoc = getAST().newJavadoc();
            TextElement element = getAST().newTextElement();
            element.setText(doc);
            TagElement tag = getAST().newTagElement();
            tag.fragments().add(element);
            javadoc.tags().add(tag);
            decl.setJavadoc(javadoc);
        }
    }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

            AST ast = m_source.getAST();
            TextElement element = ast.newTextElement();
            element.setText(text);
            TagElement tag = ast.newTagElement();
            tag.setTagName(name);
            tag.fragments().add(element);
            Javadoc javadoc = m_declaration.getJavadoc();
            if (javadoc == null) {
                javadoc = ast.newJavadoc();
                m_declaration.setJavadoc(javadoc);
            }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

            Javadoc comment = ast.newJavadoc();
            TagElement tag = ast.newTagElement();
            TextElement text = ast.newTextElement();
            text.setText("Generated class for method "
                + methodDec.getName());
            tag.fragments().add(text);
            comment.tags().add(tag);
            type.setJavadoc(comment);
            type.setInterface(false);
            type.modifiers()
                .add(ast.newModifier(Modifier.ModifierKeyword.PUBLIC_KEYWORD));
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

          TagElement tag = (TagElement) o;
          JavadocTagElement e = factory.createJavadocTagElement();
          e.setName(tag.getTagName());
         
          // recurse to create parents           
          e.getFragments().addAll(handleTagFragment(tag.fragments(), javaReference));
         
          // link up any references to model elements
          handleModelReferences(e, javaReference);
         
          result.add(e);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

              for (Iterator<TagElement> tagIter = tags.iterator(); tagIter.hasNext();) {
                TagElement tag = tagIter.next();
                if ("@gwt.typeArgs".equals(tag.getTagName())) {
                  tagIter.remove();
                } else if ("@return".equals(tag.getTagName())) {
                  if (!tag.fragments().isEmpty()) {
                    tag.setTagName("@param callback the callback to return");
                  } else {
                    tagIter.remove();
                  }
                } else if ("@wbp.gwt.Request".equals(tag.getTagName())) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

  private ASTNode createNode(AST ast) {
    TagElement tag = ast.newTagElement();
    tag.setTagName(TagElement.TAG_SEE);
    MethodRef method = ast.newMethodRef();
    tag.fragments().add(method);
    SimpleName name = ast.newSimpleName("Test");
    method.setQualifier(ast.newQualifiedName(ast.newQualifiedName(ast.newName("org"), ast.newSimpleName("junit")), name));
    name = ast.newSimpleName("setUp");
    method.setName(name);
    return tag;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

        AST ast = doc.getAST();
        TagElement tag = ast.newTagElement();
        tag.setTagName(TagElement.TAG_SEE);
        doc.tags().add(tag);
        MethodRef method = ast.newMethodRef();
        tag.fragments().add(method);
        SimpleName name = ast.newSimpleName("Test");
        method.setQualifier(ast.newQualifiedName(ast.newQualifiedName(ast.newName("org"), ast.newSimpleName("junit")), name));
        name = ast.newSimpleName("test");
        method.setName(name);
        return super.visit(doc);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.TagElement.fragments()

          TextElement authorText = javadoc.getAST().newTextElement();
          authorText.setText(author);
          authorTag.setTagName(TagElement.TAG_AUTHOR);

          @SuppressWarnings("unchecked")
          List<ASTNode> fragments = authorTag.fragments();
          fragments.add(authorText);
          tags.add(index, authorTag);
        }

        // add the version tag if it doesn't exist.
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.