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

Examples of org.eclipse.php.internal.core.ast.nodes.ASTParser.createAST()


          if (DEBUG) {
            System.err
                .println(getThreadName()
                    + " - " + DEBUG_PREFIX + "creating AST for: " + input.getElementName()); //$NON-NLS-1$ //$NON-NLS-2$
          }
          root[0] = (Program) parser.createAST(progressMonitor);

          // mark as unmodifiable
          ASTNodes.setFlagsToAST(root[0], ASTNode.PROTECT);
        } catch (OperationCanceledException ex) {
          return;
View Full Code Here


    } else {
      ISourceModule sm = (ISourceModule) input;
      StringReader st = new StringReader (sm.getBuffer().getContents());
      ASTParser parser= ASTParser.newParser(st, PHPVersion.byAlias(astLevel),  false, sm);
      startTime= System.currentTimeMillis();
      root= (Program) parser.createAST(null);
      endTime= System.currentTimeMillis();
    }
    if (root != null) {
      updateContentDescription(input, root, endTime - startTime);
    }
View Full Code Here

    } else {
      version = ProjectOptions.getDefaultPhpVersion();
    }
    ASTParser newParser = ASTParser.newParser(version,
        (ISourceModule) source);
    return newParser.createAST(null);
  }

}
View Full Code Here

          .getSourceModule();
      ASTParser parser = ASTParser.newParser(sourceModule);

      Program program;
      try {
        program = parser.createAST(null);
        program.recordModifications();

        AST ast = program.getAST();
        IDocument document = ((PHPStructuredEditor) targetEditor)
            .getDocument();
View Full Code Here

    } else {
      version = ProjectOptions.getDefaultPhpVersion();
    }
    ASTParser newParser = ASTParser.newParser(version,
        (ISourceModule) source);
    return newParser.createAST(null);
  }

  protected static ISourceModule getSourceModule() {
    return DLTKCore.createSourceModuleFrom(testFile);
  }
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.