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

Examples of org.eclipse.php.internal.core.ast.nodes.Program.recordModifications()


     
      StringReader stringReader = new StringReader(new String());
      ASTParser previewParser = ASTParser.newParser(stringReader, ProjectOptions.getPhpVersion(fSourceModule), false);
      Program previewProgram = previewParser.createAST(null);
     
      previewProgram.recordModifications();
      AST previewAST = previewProgram.getAST();
     
      FunctionDeclaration function = previewAST.newFunctionDeclaration(previewAST.newIdentifier(fMethodName), computeArguments(previewAST), previewAST.newBlock(), false);
      MethodDeclaration method = previewAST.newMethodDeclaration(fModifierAccessFlag, function);
      previewProgram.statements().add(method);
View Full Code Here


    ASTParser parser = ASTParser.newParser(getPHPVersion(),
        ProjectOptions.useShortTags((IProject) null));
    parser.setSource(document.get().toCharArray());
    Program program = parser.createAST(new NullProgressMonitor());

    program.recordModifications();
    return program;
  }

  protected PHPVersion getPHPVersion() {
    return PHPVersion.PHP5;
View Full Code Here

      ASTParser parser = ASTParser.newParser(sourceModule);

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

        AST ast = program.getAST();
        IDocument document = ((PHPStructuredEditor) targetEditor)
            .getDocument();
        for (int i = 0; i < fileNames.length; ++i) {
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.