'The CIX tree for this buffer. Will lazily scan if necessary.'

@property
def tree(self):

    self.acquire_lock()
    try:
        blob_from_lang = self.blob_from_lang
        tree = ET.Element('codeintel', version='2.0')
        path = self.path
        if (os.sep != '/'):
            path = path.replace(os.sep, '/')
        file = ET.SubElement(tree, 'file', path=path, lang=self.lang, mtime=str(self._scan_time_cache))
        if self._scan_error_cache:
            file.set('error', self._scan_error_cache)
        if blob_from_lang:
            for (lang, blob) in sorted(blob_from_lang.items()):
                file.append(blob)
        return tree
    finally:
        self.release_lock()
