def get_usages_in_files(subject, files):
"""
Smart approach: reads files from a list and parses them.
"""
usage_list = []
for file_path in files:
try:
usages = get_usages_in_file(file_path, subject)
usage_list.extend(usages)
except UnicodeDecodeError:
utils.log("Failed to open file", file_path, warning=True)
except FileNotFoundError:
utils.log("File not found", file_path, warning=True)
utils.log("Probably the file has been (re)moved and the dependency graph is stale. Please rebuild!", warning=True)
sublime.active_window().status_message("GotoUsage Error! Dependency graph looks out of date. Please rebuild!")
return usage_list
评论列表
文章目录