When Build/Install/Run/RunDebug, all the modified project files have to be saved before that action.

saveAllDocumentsBeforeBuild() is needed for that reason.