def __do_on_document_saved(self, document, userData=None): if document.get_location() != None: filepath = document.get_location().get_path() indexFilepath = self.get_index_filepath() if indexFilepath != None: indexPathManager = self.get_index_path_manager() index = PhpIndex(indexFilepath, indexPathManager=indexPathManager) index.reindex_phpfile(filepath)