bundles/org.eclipse.orion.client.collab/web/orion/collab/collabFileAnnotation.js
function(model, callback) {
			var self = this;
			model.getRoot(function(root) {
				// Find the existing ID reversely
				var location = self.location;
				while (location.length > 0) {
					// Create a fake item
					// NOTE: it's a hack because we don't have any efficient
					//       way to get the actual file node. Instead, we have
					//       to do it recursively starting from the root. If
					//       you find anything wierd happens, change it to the
					//       actual item object.
					var item = {
						Location: location
					};
					var id = model.getId(item);
					// Test if this element exists
					var exists = !!document.getElementById(id);
					if (exists) {
						callback(id);
						return;
					}
					// Not found. This probably means this item is collapsed.
					// Try to find one level upper.
					// Here I assume every url starts from "/"
					location = location.substr(0, location.lastIndexOf('/'));
				}
				// Nothing found
				callback('');
			});
		}
function(model, callback) {
			var self = this;
			model.getRoot(function(root) {
				// Find the existing ID reversely
				var location = self.location;
				while (location.length > 0) {
					// Create a fake item
					// NOTE: it's a hack because we don't have any efficient
					//       way to get the actual file node. Instead, we have
					//       to do it recursively starting from the root. If
					//       you find anything wierd happens, change it to the
					//       actual item object.
					var item = {
						Location: location
					};
					var id = model.getId(item);
					// Test if this element exists
					var exists = !!document.getElementById(id);
					if (exists) {
						callback(id);
						return;
					}
					// Not found. This probably means this item is collapsed.
					// Try to find one level upper.
					// Here I assume every url starts from "/"
					location = location.substr(0, location.lastIndexOf('/'));
				}
				// Nothing found
				callback('');
			});
		}
function ( model , callback ) { var self = this ; model . getRoot ( function ( root ) { // Find the existing ID reversely var location = self . location ; while ( location . length > 0 ) { // Create a fake item // NOTE: it's a hack because we don't have any efficient //       way to get the actual file node. Instead, we have //       to do it recursively starting from the root. If //       you find anything wierd happens, change it to the //       actual item object. var item = { Location : location } ; var id = model . getId ( item ) ; // Test if this element exists var exists = ! ! document . getElementById ( id ) ; if ( exists ) { callback ( id ) ; return ; } // Not found. This probably means this item is collapsed. // Try to find one level upper. // Here I assume every url starts from "/" location = location . substr ( 0 , location . lastIndexOf ( '/' ) ) ; } // Nothing found callback ( '' ) ; } ) ; }
Find the deepest expanded folder item that contains the file having
this annotation.

@see IAnnotation for details.

@param {orion.explorer.ExplorerModel} model -
@param {Function} callback -
Find the deepest expanded folder item that contains the file having this annotation .