code: function applySingleFixToAll(annotations, createTextChange) {
  			var edits = [];
  			annotations.forEach(function(current) {
  				var change = createTextChange(current);
  				if(change) {
  					if(Array.isArray(change)) {
  						change.forEach(function(fix) {
  							edits.push(fix);
  						});
  					} else {
  						edits.push(change);
  					}
  				}
  			});
  			// To use setText() with multiple selections they must be in range order
  			edits = edits.sort(function(a, b){
  				return a.start - b.start;
  			});
  			var mergedEdits = [];
  			var intersectedRange = false;
  			for (var i = 0; i < edits.length ; i++) {
  			    if(i === edits.length - 1 && !intersectedRange){
  			        mergedEdits.push(edits[i]);
  			        break;
  			    } else if (i === edits.length - 1) {
  			        break;
  			    }
  			    var element = intersectedRange ? mergedEdits.pop() : edits[i];
  			    var nextElement = edits[i+1];
  			    if (element.end >= nextElement.start){
  			        mergedEdits.push({
  			            start: element.start,
  			            end: nextElement.end,
  			            text: element.text + nextElement.text
  			        });
  			        intersectedRange = true;
  			    } else {
  			        mergedEdits.push(element);
  			        intersectedRange = false;
  			    }
  			}
  			return mergedEdits;
  		}
docs: Takes a quickfix implementation that can be applied to all fixes in a file and applies it to either all annotations (if multiple annotations provided) or
  just to the single annotation.  Handles applying all edits in a single UNDO step as well as setting the caret to the single selected annotation afterward.
  @param {Array.<Object>} annotations Array of annotations to apply the fix to
  @param {Function} createTextChange function to create a text edit object (text, start, end) for a given annotation