bundles/org.eclipse.orion.client.ui/web/orion/outliner.js
function(fileContentType, title) {
			if (!fileContentType) return;
			var lspServer = this.languageServerRegistry.getServerByContentType(fileContentType);
			var filteredProviders = null;
			var _self = this;
			if (lspServer) {
				filteredProviders = [];
				filteredProviders.push(lspServer);
			} else {
				var allOutlineProviders = this._serviceRegistry.getServiceReferences("orion.edit.outliner"); //$NON-NLS-0$
				// Filter to capable providers
				filteredProviders = this.filteredProviders = allOutlineProviders.filter(function(serviceReference) {
					var contentTypeIds = serviceReference.getProperty("contentType"), //$NON-NLS-0$
					    pattern = serviceReference.getProperty("pattern"); // for backwards compatibility //$NON-NLS-0$
					if (contentTypeIds) {
						return contentTypeIds.some(function(contentTypeId) {
							return _self._contentTypeRegistry.isExtensionOf(fileContentType, contentTypeId);
						});
					} else if (pattern && new RegExp(pattern).test(title)) {
						return true;
					}
					return false;
				});
				// Load resource bundles
				this._providerLookup = true;
				filteredProviders.forEach(function(provider) {
					provider.displayName = provider.getProperty("name") || provider.getProperty("nameKey"); //$NON-NLS-0$
				});
				
				_self._providerLookup = false;
			}
			_self._outlineService.setOutlineProviders(filteredProviders);
			_self.setOutlineProviders(filteredProviders);
			_self.generateOutline();
		
		}
function(fileContentType, title) {
			if (!fileContentType) return;
			var lspServer = this.languageServerRegistry.getServerByContentType(fileContentType);
			var filteredProviders = null;
			var _self = this;
			if (lspServer) {
				filteredProviders = [];
				filteredProviders.push(lspServer);
			} else {
				var allOutlineProviders = this._serviceRegistry.getServiceReferences("orion.edit.outliner"); //$NON-NLS-0$
				// Filter to capable providers
				filteredProviders = this.filteredProviders = allOutlineProviders.filter(function(serviceReference) {
					var contentTypeIds = serviceReference.getProperty("contentType"), //$NON-NLS-0$
					    pattern = serviceReference.getProperty("pattern"); // for backwards compatibility //$NON-NLS-0$
					if (contentTypeIds) {
						return contentTypeIds.some(function(contentTypeId) {
							return _self._contentTypeRegistry.isExtensionOf(fileContentType, contentTypeId);
						});
					} else if (pattern && new RegExp(pattern).test(title)) {
						return true;
					}
					return false;
				});
				// Load resource bundles
				this._providerLookup = true;
				filteredProviders.forEach(function(provider) {
					provider.displayName = provider.getProperty("name") || provider.getProperty("nameKey"); //$NON-NLS-0$
				});
				
				_self._providerLookup = false;
			}
			_self._outlineService.setOutlineProviders(filteredProviders);
			_self.setOutlineProviders(filteredProviders);
			_self.generateOutline();
		
		}
function ( fileContentType , title ) { if ( ! fileContentType ) return ; var lspServer = this . languageServerRegistry . getServerByContentType ( fileContentType ) ; var filteredProviders = null ; var _self = this ; if ( lspServer ) { filteredProviders = [ ] ; filteredProviders . push ( lspServer ) ; } else { var allOutlineProviders = this . _serviceRegistry . getServiceReferences ( "orion.edit.outliner" ) ; //$NON-NLS-0$ // Filter to capable providers filteredProviders = this . filteredProviders = allOutlineProviders . filter ( function ( serviceReference ) { var contentTypeIds = serviceReference . getProperty ( "contentType" ) , //$NON-NLS-0$ pattern = serviceReference . getProperty ( "pattern" ) ; // for backwards compatibility //$NON-NLS-0$ if ( contentTypeIds ) { return contentTypeIds . some ( function ( contentTypeId ) { return _self . _contentTypeRegistry . isExtensionOf ( fileContentType , contentTypeId ) ; } ) ; } else if ( pattern && new RegExp ( pattern ) . test ( title ) ) { return true ; } return false ; } ) ; // Load resource bundles this . _providerLookup = true ; filteredProviders . forEach ( function ( provider ) { provider . displayName = provider . getProperty ( "name" ) || provider . getProperty ( "nameKey" ) ; //$NON-NLS-0$ } ) ; _self . _providerLookup = false ; } _self . _outlineService . setOutlineProviders ( filteredProviders ) ; _self . setOutlineProviders ( filteredProviders ) ; _self . generateOutline ( ) ; }
Called when the inputManager's contentType has changed, so we need to look up the capable outline providers.
@param {String} fileContentType
@param {String} title TODO this is deprecated, should be removed along with "pattern" property of outliners.
Called when the inputManager s contentType has changed so we need to look up the capable outline providers .