code: def _drawContents(self, reason=None, initiator=None):
          
          logger.debug("TextInspector._drawContents: {}".format(self))
          self._clearContents()
  
          slicedArray = self.collector.getSlicedArray()
  
          if slicedArray is None:
              return
  
          # Sanity check, the slicedArray should be zero-dimensional. It can be used as a scalar.
          # In fact, using an index (e.g. slicedArray[0]) will raise an exception.
          assert slicedArray.data.ndim == 0, \
              "Expected zero-dimensional array. Got: {}".format(slicedArray.ndim)
  
          # Valid data from here...
          maskedArr = slicedArray.asMaskedArray() # So that we call mask[()] for boolean masks
          slicedScalar = maskedArr[()] # Convert to Numpy scalar
          isMasked = maskedArr.mask[()]
  
          text = to_string(slicedScalar, masked=isMasked, maskFormat='--',
                           decode_bytes=self.config.encodingCti.configValue)
          self.editor.setPlainText(text)
          self.editor.setWordWrapMode(self.config.wordWrapCti.configValue)
  
          # Update the editor font from the font config item (will call self.editor.setFont)
          self.config.updateTarget()
docs: Converts the (zero-dimensional) sliced array to string and puts it in the text editor.
  
              The reason and initiator parameters are ignored.
              See AbstractInspector.updateContents for their description.