autocompleteService: rewrite on_class and on_function