Examples of FunctionInvocation


Examples of org.eclipse.php.internal.core.ast.nodes.FunctionInvocation

    String expected = "<?php $foo($a, 's<>&', true, __CLASS__); ?>";
    parseAndCompare(str, expected, new ICodeManiplator() {
      public void manipulate(Program program) {
        ExpressionStatement statement = (ExpressionStatement) program
            .statements().get(0);
        FunctionInvocation functionInvocation = (FunctionInvocation) statement
            .getExpression();
        functionInvocation.parameters().remove(2);
      }
    });
  }
View Full Code Here

Examples of org.netbeans.modules.php.editor.parser.astnodes.FunctionInvocation

        }

        @Override
        public void visit(MethodInvocation node) {
            super.visit(node);
            FunctionInvocation fi = node.getMethod();
            String invokedMethodName = CodeUtils.extractFunctionName(fi);
            if (!invokedMethodName.equals("render")) { // NOI18N
                return;
            }
            if (!methodName.equals(YiiUtils.getActionMethodName(viewName))) {
                return;
            }
            if (!(node.getDispatcher() instanceof Variable)
                    || !"$this".equals(CodeUtils.extractVariableName((Variable) node.getDispatcher()))) { // NOI18N
                return;
            }

            List<Expression> params = fi.getParameters();
            Expression expression;

            if (params.size() > 1) {
                expression = params.get(1);
            } else {
View Full Code Here

Examples of org.netbeans.modules.php.editor.parser.astnodes.FunctionInvocation

        Expression classNameExpression = node.getClassName();
        String className = CodeUtils.extractQualifiedName(classNameExpression);
        if (!VIEW_CLASS.equals(className) && !VIEW_MODEL_CLASS.equals(className)) {
            return;
        }
        FunctionInvocation fi = node.getMethod();
        String invokedMethodName = CodeUtils.extractFunctionName(fi);
        if (!FORGE_METHOD.equals(invokedMethodName)) {
            return;
        }
        // get method parameters
        List<Expression> parameters = fi.getParameters();
        Expression e = null;
        if (!parameters.isEmpty()) {
            e = parameters.get(0);
        }
        String path = ""; // NOI18N
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.