示例#1
0
        public void FindInFiles(string pattern, bool matchCase, string filesOfType, VimGrepFlags flags, FSharpFunc <Unit, Unit> action)
        {
            var find = new FindReplace();

            var options = new FilterOptions
            {
                CaseSensitive = matchCase,
                RegexSearch   = true,
            };
            var scope = new ShellWildcardSearchScope(_vim.VimData.CurrentDirectory, filesOfType);

            using (var monitor = IdeApp.Workbench.ProgressMonitors.GetSearchProgressMonitor(true))
            {
                var results = find.FindAll(scope, monitor, pattern, null, options, System.Threading.CancellationToken.None);
                foreach (var result in results)
                {
                    //TODO: Cancellation?
                    monitor.ReportResult(result);
                }
            }

            action.Invoke(null);
        }
示例#2
0
 void IVimHost.FindInFiles(string pattern, bool matchCase, string filesOfType, VimGrepFlags flags, FSharpFunc <Unit, Unit> onFindDone)
 {
     FindInFilesFunc(pattern, matchCase, filesOfType, flags, onFindDone);
 }
示例#3
0
 public virtual void FindInFiles(string pattern, bool matchCase, string filesOfType, VimGrepFlags flags, FSharpFunc <Unit, Unit> action)
 {
     // Host specific decision on how to respond
 }
示例#4
0
 public void FindInFiles(string pattern, bool matchCase, string filesOfType, VimGrepFlags flags, FSharpFunc <Unit, Unit> action)
 {
 }