I was asked to implement saveAll Feature as follows;

When trying Build/Preview/CloseAll/Install/Run/RunDebug, SavePopup is displayed if any modified files exist.

And  trying to save all the modified files when user selects SaveAll Button in SavePopup.

Actual Build/Preview/CloseAll/Install/Run/RunDebug is started just after saveAll with successful.
If SaveAll fails, no more action and just notify user a error with ErrorPopup display.

Which file do you expect to be handled in except Phobos.js?