bundles/org.eclipse.orion.client.collab/web/orion/collab/collabClient.js
function CollabClient(editor, inputManager, fileClient, serviceRegistry, commandRegistry, preferences) {
		mCollabFileCommands.createFileCommands(serviceRegistry, commandRegistry, fileClient);
		this.editor = editor;
		this.inputManager = inputManager;
		this.fileClient = fileClient;
		this.preferences = preferences;
		this.textView = this.editor.getTextView();
		var self = this;
		this.collabMode = false;
		this.clientId = '';
		this.clientDisplayedName = '';
		this.fileClient.addEventListener('Changed', self.sendFileOperation.bind(self));
		this.serviceRegistry = serviceRegistry;
		this.editor.addEventListener('InputContentsSet', function(event) {self.viewInstalled.call(self, event);});
		this.editor.addEventListener('TextViewUninstalled', function(event) {self.viewUninstalled.call(self, event);});
		this.projectSessionID = '';
		this.inputManager.addEventListener('InputChanged', function(e) {
			self.onInputChanged(e)
		});
		this.ot = null;
		this.otOrionAdapter = null;
		this.otSocketAdapter = null;
		this.socketReconnectAttempt = 0;
		this.socketIntentionalyClosing = false;
		this.socketPingTimeout = 0;
		this.awaitingClients = false;
		this.collabFileAnnotations = {};
		// Timeout id to indicate whether a delayed update has already been assigned
		this.collabFileAnnotationsUpdateTimeoutId = 0;
		/**
		 * A map of clientid -> peer
		 * @type {Object.<string, CollabPeer>}
		 */
		this.peers = {};
		this.editing = false;
		this.guid = guid;
		// Initialize current project
		var file = this.inputManager.getInput();
		var metadata = this.inputManager.getFileMetadata();
		if (metadata) {
			this.onInputChanged({
				metadata: metadata,
				input: {
					resource: file
				}
			});
		}
	}
function CollabClient(editor, inputManager, fileClient, serviceRegistry, commandRegistry, preferences) {
		mCollabFileCommands.createFileCommands(serviceRegistry, commandRegistry, fileClient);
		this.editor = editor;
		this.inputManager = inputManager;
		this.fileClient = fileClient;
		this.preferences = preferences;
		this.textView = this.editor.getTextView();
		var self = this;
		this.collabMode = false;
		this.clientId = '';
		this.clientDisplayedName = '';
		this.fileClient.addEventListener('Changed', self.sendFileOperation.bind(self));
		this.serviceRegistry = serviceRegistry;
		this.editor.addEventListener('InputContentsSet', function(event) {self.viewInstalled.call(self, event);});
		this.editor.addEventListener('TextViewUninstalled', function(event) {self.viewUninstalled.call(self, event);});
		this.projectSessionID = '';
		this.inputManager.addEventListener('InputChanged', function(e) {
			self.onInputChanged(e)
		});
		this.ot = null;
		this.otOrionAdapter = null;
		this.otSocketAdapter = null;
		this.socketReconnectAttempt = 0;
		this.socketIntentionalyClosing = false;
		this.socketPingTimeout = 0;
		this.awaitingClients = false;
		this.collabFileAnnotations = {};
		// Timeout id to indicate whether a delayed update has already been assigned
		this.collabFileAnnotationsUpdateTimeoutId = 0;
		/**
		 * A map of clientid -> peer
		 * @type {Object.<string, CollabPeer>}
		 */
		this.peers = {};
		this.editing = false;
		this.guid = guid;
		// Initialize current project
		var file = this.inputManager.getInput();
		var metadata = this.inputManager.getFileMetadata();
		if (metadata) {
			this.onInputChanged({
				metadata: metadata,
				input: {
					resource: file
				}
			});
		}
	}
function CollabClient ( editor , inputManager , fileClient , serviceRegistry , commandRegistry , preferences ) { mCollabFileCommands . createFileCommands ( serviceRegistry , commandRegistry , fileClient ) ; this . editor = editor ; this . inputManager = inputManager ; this . fileClient = fileClient ; this . preferences = preferences ; this . textView = this . editor . getTextView ( ) ; var self = this ; this . collabMode = false ; this . clientId = '' ; this . clientDisplayedName = '' ; this . fileClient . addEventListener ( 'Changed' , self . sendFileOperation . bind ( self ) ) ; this . serviceRegistry = serviceRegistry ; this . editor . addEventListener ( 'InputContentsSet' , function ( event ) { self . viewInstalled . call ( self , event ) ; } ) ; this . editor . addEventListener ( 'TextViewUninstalled' , function ( event ) { self . viewUninstalled . call ( self , event ) ; } ) ; this . projectSessionID = '' ; this . inputManager . addEventListener ( 'InputChanged' , function ( e ) { self . onInputChanged ( e ) } ) ; this . ot = null ; this . otOrionAdapter = null ; this . otSocketAdapter = null ; this . socketReconnectAttempt = 0 ; this . socketIntentionalyClosing = false ; this . socketPingTimeout = 0 ; this . awaitingClients = false ; this . collabFileAnnotations = { } ; // Timeout id to indicate whether a delayed update has already been assigned this . collabFileAnnotationsUpdateTimeoutId = 0 ; /**
		 * A map of clientid -> peer
		 * @type {Object.<string, CollabPeer>}
		 */ this . peers = { } ; this . editing = false ; this . guid = guid ; // Initialize current project var file = this . inputManager . getInput ( ) ; var metadata = this . inputManager . getFileMetadata ( ) ; if ( metadata ) { this . onInputChanged ( { metadata : metadata , input : { resource : file } } ) ; } }
Creates a new collaboration client.
@class
@name orion.collabClient.CollabClient
Creates a new collaboration client .