function ContentAssist(textView, serviceRegistry) {
		this.textView = textView;
		if (serviceRegistry){
			this.pageMessage = serviceRegistry.getService("orion.page.message"); //$NON-NLS-1$
		}
		this.state = State.INACTIVE;
		this.clearProviders();
		var self = this;
		this._textViewListeners = {
			onModelChanging: (function(event) {
				this._latestModelChangingEvent = event;
				if (event) {
					this._updateFilterText(event);	
				}
			}).bind(this),
			onSelection: (function(event) {
				if (this.isDeactivatingChange(this._latestModelChangingEvent, event)) {
					this.setState(State.INACTIVE);
				} else {
					if (this.isActive()) {
						if (this.state === State.ACTIVE) {
							this.setState(State.FILTERING);
						}
						this.filterProposals();
					}
				}
				this._latestModelChangingEvent = null;
			}).bind(this),
			onScroll: (function(event) {
				this.setState(State.INACTIVE);
			}).bind(this)
		};
		
		textView.setKeyBinding(util.isMac ? new mKeyBinding.KeyBinding(' ', false, false, false, true) : new mKeyBinding.KeyBinding(' ', true), "contentAssist"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
		textView.setKeyBinding(util.isMac ? new mKeyBinding.KeyBinding(' ', false, false, true, true) : new mKeyBinding.KeyBinding(' ', true, false, true), "contentAssist"); //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
		textView.setAction("contentAssist", function() { //$NON-NLS-0$
			if (!textView.getOptions("readonly")) { //$NON-NLS-0$
				self.activate();
			}
			return true;
		}, {name: messages.contentAssist});
	}
/**
	 * @name ContentAssist
	 * @description Creates a new content assist manager for the given text view
	 * @param textView The text view to provide content assist for
	 * @param serviceRegistry Optional, used to look up page message service for status
	 */
@name ContentAssist
@description Creates a new content assist manager for the given text view
@param textView The text view to provide content assist for
@param serviceRegistry Optional, used to look up page message service for status
@name ContentAssist @description Creates a new content assist manager for the given text view @param textView The text view to provide content assist for @param serviceRegistry Optional used to look up page message service for status
function ContentAssist(textView, serviceRegistry) {
		this.textView = textView;
		if (serviceRegistry){
			this.pageMessage = serviceRegistry.getService("orion.page.message"); 
		}
		this.state = State.INACTIVE;
		this.clearProviders();
		var self = this;
		this._textViewListeners = {
			onModelChanging: (function(event) {
				this._latestModelChangingEvent = event;
				if (event) {
					this._updateFilterText(event);	
				}
			}).bind(this),
			onSelection: (function(event) {
				if (this.isDeactivatingChange(this._latestModelChangingEvent, event)) {
					this.setState(State.INACTIVE);
				} else {
					if (this.isActive()) {
						if (this.state === State.ACTIVE) {
							this.setState(State.FILTERING);
						}
						this.filterProposals();
					}
				}
				this._latestModelChangingEvent = null;
			}).bind(this),
			onScroll: (function(event) {
				this.setState(State.INACTIVE);
			}).bind(this)
		};
		textView.setKeyBinding(util.isMac ? new mKeyBinding.KeyBinding(' ', false, false, false, true) : new mKeyBinding.KeyBinding(' ', true), "contentAssist"); 
		textView.setKeyBinding(util.isMac ? new mKeyBinding.KeyBinding(' ', false, false, true, true) : new mKeyBinding.KeyBinding(' ', true, false, true), "contentAssist"); 
		textView.setAction("contentAssist", function() { 
			if (!textView.getOptions("readonly")) { 
				self.activate();
			}
			return true;
		}, {name: messages.contentAssist});
	}
function ContentAssist ( textView , serviceRegistry ) { this . textView = textView ; if ( serviceRegistry ) { this . pageMessage = serviceRegistry . getService ( "orion.page.message" ) ; } this . state = State . INACTIVE ; this . clearProviders ( ) ; var self = this ; this . _textViewListeners = { onModelChanging : ( function ( event ) { this . _latestModelChangingEvent = event ; if ( event ) { this . _updateFilterText ( event ) ; } } ) . bind ( this ) , onSelection : ( function ( event ) { if ( this . isDeactivatingChange ( this . _latestModelChangingEvent , event ) ) { this . setState ( State . INACTIVE ) ; } else { if ( this . isActive ( ) ) { if ( this . state === State . ACTIVE ) { this . setState ( State . FILTERING ) ; } this . filterProposals ( ) ; } } this . _latestModelChangingEvent = null ; } ) . bind ( this ) , onScroll : ( function ( event ) { this . setState ( State . INACTIVE ) ; } ) . bind ( this ) } ; textView . setKeyBinding ( util . isMac ? new mKeyBinding . KeyBinding ( ' ' , false , false , false , true ) : new mKeyBinding . KeyBinding ( ' ' , true ) , "contentAssist" ) ; textView . setKeyBinding ( util . isMac ? new mKeyBinding . KeyBinding ( ' ' , false , false , true , true ) : new mKeyBinding . KeyBinding ( ' ' , true , false , true ) , "contentAssist" ) ; textView . setAction ( "contentAssist" , function ( ) { if ( ! textView . getOptions ( "readonly" ) ) { self . activate ( ) ; } return true ; } , { name : messages . contentAssist } ) ; }
@name ContentAssist
 @description Creates a new content assist manager for the given text view
 @param textView The text view to provide content assist for
 @param serviceRegistry Optional, used to look up page message service for status
@name ContentAssist @description Creates a new content assist manager for the given text view @param textView The text view to provide content assist for @param serviceRegistry Optional used to look up page message service for status
//$NON-NLS-1$
 //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 //$NON-NLS-2$ //$NON-NLS-1$ //$NON-NLS-0$
 //$NON-NLS-0$
 //$NON-NLS-0$
