Package org.eclipse.jdt.core.dom

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


      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      AbstractTypeDeclaration declaration = visitor.getTypeDeclaration();
      if (declaration instanceof TypeDeclaration)
      {
         if (((TypeDeclaration) declaration).isInterface())
View Full Code Here


      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      AbstractTypeDeclaration declaration = visitor.getTypeDeclaration();
      if (declaration instanceof TypeDeclaration)
      {
         if (((TypeDeclaration) declaration).isInterface())
View Full Code Here

      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      List<AbstractTypeDeclaration> declarations = visitor.getTypeDeclarations();
      if (!declarations.isEmpty())
      {
         AbstractTypeDeclaration declaration = declarations.get(0);
View Full Code Here

      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      AbstractTypeDeclaration declaration = visitor.getTypeDeclaration();
      if (declaration instanceof TypeDeclaration)
      {
         if (((TypeDeclaration) declaration).isInterface())
View Full Code Here

              // "+iComp.getElementName());
              taskMonitor.subTask("searching " + iComp.getElementName());
              // check the compilation unit for used and declared
              // methods and for class variables
              ASTVisitor astVisitor = new ASTMethodExplorer(usedMethods, declaredMethods, publicClassVariables, classDependencies, iComp);
              astRoot.accept(astVisitor);
            }
          }
          taskMonitor.worked(1);
          if (taskMonitor.isCanceled())
            return false;
View Full Code Here

      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      List<AbstractTypeDeclaration> declarations = visitor.getTypeDeclarations();
      if (!declarations.isEmpty())
      {
         AbstractTypeDeclaration declaration = declarations.get(0);
View Full Code Here

      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      List<AbstractTypeDeclaration> declarations = visitor.getTypeDeclarations();
      if (!declarations.isEmpty())
      {
         AbstractTypeDeclaration declaration = declarations.get(0);
View Full Code Here

    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 {
      edits.apply(doc);
    } catch (MalformedTreeException e) {
View Full Code Here

      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      AbstractTypeDeclaration declaration = visitor.getTypeDeclaration();
      if (declaration instanceof TypeDeclaration)
      {
         if (((TypeDeclaration) declaration).isInterface())
View Full Code Here

      parser.setKind(ASTParser.K_COMPILATION_UNIT);
      CompilationUnit unit = (CompilationUnit) parser.createAST(null);
      unit.recordModifications();

      TypeDeclarationFinderVisitor visitor = new TypeDeclarationFinderVisitor();
      unit.accept(visitor);

      List<AbstractTypeDeclaration> declarations = visitor.getTypeDeclarations();
      if (!declarations.isEmpty())
      {
         AbstractTypeDeclaration declaration = declarations.get(0);
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.