#NEWLINE# def _sync_values( self ) : #NEWLINE# #INDENT# ' Initializes and synchronizes (as needed) editor traits with the\n            value of corresponding factory traits.\n        ' #NEWLINE# factory = self . factory #NEWLINE# for ( name , trait ) in factory . traits ( sync_value = not_none ) : #NEWLINE# #INDENT# value = getattr ( factory , name ) #NEWLINE# if isinstance ( value , ContextValue ) : #NEWLINE# #INDENT# self_trait = self . trait ( name ) #NEWLINE# self . sync_value ( value . name , name , ( self_trait . sync_value or trait . sync_value ) , ( self_trait . is_list is True ) ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( value is not Undefined ) : #NEWLINE# #INDENT# setattr ( self , name , value )