code: def SetPackageView(self, directoryView):
          
          self.directoryView = not self.directoryView
          self.packageMenuItem.Check(self.directoryView)
          self.packageViewTool.SetValue(self.directoryView)
          if self.loader:
              self.SetModel(self.loader)
          self.RecordHistory()
docs: Set whether to use directory/package based view