@Override
 public void done(SyncTask task) {
   if (task.task.equals(SyncTask.TASK_DOWN_DATA)) {
     Category c = null;
     c = book.root.search(task.local.id);
     if (c != null && c.getMessage() != null) {
       storage.save(c.getMessage());
       mainFrame.editor.reloadDocument(c.getMessage());
     }
   }
 }
 private void restoreLastStatus() {
   SwingUtilities.invokeLater(
       new Runnable() {
         public void run() {
           Vector<TreePath> expaned = new Vector<TreePath>();
           if (book.expaned != null) {
             expaned.addAll(book.expaned);
             book.expaned.clear();
           } else {
             book.expaned = new Vector<TreePath>();
           }
           for (TreePath path : expaned) {
             mainFrame.tree.expandPath(path);
           }
         }
       });
   if (book.curNoteId != null && !book.curNoteId.equals("")) {
     Category node = book.root.search(book.curNoteId);
     if (node != null) {
       NoteMessage msg = node.getMessage(storage, true);
       mainFrame.editor.openDocument(msg);
     }
   }
 }