#NEWLINE# def create_watch_value_node( env , parent , label , value ) : #NEWLINE# #INDENT# if ( str ( value . type ) == 'null' ) : #NEWLINE# #INDENT# return WatchValueLeaf ( env , parent , label , 'null' ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( str ( value . type ) == 'prim' ) : #NEWLINE# #INDENT# return WatchValueLeaf ( env , parent , label , value . summary ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( str ( value . type ) == 'str' ) : #NEWLINE# #INDENT# return WatchValueLeaf ( env , parent , label , value . summary ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# if ( str ( value . type ) == 'obj' ) : #NEWLINE# #INDENT# def is_scala_collection( type_name ) : #NEWLINE# #INDENT# return ( type_name == 'scala.collection.immutable.$colon$colon' ) #NEWLINE# #UNINDENT# settings = sublime . load_settings ( 'Ensime.sublime-settings' ) #NEWLINE# if ( settings . get ( 'debug_specialcase_scala_collections' ) and is_scala_collection ( value . type_name ) ) : #NEWLINE# #INDENT# return WatchValueObjectNode ( env , parent , label , value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return WatchValueObjectNode ( env , parent , label , value ) #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# if ( str ( value . type ) == 'arr' ) : #NEWLINE# #INDENT# return WatchValueArrayNode ( env , parent , label , value ) #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# raise Exception ( ( ( ( 'unexpected debug value of type ' + str ( value . type ) ) + ': ' ) + str ( value ) ) )