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

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


   */
  public void parseAndCompareInner(String programStr, int index)
      throws Exception {
    final IDocument document = new Document(programStr);
    final Reader reader = new StringReader(programStr);
    Program program = ASTParser.newParser(reader, PHPVersion.PHP5,
        ProjectOptions.useShortTags((IProject) null)).createAST(
        new NullProgressMonitor());

    program.initCommentMapper(document, new PhpAstLexer(reader));

    final ClassDeclaration node = (ClassDeclaration) program.statements()
        .get(0);
    final Statement statement = node.getBody().statements().get(index);

    final int extendedLength = program.getExtendedLength(statement);

    assert extendedLength > statement.getLength();
  }
View Full Code Here


         * Checks if the expression that is located in the given offset
         * is static scalar
         */
        protected void runTest() throws Exception {
          StringReader reader = new StringReader(str);
          Program program = ASTParser.newParser(reader,
              PHPVersion.PHP5,
              ProjectOptions.useShortTags((IProject) null))
              .createAST(new NullProgressMonitor());

          final ASTNode locateNode = Locator.locateNode(program,
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

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

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

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

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

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

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

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

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    // select the class name.
    int start = 25;
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 = 26;
View Full Code Here

      fail(e.getMessage());
    }

    assertNotNull(file);

    Program program = createProgram(file);

    assertNotNull(program);

    int start = 67;
    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.