Examples of createAST()


Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

  private void goThroughClass(String ClassContent) {
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(ClassContent.toCharArray());
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    final CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    cu.accept(new ASTVisitor() {

      private String elNodeName;
      private boolean intoEL;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

  private void goThroughClass(String ClassContent) {
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(ClassContent.toCharArray());
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    final CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    cu.accept(new ASTVisitor() {

      private String elNodeName;
      private boolean intoEL;
      private boolean definedId;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

            ASTParser parser = ASTParser.newParser(AST.JLS4);
            parser.setKind(ASTParser.K_COMPILATION_UNIT);
            parser.setSource(compilationUnit);
            // a switch for turning on/off resolve bindings
            parser.setResolveBindings(ifBindings);
            parser.createAST(null).accept(this);
          }
        }
      }
    }
    return all;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

            ASTParser parser = ASTParser.newParser(AST.JLS4);
            parser.setKind(ASTParser.K_COMPILATION_UNIT);
            parser.setSource(compilationUnit);
            // a switch for turning on/off resolve bindings
            parser.setResolveBindings(ifBindings);
            parser.createAST(null).accept(this);
          }
        }
      }
    }
  }
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

    ASTParser parser = ASTParser.newParser(AST.JLS4);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setSource(iUnit);
    parser.setResolveBindings(true);
    Visitor visitor = new Visitor();
    CompilationUnit unit = (CompilationUnit) parser.createAST(null);
    unit.accept(visitor);
    return unit; // parse
  }

  /**
 
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

  public static CompilationUnit parse (ICompilationUnit iUnit){
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setKind(ASTParser.K_COMPILATION_UNIT);
    parser.setSource(iUnit);
    parser.setResolveBindings(true);
    return (CompilationUnit) parser.createAST(null);
  }
}
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

            }
          });
          WidgetAdapter beanAdapter = ExtensionRegistry.createWidgetAdapter(bean);
          ASTParser parser = ASTParser.newParser(AST.JLS3);
          parser.setSource(unit);
          CompilationUnit cunit = (CompilationUnit) parser.createAST(null);
          parseEventListener(cunit, beanAdapter);
          initDesignedWidget(cunit, bean);
          parsePropertyValue(lnf, cunit, beanAdapter);
          beanAdapter.clearDirty();
          return beanAdapter;
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

  public static ImportRewrite createImportRewrite(ICompilationUnit unit) {
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(unit);
    parser.setResolveBindings(false);
    parser.setFocalPosition(0);
    CompilationUnit cu = (CompilationUnit) parser.createAST(null);
    return CodeStyleConfiguration.createImportRewrite(cu, true);
  }

 
  public ICompilationUnit generate(WidgetAdapter root, IProgressMonitor monitor) {
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

      for (String nonfield : nonExistingFields) {
        removedNames.remove(nonfield);
      }
      ASTParser astparser = ASTParser.newParser(AST.JLS3);
      astparser.setSource(unit);
      CompilationUnit cunit = (CompilationUnit) astparser.createAST(null);
      List<String> getmethods = new ArrayList<String>();
      for (int i = 0; i < removedNames.size(); i++) {
        String removed_name = removedNames.get(i);
        String getmethod = NamespaceUtil.getGetMethodName(cunit, removed_name);
        getmethods.add(getmethod);
View Full Code Here

Examples of org.eclipse.jdt.core.dom.ASTParser.createAST()

      e.printStackTrace();
    }
    unit = JavaCore.createCompilationUnitFrom(file);
    ASTParser parser = ASTParser.newParser(AST.JLS3);
    parser.setSource(unit);
    cunit = (CompilationUnit) parser.createAST(null);
  }

  @Override
  protected IStatus run(IProgressMonitor monitor) {
    if (componentType != null) {
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.