// Scenario: user invoked save action even though the model is not dirty
if(!options.force&&!this.dirty){
this.logService.trace(`[text file model] doSave(${versionId}) - exit - because not dirty and/or versionId is different (this.isDirty: ${this.dirty}, this.versionId: ${this.versionId})`,this.resource.toString());
this.logService.trace(`[text file model] doSave(${versionId}) - exit - because not dirty and/or versionId is different (this.isDirty: ${this.dirty}, this.versionId: ${this.versionId})`,this.resource.toString(true));
this.logService.trace(`[text file model] doSave(${versionId}) - after write()`,this.resource.toString());
this.logService.trace(`[text file model] doSave(${versionId}) - after write()`,this.resource.toString(true));
// Updated resolved stat with updated stat
this.updateLastResolvedFileStat(stat);
// Update dirty state unless model has changed meanwhile
if(versionId===this.versionId){
this.logService.trace(`[text file model] handleSaveSuccess(${versionId}) - setting dirty to false because versionId did not change`,this.resource.toString());
this.logService.trace(`[text file model] handleSaveSuccess(${versionId}) - setting dirty to false because versionId did not change`,this.resource.toString(true));
this.setDirty(false);
}else{
this.logService.trace(`[text file model] handleSaveSuccess(${versionId}) - not setting dirty to false because versionId did change meanwhile`,this.resource.toString());
this.logService.trace(`[text file model] handleSaveSuccess(${versionId}) - not setting dirty to false because versionId did change meanwhile`,this.resource.toString(true));
this.logService.error(`[text file model] handleSaveError(${versionId}) - exit - resulted in a save error: ${error.toString()}`,this.resource.toString());
this.logService.error(`[text file model] handleSaveError(${versionId}) - exit - resulted in a save error: ${error.toString()}`,this.resource.toString(true));
// Return early if the save() call was made asking to