def update_editor ( self ):
        self._locked = True
        new_value = self.value
        if isinstance( new_value, SequenceTypes ):
            new_value = '\n'.join( [ line.rstrip() for line in new_value ] )
        control = self._widget
        if control.code.toPlainText() != new_value:
            control.code.setPlainText(new_value)

            if self.factory.selected_line:
                # TODO: update the factory selected line
                pass

            # TODO: put the cursor somewhere

        self._locked = False

    #---------------------------------------------------------------------------
    #  Handles an error that occurs while setting the object's trait value:
    #---------------------------------------------------------------------------
A fake hostname is substituted for I{NODE_0} in the route body.
dataset/ETHPy150Open enthought/traitsui/traitsui/qt4/code_editor.py/SourceEditor.update_editor--crossover with--dataset/ETHPy150Open ClusterHQ/flocker/flocker/restapi/docs/test/test_publicapi.py/VariableInterpolationTests.test_node_substitution