Examples of newExpressionStatement()


Examples of org.eclipse.jdt.core.dom.AST.newExpressionStatement()

        MethodDeclaration method = getMethodDeclaration(type, bug.getPrimaryMethod());

        AST ast = rewrite.getAST();

        SuperMethodInvocation superCall = createSuperMethodInvocation(rewrite, method);
        ExpressionStatement statement = ast.newExpressionStatement(superCall);
        Block methodBody = method.getBody();
        ListRewrite listRewrite = rewrite.getListRewrite(methodBody, Block.STATEMENTS_PROPERTY);
        if (isInsertFirst()) {
            listRewrite.insertFirst(statement, null);
        } else {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newExpressionStatement()

            ClassInstanceCreation proxy = ast.newClassInstanceCreation();
            proxy
                    .setType(ast.newSimpleType(ast
                            .newSimpleName(_getProxyName())));
            addInvocation.arguments().add(proxy);
            body.statements().add(ast.newExpressionStatement(addInvocation));
            bodyDeclarations.add(initializer);

            if (declarationRecord != null) {
                declarationRecord._addExtendedDeclaration(initializer);
            }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newExpressionStatement()

    md.setBody(block);

    MethodInvocation mi = ast.newMethodInvocation();
    mi.setName(ast.newSimpleName("x"));

    ExpressionStatement e = ast.newExpressionStatement(mi);
    block.statements().add(e);

    System.out.println(cu);
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.AST.newExpressionStatement()

    md.setBody(block);

    MethodInvocation mi = ast.newMethodInvocation();
    mi.setName(ast.newSimpleName("x"));

    ExpressionStatement e = ast.newExpressionStatement(mi);
    block.statements().add(e);

    System.out.println(cu);
  }
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.AST.newExpressionStatement()

       
        lrw = rewriter.getListRewrite(parent, Block.STATEMENTS_PROPERTY);
       
        ExpressionStatement inlineReplacement;
        if (fReturnStatement != null) {
          inlineReplacement = ast.newExpressionStatement(ast.newAssignment(
              ast.newVariable(fReturnStatement.getParameterName()),
              Assignment.OP_EQUAL, inlineMethodCall));
        } else {
          inlineReplacement = ast.newExpressionStatement(inlineMethodCall);
        }
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.AST.newExpressionStatement()

        if (fReturnStatement != null) {
          inlineReplacement = ast.newExpressionStatement(ast.newAssignment(
              ast.newVariable(fReturnStatement.getParameterName()),
              Assignment.OP_EQUAL, inlineMethodCall));
        } else {
          inlineReplacement = ast.newExpressionStatement(inlineMethodCall);
        }
       
        lrw.replace(selectedNodeOccurence.get(0),inlineReplacement, inlineReplacementEditGroup);
 
        for (int i = 1; i < selectedNodeOccurence.size(); ++i) {
View Full Code Here

Examples of org.eclipse.php.internal.core.ast.nodes.AST.newExpressionStatement()

          if (relativeLocationFromIncludePath != null) {
            Include include = ast.newInclude(ast.newScalar("'" //$NON-NLS-1$
                + relativeLocationFromIncludePath.toString()
                + "'"), Include.IT_REQUIRE_ONCE); //$NON-NLS-1$
            program.statements().add(i,
                ast.newExpressionStatement(include));
            TextEdit edits = program.rewrite(document, null);
            edits.apply(document);
          }

        }
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.