Examples of recordModifications()


Examples of org.eclipse.jdt.core.dom.CompilationUnit.recordModifications()

    // Ben has decided to move on to 1.6. Yay!
    JavaCore.setComplianceOptions(JavaCore.VERSION_1_6, options);
    options.put(JavaCore.COMPILER_SOURCE, JavaCore.VERSION_1_6);
    parser.setCompilerOptions(options);
    CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    cu.recordModifications();
    rewrite = ASTRewrite.create(cu.getAST());
    cu.accept(new XQASTVisitor());

    TextEdit edits = cu.rewrite(doc, null);
    try {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.CompilationUnit.recordModifications()

        ExistingJavaFileVisitor visitor = new ExistingJavaFileVisitor(javaDocTags);

        astParser.setSource(existingFile.toCharArray());
        CompilationUnit cu = (CompilationUnit) astParser.createAST(null);
        AST ast = cu.getAST();
        cu.recordModifications();
        cu.accept(visitor);

        TypeDeclaration typeDeclaration = visitor.getTypeDeclaration();
        if (typeDeclaration == null) {
            StringBuffer sb = new StringBuffer();
View Full Code Here

Examples of org.eclipse.jdt.core.dom.CompilationUnit.recordModifications()

                javaDocTags);

        astParser.setSource(existingFile.toCharArray());
        CompilationUnit cu = (CompilationUnit) astParser.createAST(null);
        AST ast = cu.getAST();
        cu.recordModifications();
        cu.accept(visitor);

        TypeDeclaration typeDeclaration = visitor.getTypeDeclaration();
        if (typeDeclaration == null) {
            StringBuffer sb = new StringBuffer();
View Full Code Here

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

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

    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

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

      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.