Package org.eclipse.php.internal.core.ast.nodes

Examples of org.eclipse.php.internal.core.ast.nodes.FunctionInvocation.parameters()


    List<FunctionInvocation> invocations = getAllOfType(program,
        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionInvocation functionInvocation = invocations.get(0);
    functionInvocation.parameters().add(ast.newVariable("aaa"));
    rewrite();
    checkResult("<?php foo($aaa ); ?>");
  }

  public void testFunctionInvocationAddParams() throws Exception {
View Full Code Here


    List<FunctionInvocation> invocations = getAllOfType(program,
        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionInvocation functionInvocation = invocations.get(0);
    functionInvocation.parameters().add(ast.newVariable("aaa"));
    functionInvocation.parameters().add(ast.newVariable("bbb"));
    functionInvocation.parameters().add(ast.newVariable("ccc"));
    rewrite();
    checkResult("<?php foo($aaa, $bbb, $ccc); ?>");
  }
View Full Code Here

    List<FunctionInvocation> invocations = getAllOfType(program,
        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionInvocation functionInvocation = invocations.get(0);
    functionInvocation.parameters().add(ast.newVariable("aaa"));
    functionInvocation.parameters().add(ast.newVariable("bbb"));
    functionInvocation.parameters().add(ast.newVariable("ccc"));
    rewrite();
    checkResult("<?php foo($aaa, $bbb, $ccc); ?>");
  }
View Full Code Here

        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionInvocation functionInvocation = invocations.get(0);
    functionInvocation.parameters().add(ast.newVariable("aaa"));
    functionInvocation.parameters().add(ast.newVariable("bbb"));
    functionInvocation.parameters().add(ast.newVariable("ccc"));
    rewrite();
    checkResult("<?php foo($aaa, $bbb, $ccc); ?>");
  }

  public void testFunctionInvocationRemoveParam1() throws Exception {
View Full Code Here

    List<FunctionInvocation> invocations = getAllOfType(program,
        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionInvocation functionInvocation = invocations.get(0);
    functionInvocation.parameters().remove(1);
    rewrite();
    checkResult("<?php foo($aaa); ?>");
  }

  public void testFunctionInvocationRemoveParam2() throws Exception {
View Full Code Here

    List<FunctionInvocation> invocations = getAllOfType(program,
        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionInvocation functionInvocation = invocations.get(0);
    functionInvocation.parameters().remove(0);
    rewrite();
    checkResult("<?php foo($bbb); ?>");
  }

  public void testFunctionInvocationRemoveParams() throws Exception {
View Full Code Here

    List<FunctionInvocation> invocations = getAllOfType(program,
        FunctionInvocation.class);
    Assert.assertTrue("Unexpected list size.", invocations.size() == 1);
    FunctionInvocation functionInvocation = invocations.get(0);
    functionInvocation.parameters().clear();
    rewrite();
    checkResult("<?php foo(); ?>");
  }

  public void testVariable3() throws Exception {
View Full Code Here

      public void manipulate(Program program) {
        ExpressionStatement statement = (ExpressionStatement) program
            .statements().get(0);
        FunctionInvocation functionInvocation = (FunctionInvocation) statement
            .getExpression();
        functionInvocation.parameters().remove(0);
      }
    });
  }

  public void testFunctionInvocationWithParamsLast() throws Exception {
View Full Code Here

      public void manipulate(Program program) {
        ExpressionStatement statement = (ExpressionStatement) program
            .statements().get(0);
        FunctionInvocation functionInvocation = (FunctionInvocation) statement
            .getExpression();
        functionInvocation.parameters().remove(4);
      }
    });
  }

  public void testFunctionInvocationWithParamsMiddle() throws Exception {
View Full Code Here

      public void manipulate(Program program) {
        ExpressionStatement statement = (ExpressionStatement) program
            .statements().get(0);
        FunctionInvocation functionInvocation = (FunctionInvocation) statement
            .getExpression();
        functionInvocation.parameters().remove(2);
      }
    });
  }

  public void testClassRemove() throws Exception {
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.