code: function getPromise(provider, extension) {
  			var contentTypeIds = provider.getProperty("contentType") || provider.getProperty("contentTypes"), //$NON-NLS-1$ //$NON-NLS-0$
  			    fileTypes = provider.getProperty("fileTypes"); // backwards compatibility //$NON-NLS-0$
  			if (contentTypeIds) {
  				return Deferred.when(contentTypeService.isSomeExtensionOf(contentType, contentTypeIds)).then(
  					function (isMatch) {
  						return isMatch ? provider : null;
  					});
  			} else if (extension && fileTypes && fileTypes.indexOf(extension) !== -1) {
  				var d = new Deferred();
  				d.resolve(provider);
  				return d;
  			}
  			return null;
  		}
docs: Returns a promise (if provider matches) or null (if it doesn't match).