#NEWLINE# def get_class_from_buffer( a_project ) : #NEWLINE# #INDENT# '\n    Get the name of the class being edited in the current buffer.\n\n    a_project is the current openned eiffel project.\n    ' #NEWLINE# if ( environment . evaluate ( "bufname('%')" ) == environment . get_global_variable ( 'eiffel_tools_buffer_name' ) ) : #NEWLINE# #INDENT# try : #NEWLINE# #INDENT# l_class = environment . get_buffer_variable ( 'eiffel_tools_buffer_class' ) #NEWLINE# #UNINDENT# except : #NEWLINE# #INDENT# l_class = '' #NEWLINE# #UNINDENT# #UNINDENT# else : #NEWLINE# #INDENT# l_buffer_text = environment . buffer_to_text ( ) #NEWLINE# l_class = a_project . class_name_from_text ( l_buffer_text ) #NEWLINE# #UNINDENT# return l_class