Пример #1
0
 public boolean visit(Symbol node) {
   try {
     if (node.isType(WikiWord.symbolType)) {
       new WikiWordReference(currentPage, node.getContent())
           .wikiWordRenamePageIfReferenced(node, subjectPage, newName);
     } else if (node.isType(Alias.symbolType)) {
       String aliasReference = node.childAt(1).childAt(0).getContent();
       if (new WikiWordPath().findLength(aliasReference) > 0) {
         new WikiWordReference(currentPage, aliasReference)
             .wikiWordRenamePageIfReferenced(node.childAt(1).childAt(0), subjectPage, newName);
       }
     }
   } catch (Exception e) {
     e.printStackTrace();
     throw new RuntimeException(e);
   }
   return true;
 }