code: function(type) {
  			var annotations = this._annotations;
  			var removed, i;
  			if (type) {
  				removed = [];
  				for (i = annotations.length - 1; i >= 0; i--) {
  					var annotation = annotations[i];
  					if (annotation.type === type) {
  						annotations.splice(i, 1);
  						removed.splice(0, 0, annotation);
  						annotation._annotationModel = null;
  					}
  				}
  			} else {
  				removed = annotations;
  				annotations = [];
  			}
  			var e = {
  				type: "Changed", //$NON-NLS-0$
  				removed: removed,
  				added: [],
  				changed: []
  			};
  			this.onChanged(e);
  		}
docs: Removes all annotations of the given <code>type</code>. All annotations
  are removed if the type is not specified.
  <p>The annotation model listeners are notified of this change.  Only one changed event is generated.</p>
  
  @param {Object} type the type of annotations to be removed.
  
  @see orion.editor.AnnotationModel#removeAnnotation