def update_editor ( self ):
        """ Updates the editor when the object trait changes externally to the
            editor.
        """
        control   = self.control
        new_value = self.str_value

        if hasattr(self.factory, 'password') and self.factory.password:
            new_value = '*' * len( new_value )

        if (self.item.resizable is True) or (self.item.height != -1.0):
            if control.GetValue() != new_value:
                control.SetValue( new_value )
                control.SetInsertionPointEnd()

        elif control.GetLabel() != new_value:
            control.SetLabel( new_value )

    #---------------------------------------------------------------------------
    #  Disposes of the contents of an editor:
    #---------------------------------------------------------------------------
dataset/ETHPy150Open enthought/traitsui/traitsui/wx/text_editor.py/ReadonlyEditor.update_editor/original