src/search/FileFilters.js
function _doPopulate() {
        var dropdownItems = [Strings.NEW_FILE_FILTER, Strings.CLEAR_FILE_FILTER],
            filterSets = PreferencesManager.get("fileFilters") || [];

        if (filterSets.length) {
            dropdownItems.push("---");

            // Remove all the empty exclusion sets before concatenating to the dropdownItems.
            filterSets = filterSets.filter(function (filter) {
                return (_getCondensedForm(filter.patterns) !== "");
            });

            // FIRST_FILTER_INDEX needs to stay in sync with the number of static items (plus separator)
            // ie. the number of items populated so far before we concatenate with the actual filter sets.
            dropdownItems = dropdownItems.concat(filterSets);
        }
        _picker.items = dropdownItems;
    }
function _doPopulate() {
        var dropdownItems = [Strings.NEW_FILE_FILTER, Strings.CLEAR_FILE_FILTER],
            filterSets = PreferencesManager.get("fileFilters") || [];

        if (filterSets.length) {
            dropdownItems.push("---");

            // Remove all the empty exclusion sets before concatenating to the dropdownItems.
            filterSets = filterSets.filter(function (filter) {
                return (_getCondensedForm(filter.patterns) !== "");
            });

            // FIRST_FILTER_INDEX needs to stay in sync with the number of static items (plus separator)
            // ie. the number of items populated so far before we concatenate with the actual filter sets.
            dropdownItems = dropdownItems.concat(filterSets);
        }
        _picker.items = dropdownItems;
    }
function _doPopulate ( ) { var dropdownItems = [ Strings . NEW_FILE_FILTER , Strings . CLEAR_FILE_FILTER ] , filterSets = PreferencesManager . get ( "fileFilters" ) || [ ] ; if ( filterSets . length ) { dropdownItems . push ( "---" ) ; // Remove all the empty exclusion sets before concatenating to the dropdownItems. filterSets = filterSets . filter ( function ( filter ) { return ( _getCondensedForm ( filter . patterns ) !== "" ) ; } ) ; // FIRST_FILTER_INDEX needs to stay in sync with the number of static items (plus separator) // ie. the number of items populated so far before we concatenate with the actual filter sets. dropdownItems = dropdownItems . concat ( filterSets ) ; } _picker . items = dropdownItems ; }
Populate the list of dropdown menu with two filter commands and
the list of saved filter sets.
Populate the list of dropdown menu with two filter commands and the list of saved filter sets .