#NEWLINE# def edit( self , obj , factory = None , use_existing = True ) : #NEWLINE# #INDENT# ' Edit an object.\n        ' #NEWLINE# if use_existing : #NEWLINE# #INDENT# editor = self . get_editor ( obj ) #NEWLINE# if ( editor is not None ) : #NEWLINE# #INDENT# self . activate_editor ( factory ) #NEWLINE# return editor #NEWLINE# #UNINDENT# #UNINDENT# editor = self . create_editor ( obj , factory ) #NEWLINE# if ( editor is None ) : #NEWLINE# #INDENT# logger . warn ( 'Cannot create editor for obj %r' , obj ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# self . add_editor ( editor ) #NEWLINE# self . activate_editor ( editor ) #NEWLINE# #UNINDENT# return editor