Exemplo n.º 1
0
 .bind("keydown", function (event) {
     if (event.keyCode === KeyEvent.DOM_VK_RETURN || event.keyCode === KeyEvent.DOM_VK_ESCAPE) {  // Enter/Return key or Esc key
         event.stopPropagation();
         event.preventDefault();
         
         var query = $searchField.val();
         
         if (event.keyCode === KeyEvent.DOM_VK_ESCAPE) {
             that._close();
         } else if (event.keyCode === KeyEvent.DOM_VK_RETURN) {
             StatusBar.showBusyIndicator(true);
             that.getDialogTextField().attr("disabled", "disabled");
             currentFilter = FileFilters.commitPicker(filterPicker);
             _doSearch(query);
         }
     }
 })
Exemplo n.º 2
0
        function startSearch(replaceText) {
            var queryInfo = _findBar.getQueryInfo();
            if (queryInfo && queryInfo.query) {
                _findBar.enable(false);
                StatusBar.showBusyIndicator(true);

                var filter;
                if (filterPicker) {
                    filter = FileFilters.commitPicker(filterPicker);
                } else {
                    // Single-file scope: don't use any file filters
                    filter = null;
                }
                searchAndShowResults(queryInfo, scope, filter, replaceText, candidateFilesPromise);
            }
            return null;
        }
Exemplo n.º 3
0
        function startSearch(replaceText) {
            var queryInfo = _findBar.getQueryInfo(),
                disableFindBar = FindUtils.isNodeSearchDisabled() || (replaceText ? true : false);
            if (queryInfo && queryInfo.query) {
                _findBar.enable(!disableFindBar);
                StatusBar.showBusyIndicator(disableFindBar);
                if (queryInfo.isRegexp) {
                    HealthLogger.searchDone(HealthLogger.SEARCH_REGEXP);
                }
                if (queryInfo.isCaseSensitive) {
                    HealthLogger.searchDone(HealthLogger.SEARCH_CASE_SENSITIVE);
                }

                var filter;
                if (filterPicker) {
                    filter = FileFilters.commitPicker(filterPicker);
                } else {
                    // Single-file scope: don't use any file filters
                    filter = null;
                }
                searchAndShowResults(queryInfo, scope, filter, replaceText, candidateFilesPromise);
            }
            return null;
        }