Examples of insertFirst()


Examples of org.eclipse.jdt.core.dom.rewrite.ListRewrite.insertFirst()

    pathVariableName.setLiteralValue(variable.getVariableName());
    annotation.setValue(pathVariableName);
    addLinkedPosition(new StringLiteralTrackedPosition(astRewrite.track(pathVariableName)), false, "variableName");

    ListRewrite listRewrite = astRewrite.getListRewrite(paramDecl, SingleVariableDeclaration.MODIFIERS2_PROPERTY);
    listRewrite.insertFirst(annotation, null);

    listRewrite = astRewrite.getListRewrite(methodDecl, MethodDeclaration.PARAMETERS_PROPERTY);
    listRewrite.insertLast(paramDecl, null);

    return astRewrite;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.rewrite.ListRewrite.insertFirst()

        pair.setName(annotationAST.newSimpleName("method"));

        QualifiedName valueName = annotationAST.newQualifiedName(annotationAST.newSimpleName("RequestMethod"),
            annotationAST.newSimpleName(methodTypeString));
        pair.setValue(valueName);
        listRewrite.insertFirst(pair, null);
      }

      astRewrite.getListRewrite(decl, MethodDeclaration.MODIFIERS2_PROPERTY).insertFirst(annotation, null);

      edit.addChild(astRewrite.rewriteAST());
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.rewrite.ListRewrite.insertFirst()

    Block block = blocks.get(0);
    ListRewrite listRewrite = rewrite.getListRewrite(block,
        Block.STATEMENTS_PROPERTY);
    ASTNode placeHolder = rewrite.createStringPlaceholder("//mycomment",
        ASTNode.COMMENT);
    listRewrite.insertFirst(placeHolder, null);

    TextEdit textEdits = rewrite.rewriteAST(document, null);
    textEdits.apply(document);
    checkResult("<?php\n class A { \n  //mycomment\n  public function foo(int $a){}\n }?> ");
  }
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.