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

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


    super(name);
  }

  protected Program createProgram(IFile file) {
    ISourceModule sourceModule = DLTKCore.createSourceModuleFrom(file);
    Program program = null;
    try {
      program = createProgramFromSource(sourceModule);
 
    } catch (Exception e) {
      fail(e.getMessage());
View Full Code Here


    Assert.assertFalse(node.subtreeMatch(new PHPASTMatcher(), null));
  }

  private ASTNode getAstNode(String str) throws Exception {
    StringReader reader = new StringReader(str);
    Program program = ASTParser.newParser(reader, PHPVersion.PHP5,
        ProjectOptions.useShortTags((IProject) null)).createAST(
        new NullProgressMonitor());
    List<Statement> statements = program.statements();

    Assert.assertNotNull(statements);
    Assert.assertTrue(statements.size() > 0);

    // the statement that we want to test
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    // select the class name.
    int start = 13;
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    // select the class name.
    int start = 63;
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    // select the class name.
    int start = 68;
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    // select the class name.
    int start = 6;
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    // select the class name.
    int start = 6;
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    assertEquals(PhpElementConciliator.CONCILIATOR_PROGRAM,
        PhpElementConciliator.concile(program));
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    // select the variable declaration.
    int start = 7;
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    int start = 48;
    ASTNode selectedNode = locateNode(program, start, 0);
View Full Code Here

TOP

Related Classes of org.eclipse.php.internal.core.ast.nodes.Program

Copyright © 2018 www.massapicom. 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.