Examples of newVariable()


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

    method.setFunction(functionDec);
   
    ASTRewrite rewriter = ASTRewrite.create(ast);
   
    ListRewrite classListRewrite = rewriter.getListRewrite( fCoveringDeclarationFinder.getCoveringClassDeclaration().getBody(), Block.STATEMENTS_PROPERTY);
    VariableBase dispatcher = ast.newVariable(THIS_VARIABLE_NAME);
    FunctionInvocation calledExtractedMethod = ast.newFunctionInvocation(ast.newFunctionName(ast.newIdentifier(fMethodName)), computeParameters(ast));
    MethodInvocation inlineMethodCall = ast.newMethodInvocation(dispatcher, calledExtractedMethod);

    List<List<ASTNode>> Occurences = new ArrayList<List<ASTNode>>();
   
View Full Code Here

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

        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.newVariable()

    ASTRewrite astRewrite = ASTRewrite.create(ast);
    String[] names = possibleNames(expression);
    for (int i = 0; i < names.length; i++) {
      linkedModel.getPositionGroup(KEY_NAME, true).addProposal(names[0], null, 10);
    }
    Variable variable = ast.newVariable(names[0]);
   
    Assignment assign = ast.newAssignment(variable, Assignment.OP_EQUAL, (Expression) astRewrite.createCopyTarget(expression));
    astRewrite.replace(expression, assign, editGroup);

    linkedModel.getPositionGroup(KEY_NAME, true).addPosition(astRewrite.track(variable.getName()), true);
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.