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

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


        new NullProgressMonitor());
    try {

      ExpressionStatement statement = (ExpressionStatement) program
          .statements().get(0);
      Include include = (Include) statement.getExpression();

      IBinding sourceBinding = include.resolveBinding();

      Assert.assertTrue(sourceBinding.getName().equals("myFile.php") == true);
      Assert.assertTrue(sourceBinding.getPHPElement().getElementType() == IModelElement.SOURCE_MODULE);
      Assert.assertTrue(sourceBinding.getKind() == IBinding.INCLUDE);
View Full Code Here


          // resolve the relative path from include path
          String relativeLocationFromIncludePath = getFileName(
              fileNames[i], sourceModule);

          if (relativeLocationFromIncludePath != null) {
            Include include = ast.newInclude(ast.newScalar("'" //$NON-NLS-1$
                + relativeLocationFromIncludePath.toString()
                + "'"), Include.IT_REQUIRE_ONCE); //$NON-NLS-1$
            program.statements().add(i,
                ast.newExpressionStatement(include));
            TextEdit edits = program.rewrite(document, null);
View Full Code Here

TOP

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

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.