1
// Copyright (c) AlphaSierraPapa for the SharpDevelop Team (for details please see \doc\copyright.txt)
2
// This code is distributed under the GNU LGPL (for details please see \doc\license.txt)
4
using ICSharpCode.SharpDevelop.Editor;
6
using ICSharpCode.SharpDevelop;
7
using ICSharpCode.SharpDevelop.Editor.Search;
8
using ICSharpCode.SharpDevelop.Gui;
10
namespace SearchAndReplace
12
public class CurrentDocumentIterator : IDocumentIterator
16
public CurrentDocumentIterator()
21
public string CurrentFileName {
23
if (!SearchReplaceUtilities.IsTextAreaSelected) {
26
return WorkbenchSingleton.Workbench.ActiveViewContent.PrimaryFileName;
30
public ProvidedDocumentInformation Current {
32
ITextEditor textEditor = SearchReplaceUtilities.GetActiveTextEditor();
33
if (textEditor != null)
34
return new ProvidedDocumentInformation(textEditor.Document, CurrentFileName, textEditor);
40
public bool MoveForward()
42
if (!SearchReplaceUtilities.IsTextAreaSelected) {
53
public bool MoveBackward()