Examples of recordModifications()


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

      String source = icunit.getBuffer().getContents();
      Document document = new Document(source);
      ASTParser parser = ASTParser.newParser(AST.JLS3);
      parser.setSource(icunit);
      CompilationUnit cunit = (CompilationUnit) parser.createAST(null);
      cunit.recordModifications();
      AST ast = cunit.getAST();
      TypeDeclaration typeDec = (TypeDeclaration) cunit.types().get(0);
      List list = typeDec.superInterfaceTypes();
      Name name = ast.newName(cName);
      Type interfaceType = ast.newSimpleType(name);
View Full Code Here

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

    signature.append(") : " + methodDeclaration.getReturnType2());

    methodDeclaration.setProperty("Signature", signature.toString());

    // creation of ASTRewrite
    astRoot.recordModifications();
    IMethod method = null;
    String content = createPreambule(methodDeclaration) + "\r\n"
        + methodDeclaration.toString();
    try {
      method = astRoot.getTypeRoot().findPrimaryType()
View Full Code Here

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

        parser.setSource(cpu);
        CompilationUnit astRoot = (CompilationUnit) parser
            .createAST(null);

        // creation of ASTRewrite
        astRoot.recordModifications();
        IMethod method = null;
        String content = createPreambule(selectedElement) + "\r\n"
            + selectedElement.toString();
        try {
          method = astRoot.getTypeRoot().findPrimaryType()
View Full Code Here

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

        ASTParser parser = ASTParser.newParser(AST.JLS3);
        parser.setSource(asyncContents);
        CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
        AST ast = astRoot.getAST();

        astRoot.recordModifications();

        // Modify imports (+AsyncCallback, -RemoteService, -*Exception)
        List imports = astRoot.imports();
        List importsToBeRemoved = new ArrayList();

View Full Code Here

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

        ASTParser parser = ASTParser.newParser(AST.JLS3);
        parser.setSource(asyncContents);
        CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
        AST ast = astRoot.getAST();

        astRoot.recordModifications();

        // Modify imports (+AsyncCallback, -RemoteService, -*Exception)
        List imports = astRoot.imports();
        List importsToBeRemoved = new ArrayList();
       
View Full Code Here

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

         Document document= new Document(source);

         CompilationUnit astRoot = (CompilationUnit) node.getRoot();

         // start record of the modifications
         astRoot.recordModifications();

         // modify the AST
        node.bodyDeclarations().add(createToGXT(node.getAST(), getMethods, newClass.getFullyQualifiedName()));

         // computation of the text edits
View Full Code Here

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

        ASTParser parser = ASTParser.newParser(AST.JLS3);
        parser.setSource(asyncContents);
        CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
        AST ast = astRoot.getAST();

        astRoot.recordModifications();

        // Modify imports (+AsyncCallback, -RemoteService, -*Exception)
        List imports = astRoot.imports();
        List importsToBeRemoved = new ArrayList();
       
View Full Code Here

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

    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(asyncContents);
    CompilationUnit astRoot = (CompilationUnit) parser.createAST(null);
    AST ast = astRoot.getAST();

    astRoot.recordModifications();

    // Modify imports (+AsyncCallback, -RemoteService, -*Exception)
    updateImports(astRoot, ast);

    // Add Async to the name
View Full Code Here

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

    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setSource(compilationUnit);
    parser.setResolveBindings(true);
    CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    cu.recordModifications();
   
    cache.put(compilationUnit, cu);
    return cu;
  }
View Full Code Here

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

      final String oldServletName,
      final String newServletName) throws Exception {
    ICompilationUnit serviceCompilationUnit = serviceType.getCompilationUnit();
    // parse service type into AST and change servlet path
    CompilationUnit serviceUnit = CodeUtils.parseCompilationUnit(serviceCompilationUnit);
    serviceUnit.recordModifications();
    serviceUnit.accept(new ASTVisitor() {
      @Override
      public void endVisit(StringLiteral node) {
        if (oldServletName.equals(node.getLiteralValue())) {
          node.setLiteralValue(newServletName);
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.