bundles/org.eclipse.orion.client.ui/web/orion/searchModel.js
function writeReplacedContents(reportList){
	        var promises = [];
			var validFileList = this.getValidFileList();
			validFileList.forEach(function(fileItem) {
				promises.push(this._writeOneFile(fileItem, reportList));
			}.bind(this));
			return Deferred.all(promises, function(error) { return {_error: error}; });
	    }
function writeReplacedContents(reportList){
	        var promises = [];
			var validFileList = this.getValidFileList();
			validFileList.forEach(function(fileItem) {
				promises.push(this._writeOneFile(fileItem, reportList));
			}.bind(this));
			return Deferred.all(promises, function(error) { return {_error: error}; });
	    }
function writeReplacedContents ( reportList ) { var promises = [ ] ; var validFileList = this . getValidFileList ( ) ; validFileList . forEach ( function ( fileItem ) { promises . push ( this . _writeOneFile ( fileItem , reportList ) ) ; } . bind ( this ) ) ; return Deferred . all ( promises , function ( error ) { return { _error : error } ; } ) ; }
Write the replace file contents. Required function.
@param {Array} reportList The array of the report items.
Each item of the reportList contains the following properties
model: the file item
matchesReplaced: The number of matches that replaced in this file
status: "pass" or "failed"
message: Optional. The error message when writing fails.
@returns {orion.Promise} A new promise. The returned promise is generally fulfilled to an <code>Array</code> whose elements
writes all the new contetns by checking the checked flag on all details matches. A file with no checked flag on all detail matches should not be written a new replaced contents.
@override
Write the replace file contents . Required function .