public override void Execute() { ReplaceDialog.CloseIfOpen(); FindInFilesDialog.CloseIfOpen(); FindDialog findDialog = FindDialog.GetFindDialog(this.FindReplaceModel, this.TextEditor, this.MessageDisplayService); if (!this.TextEditor.IsSelectionEmpty) { string text = this.TextEditor.GetText(this.TextEditor.SelectionStart, this.TextEditor.SelectionLength); if (!string.IsNullOrEmpty(text) && text.IndexOf('\n') == -1) { findDialog.FindText = text; } } findDialog.Show(); }
public override void Execute() { ReplaceDialog.CloseIfOpen(); FindInFilesDialog.CloseIfOpen(); FindDialog findDialog = FindDialog.GetFindDialog(this.FindReplaceModel, this.TextEditor, this.MessageDisplayService); if (string.IsNullOrEmpty(findDialog.FindText)) { findDialog.SearchReverse = false; findDialog.Show(); } else { if (!findDialog.FindNext()) { return; } this.TextEditor.Focus(); } }