Beispiel #1
0
        private void SetSelection(RegexSearchResult item)
        {
            var module = item.Module;

            using (var codePane = module.CodePane)
            {
                codePane.Selection = item.Selection;
            }
        }
        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);
        }
        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]);
            }
        }
 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);
 }
 private void SetSelection(RegexSearchResult item)
 {
     _selectionService.TrySetActiveSelection(item.Module.QualifiedModuleName, item.Selection);
 }
Beispiel #6
0
 private void SetSelection(RegexSearchResult item)
 {
     item.Module.CodePane.Selection = item.Selection;
 }