docs: def on_state_changed(self, state):
          """
          Connects/disconnects slots to/from signals when the mode state
          changed.
          """
          super(GoToDefinitionMode, self).on_state_changed(state)
          if state:
              self.editor.mouse_moved.connect(self._on_mouse_moved)
              self.editor.mouse_released.connect(self._on_mouse_released)
              self.editor.add_action(self.action_goto, sub_menu='COBOL')
              self.editor.mouse_double_clicked.connect(
                  self._timer.cancel_requests)
          else:
              self.editor.mouse_moved.disconnect(self._on_mouse_moved)
              self.editor.mouse_released.disconnect(self._on_mouse_released)
              self.editor.remove_action(self.action_goto, sub_menu='Python')
              self.editor.mouse_double_clicked.disconnect(
                  self._timer.cancel_requests)