コード例 #1
0
 public List<Node> getNodesToRename(Tree.CompilationUnit root) {
   ArrayList<Node> list = new ArrayList<Node>();
   FindRenamedReferencesVisitor frv = new FindRenamedReferencesVisitor(declaration);
   root.visit(frv);
   list.addAll(frv.getNodes());
   FindRefinementsVisitor fdv = new FindRefinementsVisitor((Declaration) frv.getDeclaration());
   root.visit(fdv);
   list.addAll(fdv.getDeclarationNodes());
   return list;
 }
コード例 #2
0
 @Override
 int countReferences(Tree.CompilationUnit cu) {
   FindRenamedReferencesVisitor frv = new FindRenamedReferencesVisitor(declaration);
   Declaration dec = (Declaration) frv.getDeclaration();
   FindRefinementsVisitor fdv = new FindRefinementsVisitor(dec);
   FindDocLinkReferencesVisitor fdlrv = new FindDocLinkReferencesVisitor(dec);
   cu.visit(frv);
   cu.visit(fdv);
   cu.visit(fdlrv);
   return frv.getNodes().size() + fdv.getDeclarationNodes().size() + fdlrv.getCount();
 }