@Override
 public void componentHidden() {
   super.componentHidden();
   CasaDataEditorSupport editor = mDataObject.getEditorSupport();
   // Sync model before having undo manager listen to the model,
   // lest we get redundant undoable edits added to the queue.
   if (mDataObject.isModified()) {
     editor.syncModel();
   }
   //        editor.removeUndoManagerFromDocument();
 }
 @Override
 public void componentDeactivated() {
   super.componentDeactivated();
   CasaDataEditorSupport editor = mDataObject.getEditorSupport();
   // Sync model before having undo manager listen to the model,
   // lest we get redundant undoable edits added to the queue.
   if (mDataObject.isModified()) {
     editor.syncModel();
   }
   CasaMultiViewFactory.updateGroupVisibility(CasaMultiViewFactory.SOURCE_PREFERRED_ID);
   //        editor.removeUndoManagerFromDocument();
 }