bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function() {
			var self = this;
			if (!this.collabFileAnnotationsUpdateTimeoutId) {
				// No delayed update is assigned. Assign one.
				// This is necessary because we don't want duplicate UI action within a short period.
				this.collabFileAnnotationsUpdateTimeoutId = setTimeout(function() {
					self.collabFileAnnotationsUpdateTimeoutId = 0;
					var annotations = [];
					var editingFileUsers = {}; // map from location to list of usernames indicating all users that are typing on this file
					for (var key in self.collabFileAnnotations) {
						if (self.collabFileAnnotations.hasOwnProperty(key)) {
							var annotation = self.collabFileAnnotations[key];
							annotations.push(annotation);
							if (annotation.editing) {
								if (!editingFileUsers[annotation.location]) {
									editingFileUsers[annotation.location] = [];
								}
								editingFileUsers[annotation.location].push(annotation.name);
							}
						}
					}
					// Add editing annotations
					for (var location in editingFileUsers) {
						if (editingFileUsers.hasOwnProperty(location)) {
							annotations.push(new CollabFileEditingAnnotation(location, editingFileUsers[location]));
						}
					}
					self.fileClient.dispatchEvent({
						type: 'AnnotationChanged',
						removeTypes: [CollabFileAnnotation],
						annotations: annotations
					});
				}, COLLABORATOR_ANNOTATION_UPDATE_DELAY);
			}
		}
function() {
			var self = this;
			if (!this.collabFileAnnotationsUpdateTimeoutId) {
				// No delayed update is assigned. Assign one.
				// This is necessary because we don't want duplicate UI action within a short period.
				this.collabFileAnnotationsUpdateTimeoutId = setTimeout(function() {
					self.collabFileAnnotationsUpdateTimeoutId = 0;
					var annotations = [];
					var editingFileUsers = {}; // map from location to list of usernames indicating all users that are typing on this file
					for (var key in self.collabFileAnnotations) {
						if (self.collabFileAnnotations.hasOwnProperty(key)) {
							var annotation = self.collabFileAnnotations[key];
							annotations.push(annotation);
							if (annotation.editing) {
								if (!editingFileUsers[annotation.location]) {
									editingFileUsers[annotation.location] = [];
								}
								editingFileUsers[annotation.location].push(annotation.name);
							}
						}
					}
					// Add editing annotations
					for (var location in editingFileUsers) {
						if (editingFileUsers.hasOwnProperty(location)) {
							annotations.push(new CollabFileEditingAnnotation(location, editingFileUsers[location]));
						}
					}
					self.fileClient.dispatchEvent({
						type: 'AnnotationChanged',
						removeTypes: [CollabFileAnnotation],
						annotations: annotations
					});
				}, COLLABORATOR_ANNOTATION_UPDATE_DELAY);
			}
		}
function ( ) { var self = this ; if ( ! this . collabFileAnnotationsUpdateTimeoutId ) { // No delayed update is assigned. Assign one. // This is necessary because we don't want duplicate UI action within a short period. this . collabFileAnnotationsUpdateTimeoutId = setTimeout ( function ( ) { self . collabFileAnnotationsUpdateTimeoutId = 0 ; var annotations = [ ] ; var editingFileUsers = { } ; // map from location to list of usernames indicating all users that are typing on this file for ( var key in self . collabFileAnnotations ) { if ( self . collabFileAnnotations . hasOwnProperty ( key ) ) { var annotation = self . collabFileAnnotations [ key ] ; annotations . push ( annotation ) ; if ( annotation . editing ) { if ( ! editingFileUsers [ annotation . location ] ) { editingFileUsers [ annotation . location ] = [ ] ; } editingFileUsers [ annotation . location ] . push ( annotation . name ) ; } } } // Add editing annotations for ( var location in editingFileUsers ) { if ( editingFileUsers . hasOwnProperty ( location ) ) { annotations . push ( new CollabFileEditingAnnotation ( location , editingFileUsers [ location ] ) ) ; } } self . fileClient . dispatchEvent ( { type : 'AnnotationChanged' , removeTypes : [ CollabFileAnnotation ] , annotations : annotations } ) ; } , COLLABORATOR_ANNOTATION_UPDATE_DELAY ) ; } }
Request a file annotation UI update
Request a file annotation UI update