コード例 #1
0
        private void SetSelection(RegexSearchResult item)
        {
            var module = item.Module;

            using (var codePane = module.CodePane)
            {
                codePane.Selection = item.Selection;
            }
        }
コード例 #2
0
        private void SetSelection(RegexSearchResult item)
        {
            var project = _vbe.ActiveVBProject;

            foreach (var proj in _parser.State.Projects)
            {
                // wtf?
                project = proj;
                break;
            }
            _vbe.SetSelection(project, item.Selection, item.Module.Name, _codePaneFactory);
        }
コード例 #3
0
        public void Replace(string searchPattern, string replaceValue, RegexSearchReplaceScope scope)
        {
            var results = Search(searchPattern, scope).ToList();

            if (results.Count == 0)
            {
                return;
            }

            RegexSearchResult result = results[0];

            string originalLine = result.Module.Lines[results[0].Selection.StartLine, 1];
            var    newLine      = originalLine.Replace(result.Match.Value, replaceValue);

            result.Module.ReplaceLine(result.Selection.StartLine, newLine);

            if (results.Count >= 2)
            {
                SetSelection(results[1]);
            }
        }
コード例 #4
0
 private void SetSelection(RegexSearchResult item)
 {
     var project = _vbe.ActiveVBProject;
     foreach (var proj in _parser.State.Projects)
     {
         // wtf?
         project = proj;
         break;
     }
     _vbe.SetSelection(project, item.Selection, item.Module.Name, _codePaneFactory);
 }
コード例 #5
0
 private void SetSelection(RegexSearchResult item)
 {
     _selectionService.TrySetActiveSelection(item.Module.QualifiedModuleName, item.Selection);
 }
コード例 #6
0
 private void SetSelection(RegexSearchResult item)
 {
     item.Module.CodePane.Selection = item.Selection;
 }