 # Copyright 2010-2012 RethinkDB, all rights reserved.
+# TODO: We changed so many times the behavior of the suggestions, the code is a mess. We should refactor soon.
 module 'DataExplorerView', ->
     class @Container extends Backbone.View
         id: 'dataexplorer'

            return 0

        # Append suggestion and display them or hide them if suggestions is empty
        append_suggestion: (query, suggestions) =>
            @hide_suggestion()
            splitdata = query.split('.')

                        @add_description last_function_for_description
                else
                    could_append = @append_suggestion(query, @suggestions[@map_state[last_function]])
                    if could_append is false # We couldn't find any suggestion that matched. We are probably at the end of a function (closing parenthesis)
                        last_function_for_description = @extract_last_function_for_description(query_before_cursor)

                        if last_function_for_description isnt ''
