I’m trying to figure out how to reload a sublime-project programatically in a plugin but I don’t know how to do it. My last attempt was this one:
# 1) Close all sublmie-project views first
for view in self.window.views():
if view.file_name()==dst_project_path:
view.set_scratch(True)
self.window.focus_view(view)
self.window.run_command("close")
# 2) Parsing/Saving of the *.sublime_project (dst_project_path) GOES HERE
...
# End of parsing
# 3) Reload the project, the below one DOESN'T WORK
#
# I'd expect this line to reload the project magically on the window, unfortunately
# it doesn't work. But... why when i open the .sublime-project manually and press
# ctrl+s it does the reloading properly?
self.window.open_file(dst_project_path).run_command("save")
So, could anyone explain me how to reload a sublime-project in the same view after the plugin has done some parsing&saving?
Thanks in advance.