diff --git a/ findandreplaceex/Backup/FindInFiles.cs b/ findandreplaceex/Backup/FindInFiles.cs
deleted file mode 100644
index 48ba9d5..0000000
--- a/ findandreplaceex/Backup/FindInFiles.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * FindTool - Find In Files utility
- * Author: Philippe Elsass
- */
-using System;
-using System.IO;
-using System.Collections;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading;
-
-namespace FindReplaceEx
-{
- class FindInFiles
- {
- // already explored pathes
- static ArrayList known;
- static FindResults lastResults;
- // parameters
- static Regex re_pattern;
- static string fileMask;
- static string pattern;
- static bool recursive;
-
-
- ///
- /// Recursively convert classes
- ///
- /// folder to convert
- static void ExploreFolder(string path)
- {
- known.Add(path);
-
- // convert classes
- string[] files = Directory.GetFiles(path, fileMask);
- string src;
- Encoding enc;
- int line = 0;
- int position = 0;
- int lineEndChars = 0;
- TextReader sr;
- //lastResults = new FindResults();
- foreach(string file in files)
- {
- line = 0;
- position = 0;
- enc = GetEncoding(file);
- using( sr = new StreamReader(file, enc) )
- {
-
- lineEndChars = getLineEndMode(sr.ReadToEnd());
- sr.Close();
- }
- using( sr = new StreamReader(file, enc) )
- {
- src = sr.ReadLine();
- //findText = getSafeSearch(findText);
- /**
- MatchCollection searchResults = re_pattern.Matches(src);
- ScintillaNet.ScintillaControl sci = new ScintillaNet.ScintillaControl();
- lastResults.AddResults(sci, searchResults);
- */
- while (src != null)
- {
- if (re_pattern.IsMatch(src))
- {
- byte[] ba = Encoding.Convert(enc, Encoding.Default, enc.GetBytes(src));
- src = Console.Out.Encoding.GetString(ba);
- Match m = re_pattern.Match(src);
- int pos = position + m.Index;
- lastResults.AddResult(file, line, pos, src, m);
- //Console.WriteLine(file+":"+line+": "+src.TrimEnd());
- }
- position += src.Length+lineEndChars;
- line++;
- src = sr.ReadLine();
-
- }
-
- sr.Close();
- }
- }
- if (!recursive)
- return;
-
- // explore subfolders
- string[] dirs = Directory.GetDirectories(path);
- foreach(string dir in dirs)
- {
- if (!known.Contains(dir)) ExploreFolder(dir);
- }
- }
-
- static int getLineEndMode(string input)
- {
- if (input.IndexOf("\n\r") > -1 || input.IndexOf("\r\n") > -1)
- {
- return 2;
- }
- else
- {
- return 1;
- }
- }
-
- ///
- /// Adapted from FlashDevelop: FileSystem.cs
- /// Detects the file encoding from the file data.
- ///
- static Encoding GetEncoding(string file)
- {
- byte[] bom = new byte[4];
- System.IO.FileStream fs = new System.IO.FileStream(file, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read);
- if (fs.CanSeek)
- {
- fs.Read(bom, 0, 4); fs.Close();
- if ((bom[0] == 0xef && bom[1] == 0xbb && bom[2] == 0xbf))
- {
- return Encoding.UTF8;
- }
- else if ((bom[0] == 0xff && bom[1] == 0xfe))
- {
- return Encoding.Unicode;
- }
- else if ((bom[0] == 0xfe && bom[1] == 0xff))
- {
- return Encoding.BigEndianUnicode;
- }
- else if ((bom[0] == 0x2b && bom[1] == 0x2f && bom[2] == 0xfe && bom[3] == 0x76))
- {
- return Encoding.UTF7;
- }
- else
- {
- return Encoding.Default;
- }
- }
- else
- {
- return Encoding.Default;
- }
- }
-
-
- ///
- /// THIS FUNCTION IS COMPLETE!!
- ///
- ///
- ///
- public static FindResults GetSearchResults(string folder, string input, string mask, bool isRecursive, bool isRegex, bool isWholeWord, bool isIgnoreCase)
- {
- fileMask = mask;
- pattern = input;
- if (!isRegex) pattern = Regex.Escape(pattern);
- if (isWholeWord) pattern = "(?
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}
- Library
- Properties
- FindReplaceEx
- FindReplaceEx
- v2.0
- 512
-
-
-
-
- true
- full
- false
- ..\..\..\FlashDevelop\Bin\Debug\Plugins\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- ..\..\..\FlashDevelop\Bin\Debug\Plugins\
- TRACE
- prompt
- 4
-
-
- true
- bin\x86\Debug\
- DEBUG;TRACE
- full
- x86
- prompt
-
-
- bin\x86\Release\
- TRACE
- true
- pdbonly
- x86
- prompt
-
-
-
-
-
-
-
-
-
-
-
-
- UserControl
-
-
-
- True
- True
- Resources.resx
-
-
-
-
-
-
-
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}
- FlashDevelop
-
-
- {4EBF2653-9654-4E40-880E-0046B3D6210E}
- ASCompletion
-
-
- {61885F70-B4DC-4B44-852D-5D6D03F2A734}
- PluginCore
-
-
-
-
-
-
-
- PluginUI.cs
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- Designer
-
-
-
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/Backup/PluginMain.cs b/ findandreplaceex/Backup/PluginMain.cs
deleted file mode 100644
index 120416c..0000000
--- a/ findandreplaceex/Backup/PluginMain.cs
+++ /dev/null
@@ -1,618 +0,0 @@
-/*
- * Advanced Find and Replace Plugin for FlashDevelop3
- * Author: Itzik Arzoni IAP (itzikiap@gmail.com)
- *
- */
-
-using System;
-using System.Windows.Forms;
-using System.ComponentModel;
-using System.Text.RegularExpressions;
-using System.Collections;
-//using System.Threading;
-using System.Drawing;
-using System.IO;
-using WeifenLuo.WinFormsUI;
-using WeifenLuo.WinFormsUI.Docking;
-using PluginCore;
-using PluginCore.Controls;
-using ScintillaNet;
-using PluginCore.Localization;
-using PluginCore.Helpers;
-using PluginCore.Managers;
-using PluginCore.Utilities;
-using ASCompletion.Context;
-using ASCompletion.Model;
-using System.Collections.Generic;
-using FindReplaceEx.Resources;
-
-namespace FindReplaceEx
-{
- public class PluginMain : IPlugin
- {
-
- private Timer typingTimer;
- private string pluginName = "FindReplaceEx";
- private string pluginGuid = "0a84cd4e-64d8-4669-a082-8238aee69658";
- private string pluginAuth = "Itzik Arzoni";
- private string pluginHelp = "http://www.flashdevelop.org/community/viewtopic.php?t=485";
- private string pluginDesc = "Find and Replace plugin Expanded";
- private EventType eventMask = EventType.UIRefresh | EventType.ApplySettings | EventType.Keys;
- private DockContent pluginPanel;
- private PluginUI pluginUI;
- private String settingFilename;
- private Image pluginImage;
- private Settings settingObject;
-
- private string[] classPaths;
-
- private FindResults results;
-
- #region RequiredPluginVariables
-
- public string Name
- {
- get { return this.pluginName; }
- }
-
- public string Guid
- {
- get { return this.pluginGuid; }
- }
-
- public string Author
- {
- get { return this.pluginAuth; }
- }
-
- public string Description
- {
- get { return this.pluginDesc; }
- }
-
- public string Help
- {
- get { return this.pluginHelp; }
- }
-
- public EventType EventMask
- {
- get { return this.eventMask; }
- }
-
- [Browsable(false)]
- public DockContent Panel
- {
- get { return this.pluginPanel; }
- }
-
- #endregion
-
- #region extra properties
- public IMainForm MainForm
- {
- get { return PluginBase.MainForm; }
- }
-
- [Browsable(false)]
- public PluginUI PluginUI
- {
- get { return this.pluginUI; }
- }
-
- ///
- /// a reference to the currently active acientilla control
- ///
- public ScintillaControl CurSciControl
- {
- get
- {
- // current active document
- ITabbedDocument doc = MainForm.CurrentDocument;
- ScintillaControl sci = doc.SciControl;
- return sci;
- }
- }
-
-
-
- #endregion
-
-
- #region Required Methods
-
- ///
- /// Initializes the plugin
- ///
- public void Initialize()
- {
- this.InitBasics();
- this.LoadSettings();
- this.AddEventHandlers();
- this.CreateMenuItem();
- this.CreatePluginPanel();
-
- this.typingTimer = new Timer();
- this.typingTimer.Enabled = false;
- this.typingTimer.Tick += delegate { this.TypingTimerTick(); };
- }
-
- ///
- /// Disposes the plugin
- ///
- public void Dispose()
- {
- this.SaveSettings();
- this.pluginUI.Terminate();
- }
-
- ///
- /// Handles the incoming events
- ///
- public void HandleEvent(Object sender, NotifyEvent e, HandlingPriority prority)
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = null;
- if (document != null)
- {
- doc = document.SciControl;
- }
-
- switch (e.Type)
- {
-
- case EventType.ApplySettings:
- UpdateSettings();
- break;
-
- case EventType.UIRefresh:
- try
- {
- if (pluginPanel.Visible && !(MainForm == null))
- {
- if (doc.SelectionStart == doc.SelectionEnd)
- {
- if (settingObject.FeedOnCaret)
- {
- typingTimer.Stop();
- typingTimer.Start();
- }
- pluginUI.SelectionChanged(false);
- }
- else
- {
- pluginUI.SelectionChanged();
- }
- }
- }
- catch
- {
- // ignore any error
- }
-
- break;
- case EventType.Keys:
- Keys key = ((KeyEvent)e).Value;
- if (key == settingObject.ReplaceShortcut)
- {
- pluginUI.EnableFocus(true);
- e.Handled = false;
- }
- else if (key == settingObject.FindShortcut)
- {
- pluginUI.EnableFocus();
- e.Handled = true;
- }
- break;
-
- }
- }
-
- private void UpdateSettings()
- {
- this.pluginUI.UpdateSettings(settingObject);
-
- this.typingTimer.Interval = settingObject.TypingTimerInterval;
- }
-
- #endregion
-
- #region Custom Methods
-
- ///
- /// Initializes important variables
- ///
- public void InitBasics()
- {
- InitLocalization();
- String dataPath = Path.Combine(PathHelper.DataDir, "FindReplaceEx");
- if (!Directory.Exists(dataPath)) Directory.CreateDirectory(dataPath);
- this.settingFilename = Path.Combine(dataPath, "Settings.fdb");
- this.pluginImage = PluginBase.MainForm.FindImage("484|12|4|-1");
- }
-
-
- ///
- /// Initializes the localization of the plugin
- ///
- public void InitLocalization()
- {
- LocaleVersion locale = PluginBase.MainForm.Settings.LocaleVersion;
- switch (locale)
- {
- /*
- case LocaleVersion.fi_FI :
- // We have Finnish available... or not. :)
- LocaleHelper.Initialize(LocaleVersion.fi_FI);
- break;
- */
- default:
- // Plugins should default to English...
- LocaleHelper.Initialize(LocaleVersion.en_US);
- break;
- }
- this.pluginDesc = LocaleHelper.GetString("Info.Description");
- }
-
-
- ///
- /// Adds the required event handlers
- ///
- public void AddEventHandlers()
- {
- EventManager.AddEventHandler(this, eventMask);
- }
-
- ///
- /// Creates a plugin panel for the plugin
- ///
- public void CreatePluginPanel()
- {
- this.pluginUI = new PluginUI(this);
- this.pluginUI.Text = "Advanced F&R";
- this.pluginPanel = PluginBase.MainForm.CreateDockablePanel(this.pluginUI, this.pluginGuid, this.pluginImage, DockState.DockBottomAutoHide);
- }
-
- ///
- /// Creates a menu item for the plugin and adds a ignored key
- ///
- public void CreateMenuItem()
- {
- //String title = LocalHelper.GetString("Label.ViewMenuItem");
- String title = "Advanced Find And Replace";
- ToolStripMenuItem viewMenu = (ToolStripMenuItem)PluginBase.MainForm.FindMenuItem("ViewMenu");
- viewMenu.DropDownItems.Add(new ToolStripMenuItem(title, this.pluginImage, new EventHandler(this.OpenPanel)));
- }
-
- ///
- /// Loads the plugin settings
- ///
- public void LoadSettings()
- {
- this.settingObject = new Settings();
- if (!File.Exists(this.settingFilename)) this.SaveSettings();
- else
- {
- Object obj = ObjectSerializer.Deserialize(this.settingFilename, this.settingObject);
- this.settingObject = (Settings)obj;
- }
- }
-
- ///
- /// Saves the plugin settings
- ///
- public void SaveSettings()
- {
- ObjectSerializer.Serialize(this.settingFilename, this.settingObject);
- }
-
- ///
- /// Opens the plugin panel if closed
- ///
- public void OpenPanel(Object sender, System.EventArgs e)
- {
- this.pluginPanel.Show();
- }
-
- #endregion
-
-
- #region sync project explorer code
-
- ///
- /// Updates the class paths from ther project explorer to use in "Find In Files"
- ///
- public void UpdateProjectClassPaths()
- {
- List classPath = ASContext.Context.Classpath;
-
- string[] paths = new string[classPath.Count];
- int i = 0;
-
- foreach (PathModel path in classPath)
- {
- paths.SetValue(path.Path, i++);
- }
-/* localClassPaths = (projectInfo["classpaths"]) as string[];
- string[] globalPaths = globalClassPaths.Split(';');
- classPaths = new string[localClassPaths.Length + globalPaths.Length];
- localClassPaths.CopyTo(classPaths, 0);
- globalPaths.CopyTo(classPaths,localClassPaths.Length);*/
- pluginUI.UpdateFolderClassPaths(paths);
- }
-
- #endregion
-
- #region Find and Replace commands
-
- ///
- /// Event that happens several milliseconds after typing was stopped
- /// It update the find input box
- ///
- private void TypingTimerTick()
- {
- typingTimer.Stop();
- SetFindTextInDocument();
- }
-
- ///
- /// update the find input box according to the word that is under the cursor
- ///
- public void SetFindTextInDocument()
- {
- // current active document
- ITabbedDocument doc = MainForm.CurrentDocument;
- if (doc != null)
- {
- ScintillaControl Sci = doc.SciControl;
- string text = Sci.GetWordFromPosition(Sci.CurrentPos + 1);
- SetFindTextInDocument(text);
- }
- }
-
- ///
- /// updates the find input box according to a desired text
- ///
- /// Text to find
- public void SetFindTextInDocument(string Text)
- {
- if (Text != null)
- pluginUI.SetFindText(Text);
- }
-
- ///
- /// Initiate a search for a text
- ///
- /// Text to find
- public void SearchTextInDocument(string text)
- {
- if (text.Length > 1)
- {
- SetFindTextInDocument(text);
- }
- else
- {
- SetFindTextInDocument();
- }
- pluginUI.ListAllFindText();
- }
-
- ///
- /// Get the options to add to the regexp search according to user selection
- ///
- /// Regexp options with the current choice
- private RegexOptions GetRegexOptions()
- {
- RegexOptions options = RegexOptions.None;
- if (!pluginUI.MatchCase)
- options = options | RegexOptions.IgnoreCase;
- return options;
- }
-
- ///
- /// gets a search string that is safe to searchs
- ///
- ///
- ///
- private string getSafeSearch(string input)
- {
- if (!pluginUI.RegExp)
- {
- input = Regex.Escape(input);
- }
- if (pluginUI.WholeWord)
- {
- input = "(?
- /// gets a collection of results based on input text
- ///
- /// Text to find
- /// results
- public FindResults GetResultsList(string findText)
- {
- return GetResultsList(CurSciControl, findText);
- }
-
- ///
- /// gets a collection of results based on input text in a specific scientilla control
- ///
- /// Scientilla control to perform the search
- /// text to find
- /// results
- public FindResults GetResultsList(ScintillaControl sci, string findText)
- {
- results = new FindResults();
- AddToResultsList(sci, findText);
- //SendResults(results, "resultsListUpdate");
- return results;
- }
-
- ///
- /// gets a results list from all open docuents to the wanted text
- ///
- /// text to find
- /// results
- public FindResults GetAllDocumentsResultsList(string findText)
- {
- results = new FindResults();
- foreach (ITabbedDocument document in MainForm.Documents)
- {
- if (document.Controls.Count == 0) continue;
- ScintillaControl sci = document.SciControl;
-
- if (sci == null) continue;
- AddToResultsList(sci , findText);
- }
- //SendResults(results, "resultsListUpdate");
- return results;
- }
-
- ///
- /// Initiate a find in folders search
- ///
- /// text to find in a form of regexp expression
- /// folder to search
- /// set true to search subfolders
- /// results
- public FindResults GetFindInFolderResultsList(string pattern, string folder, bool recursive)
- {
- return GetFindInFolderResultsList(pattern, folder, "*.as", recursive);
- }
-
- ///
- /// Initiate a find in folders search with different file mask
- ///
- /// text to find in a form of regexp expression
- /// folder to search
- /// mask of files to search
- /// set true to search subfolders
- /// results
- public FindResults GetFindInFolderResultsList(string pattern, string folder, string mask, bool recursive)
- {
- results = FindInFiles.GetSearchResults(folder, pattern, mask, recursive, pluginUI.RegExp, pluginUI.WholeWord, pluginUI.MatchCase);
- //SendResults(results, "resultsListUpdate");
- return results;
- }
-
- ///
- /// perform a search
- ///
- ///
- ///
- ///
- private FindResults AddToResultsList(ScintillaControl sci, string findText)
- {
- try
- {
- string inText = sci.Text;
- findText = getSafeSearch(findText);
- MatchCollection searchResults = Regex.Matches(inText, findText, GetRegexOptions());
- results.AddResults(sci, searchResults);
- }
- catch
- {
- //MessageBox.Show("error in addToResultsList");
- //MainForm.AddTraceLogEntry("Error searching in file", 5);
- }
- return results;
- }
-
- ///
- /// focus the scintilla control and move carret to position
- ///
- /// position count in chars from the beginning of document
- public void GotoPosAndFocus(int position)
- {
- try{
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
-
- GotoPosAndFocus(document.SciControl, position, 0);
- }
- catch{
- }
-
- }
-
- ///
- /// focus on a file, open it if needed and position the carret
- ///
- /// file to open
- /// position in file
- ///
- public void GotoPosAndFocus(string fileName, int position, int length)
- {
- MainForm.OpenEditableDocument(fileName);
- GotoPosAndFocus(position);
- }
-
- ///
- /// focus a needed scientilla control and position the carret
- ///
- /// a scientilla control to focus
- /// position of the carret in the text
- ///
- public void GotoPosAndFocus(ScintillaNet.ScintillaControl sci, int position, int length)
- {
- // don't correct to multi-byte safe position (assumed correct)
- int line = sci.LineFromPosition(position);
- //sci.EnsureVisible(line);
- sci.ExpandAllFolds();
-
- sci.SetSel(position, position + length);
- // sci.EnsureVisible(line);
-
- int top = sci.FirstVisibleLine;
- int middle = top + sci.LinesOnScreen/2;
- sci.LineScroll(0, line-middle);
-
- }
-
-
- #endregion
-
- #region settings getters
- public string CurFile
- {
- get {return MainForm.CurrentDocument.FileName; }
- }
-
- public int CurPosition
- {
- get {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- return document.SciControl.CurrentPos;
- }
- }
-
- public string[] ClassPaths
- {
- get {return classPaths;}
- }
- #endregion
-
-
- #region IPlugin Members
-
-
- public object Settings
- {
- get { return settingObject; }
- }
-
- #endregion
-
- #region IPlugin Members
-
-
- public int Api
- {
- get { return 1; }
- }
-
- #endregion
- }
-}
diff --git a/ findandreplaceex/Backup/PluginUI.cs b/ findandreplaceex/Backup/PluginUI.cs
deleted file mode 100644
index b95876e..0000000
--- a/ findandreplaceex/Backup/PluginUI.cs
+++ /dev/null
@@ -1,1799 +0,0 @@
-/*
- * Created by IAP.
- * User: Itzik Arzoni (itzikiap@nana.co.il)
- * Date: 13/12/2005
- * Time: 21:43
- *
- * To change this template use Tools | Options | Coding | Edit Standard Headers.
- */
-
-using System;
-using System.ComponentModel;
-using System.Text.RegularExpressions;
-using WeifenLuo.WinFormsUI;
-using ScintillaNet;
-using System.Windows.Forms;
-using System.Collections;
-using System.Text;
-using System.Diagnostics;
-using System.Collections.Generic;
-using PluginCore;
-using PluginCore.Managers;
-using System.Drawing;
-using FlashDevelop;
-
-
-namespace FindReplaceEx
-{
- ///
- /// Description of PluginUI.
- ///
- public class PluginUI : System.Windows.Forms.DockPanelControl
- {
- private System.ComponentModel.IContainer components;
- // reference to the plugin interface
- private PluginMain plugin;
- private string lastPath;
- private bool replaceShown;
- private TextBox findTxt;
- private ToolTip toolTip;
- private TabControl tabControl;
- private TabPage optionsPage;
- private CheckBox autoFeedChk;
- private CheckBox autoChk;
- private CheckBox openFilesChk;
- private TabPage replacePage;
- private Label resultsLbl;
- private Button switchFindReplaceBtn;
- private TextBox replaceTxt;
- private Button replaceBtn;
- private Button copyFindReplaceBtn;
- private Button button1;
- private Button ofrBtn;
- private TabPage filterPage;
- private ComboBox filterTxt;
- private Button regexHelpBtn;
- private TabPage foldersPage;
- private TextBox fileMaskTxt;
- private CheckBox searchSubfoldersChk;
- private Button browseBtn;
- private ComboBox folderTxt;
- private CheckBox folderFilesChk;
- private RadioButton checkNoneRdo;
- private RadioButton checkcCustomeRdo;
- private RadioButton checkFileRdo;
- private RadioButton checkSelectonRdo;
- private RadioButton checkFilterRdo;
- private GroupBox filterGroup;
- private RadioButton checkAllRdo;
- private ColumnHeader at;
- private ListView resultsLst;
- private ColumnHeader columnLineNum;
- private ColumnHeader columnFileName;
- private ColumnHeader columnLineText;
- private FolderBrowserDialog fileBrowserDlg;
- private Button findBtn;
- private CheckBox regexpChk;
- private CheckBox wholeWordChk;
- private CheckBox matchCaseChk;
- private GroupBox findGroup;
- private ColumnHeader result;
- private ColumnHeader filename;
- private ColumnHeader mark;
- private TabPage operationsPage;
- private Button deleteBtn;
- private Button bookmarkBtn;
- private Button clearFilterBtn;
- private CheckBox regExReplaceChk;
- private Button CopyResultsBtn;
- private string state;
-// private bool classPathRoot;
-
- public PluginUI(PluginMain pluginMain)
- {
- InitializeComponent();
-
- // reference to the plugin interface
- this.plugin = pluginMain;
- toolTip.Active = true;
- state = "<>";
- // switchFindReplaceBtn.Image = plugin.MainForm.GetSystemImage(10);
-
-
- //resultsPanel = plugin.MainForm.FindPlugin("24df7cd8-e5f0-4171-86eb-7b2a577703ba");
- }
-
- #region Windows Forms Designer generated code
- ///
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- ///
- private void InitializeComponent() {
- this.components = new System.ComponentModel.Container();
- this.findTxt = new System.Windows.Forms.TextBox();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- this.checkNoneRdo = new System.Windows.Forms.RadioButton();
- this.checkcCustomeRdo = new System.Windows.Forms.RadioButton();
- this.checkFileRdo = new System.Windows.Forms.RadioButton();
- this.checkSelectonRdo = new System.Windows.Forms.RadioButton();
- this.checkFilterRdo = new System.Windows.Forms.RadioButton();
- this.folderFilesChk = new System.Windows.Forms.CheckBox();
- this.browseBtn = new System.Windows.Forms.Button();
- this.searchSubfoldersChk = new System.Windows.Forms.CheckBox();
- this.fileMaskTxt = new System.Windows.Forms.TextBox();
- this.openFilesChk = new System.Windows.Forms.CheckBox();
- this.autoChk = new System.Windows.Forms.CheckBox();
- this.autoFeedChk = new System.Windows.Forms.CheckBox();
- this.checkAllRdo = new System.Windows.Forms.RadioButton();
- this.findBtn = new System.Windows.Forms.Button();
- this.regexHelpBtn = new System.Windows.Forms.Button();
- this.regexpChk = new System.Windows.Forms.CheckBox();
- this.wholeWordChk = new System.Windows.Forms.CheckBox();
- this.matchCaseChk = new System.Windows.Forms.CheckBox();
- this.ofrBtn = new System.Windows.Forms.Button();
- this.button1 = new System.Windows.Forms.Button();
- this.copyFindReplaceBtn = new System.Windows.Forms.Button();
- this.replaceBtn = new System.Windows.Forms.Button();
- this.switchFindReplaceBtn = new System.Windows.Forms.Button();
- this.bookmarkBtn = new System.Windows.Forms.Button();
- this.deleteBtn = new System.Windows.Forms.Button();
- this.regExReplaceChk = new System.Windows.Forms.CheckBox();
- this.tabControl = new System.Windows.Forms.TabControl();
- this.optionsPage = new System.Windows.Forms.TabPage();
- this.replacePage = new System.Windows.Forms.TabPage();
- this.replaceTxt = new System.Windows.Forms.TextBox();
- this.filterPage = new System.Windows.Forms.TabPage();
- this.filterTxt = new System.Windows.Forms.ComboBox();
- this.clearFilterBtn = new System.Windows.Forms.Button();
- this.foldersPage = new System.Windows.Forms.TabPage();
- this.folderTxt = new System.Windows.Forms.ComboBox();
- this.operationsPage = new System.Windows.Forms.TabPage();
- this.resultsLbl = new System.Windows.Forms.Label();
- this.filterGroup = new System.Windows.Forms.GroupBox();
- this.at = new System.Windows.Forms.ColumnHeader();
- this.resultsLst = new System.Windows.Forms.ListView();
- this.mark = new System.Windows.Forms.ColumnHeader();
- this.result = new System.Windows.Forms.ColumnHeader();
- this.filename = new System.Windows.Forms.ColumnHeader();
- this.columnLineNum = new System.Windows.Forms.ColumnHeader();
- this.columnFileName = new System.Windows.Forms.ColumnHeader();
- this.columnLineText = new System.Windows.Forms.ColumnHeader();
- this.fileBrowserDlg = new System.Windows.Forms.FolderBrowserDialog();
- this.findGroup = new System.Windows.Forms.GroupBox();
- this.CopyResultsBtn = new System.Windows.Forms.Button();
- this.tabControl.SuspendLayout();
- this.optionsPage.SuspendLayout();
- this.replacePage.SuspendLayout();
- this.filterPage.SuspendLayout();
- this.foldersPage.SuspendLayout();
- this.operationsPage.SuspendLayout();
- this.filterGroup.SuspendLayout();
- this.findGroup.SuspendLayout();
- this.SuspendLayout();
- //
- // findTxt
- //
- this.findTxt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.findTxt.Location = new System.Drawing.Point(312, 4);
- this.findTxt.Name = "findTxt";
- this.findTxt.Size = new System.Drawing.Size(476, 20);
- this.findTxt.TabIndex = 0;
- this.findTxt.WordWrap = false;
- this.findTxt.TextChanged += new System.EventHandler(this.FindTxtTextChanged);
- //
- // checkNoneRdo
- //
- this.checkNoneRdo.AutoSize = true;
- this.checkNoneRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkNoneRdo.Location = new System.Drawing.Point(261, 13);
- this.checkNoneRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkNoneRdo.Name = "checkNoneRdo";
- this.checkNoneRdo.Size = new System.Drawing.Size(51, 17);
- this.checkNoneRdo.TabIndex = 3;
- this.checkNoneRdo.Text = "None";
- this.toolTip.SetToolTip(this.checkNoneRdo, "Uncheck all the entries to not replace");
- this.checkNoneRdo.UseVisualStyleBackColor = false;
- this.checkNoneRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkcCustomeRdo
- //
- this.checkcCustomeRdo.AutoSize = true;
- this.checkcCustomeRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkcCustomeRdo.Location = new System.Drawing.Point(159, 13);
- this.checkcCustomeRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkcCustomeRdo.Name = "checkcCustomeRdo";
- this.checkcCustomeRdo.Size = new System.Drawing.Size(66, 17);
- this.checkcCustomeRdo.TabIndex = 6;
- this.checkcCustomeRdo.Text = "Custome";
- this.toolTip.SetToolTip(this.checkcCustomeRdo, "Default for manually checked entries.");
- this.checkcCustomeRdo.UseVisualStyleBackColor = false;
- this.checkcCustomeRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkFileRdo
- //
- this.checkFileRdo.AutoSize = true;
- this.checkFileRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkFileRdo.Checked = true;
- this.checkFileRdo.Location = new System.Drawing.Point(2, 13);
- this.checkFileRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkFileRdo.Name = "checkFileRdo";
- this.checkFileRdo.Size = new System.Drawing.Size(41, 17);
- this.checkFileRdo.TabIndex = 4;
- this.checkFileRdo.TabStop = true;
- this.checkFileRdo.Text = "File";
- this.toolTip.SetToolTip(this.checkFileRdo, "Check all the entries of the current file. (Same as All if \"search all opened fil" +
- "es\" is unchecked)");
- this.checkFileRdo.UseVisualStyleBackColor = false;
- this.checkFileRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkSelectonRdo
- //
- this.checkSelectonRdo.AutoSize = true;
- this.checkSelectonRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkSelectonRdo.Location = new System.Drawing.Point(43, 13);
- this.checkSelectonRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkSelectonRdo.Name = "checkSelectonRdo";
- this.checkSelectonRdo.Size = new System.Drawing.Size(69, 17);
- this.checkSelectonRdo.TabIndex = 5;
- this.checkSelectonRdo.Text = "Selection";
- this.toolTip.SetToolTip(this.checkSelectonRdo, "Check all the checkboxes that inside the selection.");
- this.checkSelectonRdo.UseVisualStyleBackColor = false;
- this.checkSelectonRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkFilterRdo
- //
- this.checkFilterRdo.AutoSize = true;
- this.checkFilterRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkFilterRdo.Location = new System.Drawing.Point(112, 13);
- this.checkFilterRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkFilterRdo.Name = "checkFilterRdo";
- this.checkFilterRdo.Size = new System.Drawing.Size(47, 17);
- this.checkFilterRdo.TabIndex = 6;
- this.checkFilterRdo.Text = "Filter";
- this.toolTip.SetToolTip(this.checkFilterRdo, "Check the entries that match the filter string");
- this.checkFilterRdo.UseVisualStyleBackColor = false;
- this.checkFilterRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // folderFilesChk
- //
- this.folderFilesChk.Location = new System.Drawing.Point(8, 32);
- this.folderFilesChk.Name = "folderFilesChk";
- this.folderFilesChk.Size = new System.Drawing.Size(108, 24);
- this.folderFilesChk.TabIndex = 9;
- this.folderFilesChk.Text = "All Files in Folder";
- this.toolTip.SetToolTip(this.folderFilesChk, "Check this to set the next search to be in alll files in the above directory.");
- this.folderFilesChk.CheckedChanged += new System.EventHandler(this.FolderFilesChkCheckedChanged);
- //
- // browseBtn
- //
- this.browseBtn.Location = new System.Drawing.Point(232, 32);
- this.browseBtn.Name = "browseBtn";
- this.browseBtn.Size = new System.Drawing.Size(66, 23);
- this.browseBtn.TabIndex = 1;
- this.browseBtn.Text = "Browse...";
- this.toolTip.SetToolTip(this.browseBtn, "Browse for a folder to search in.");
- this.browseBtn.Click += new System.EventHandler(this.BrowseBtnClick);
- //
- // searchSubfoldersChk
- //
- this.searchSubfoldersChk.Checked = true;
- this.searchSubfoldersChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.searchSubfoldersChk.Location = new System.Drawing.Point(104, 32);
- this.searchSubfoldersChk.Name = "searchSubfoldersChk";
- this.searchSubfoldersChk.Size = new System.Drawing.Size(80, 24);
- this.searchSubfoldersChk.TabIndex = 9;
- this.searchSubfoldersChk.Text = "Subfolders";
- this.toolTip.SetToolTip(this.searchSubfoldersChk, "Also search in subfolders.");
- this.searchSubfoldersChk.CheckedChanged += new System.EventHandler(this.FolderFilesChkCheckedChanged);
- //
- // fileMaskTxt
- //
- this.fileMaskTxt.Location = new System.Drawing.Point(177, 33);
- this.fileMaskTxt.Name = "fileMaskTxt";
- this.fileMaskTxt.Size = new System.Drawing.Size(48, 20);
- this.fileMaskTxt.TabIndex = 10;
- this.fileMaskTxt.Text = "*.as";
- this.toolTip.SetToolTip(this.fileMaskTxt, "Specify the file mask to search in.");
- //
- // openFilesChk
- //
- this.openFilesChk.Checked = true;
- this.openFilesChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.openFilesChk.Location = new System.Drawing.Point(8, 8);
- this.openFilesChk.Name = "openFilesChk";
- this.openFilesChk.Size = new System.Drawing.Size(142, 24);
- this.openFilesChk.TabIndex = 9;
- this.openFilesChk.Text = "All Opened Files";
- this.toolTip.SetToolTip(this.openFilesChk, "Show the reslts from all opened files.");
- this.openFilesChk.CheckedChanged += new System.EventHandler(this.OptionsChkCheckedChanged);
- //
- // autoChk
- //
- this.autoChk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.autoChk.Checked = true;
- this.autoChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.autoChk.Location = new System.Drawing.Point(161, 28);
- this.autoChk.Name = "autoChk";
- this.autoChk.Size = new System.Drawing.Size(135, 16);
- this.autoChk.TabIndex = 4;
- this.autoChk.Tag = "";
- this.autoChk.Text = "Automatic find";
- this.toolTip.SetToolTip(this.autoChk, "List results immediately while typing in the find box.");
- //
- // autoFeedChk
- //
- this.autoFeedChk.Checked = true;
- this.autoFeedChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.autoFeedChk.Location = new System.Drawing.Point(161, 8);
- this.autoFeedChk.Name = "autoFeedChk";
- this.autoFeedChk.Size = new System.Drawing.Size(135, 18);
- this.autoFeedChk.TabIndex = 21;
- this.autoFeedChk.Tag = "";
- this.autoFeedChk.Text = "Update as you type";
- this.toolTip.SetToolTip(this.autoFeedChk, "Update the find box when typing in the editor");
- //
- // checkAllRdo
- //
- this.checkAllRdo.AutoSize = true;
- this.checkAllRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkAllRdo.Location = new System.Drawing.Point(225, 13);
- this.checkAllRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkAllRdo.Name = "checkAllRdo";
- this.checkAllRdo.Size = new System.Drawing.Size(36, 17);
- this.checkAllRdo.TabIndex = 2;
- this.checkAllRdo.Text = "All";
- this.toolTip.SetToolTip(this.checkAllRdo, "Check all the entries to replace");
- this.checkAllRdo.UseVisualStyleBackColor = false;
- this.checkAllRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // findBtn
- //
- this.findBtn.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.findBtn.Location = new System.Drawing.Point(794, 2);
- this.findBtn.Name = "findBtn";
- this.findBtn.Size = new System.Drawing.Size(56, 22);
- this.findBtn.TabIndex = 1;
- this.findBtn.Text = "Find";
- this.toolTip.SetToolTip(this.findBtn, "Find the wanted phrase");
- this.findBtn.Click += new System.EventHandler(this.FindBtnClick);
- //
- // regexHelpBtn
- //
- this.regexHelpBtn.Location = new System.Drawing.Point(282, 8);
- this.regexHelpBtn.Name = "regexHelpBtn";
- this.regexHelpBtn.Size = new System.Drawing.Size(19, 21);
- this.regexHelpBtn.TabIndex = 7;
- this.regexHelpBtn.Text = "?";
- this.toolTip.SetToolTip(this.regexHelpBtn, "Help about regular expressions");
- this.regexHelpBtn.Click += new System.EventHandler(this.RegexHelpBtnClick);
- //
- // regexpChk
- //
- this.regexpChk.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.regexpChk.Location = new System.Drawing.Point(178, 12);
- this.regexpChk.Name = "regexpChk";
- this.regexpChk.Size = new System.Drawing.Size(54, 24);
- this.regexpChk.TabIndex = 4;
- this.regexpChk.Tag = "";
- this.regexpChk.Text = "RegEx";
- this.toolTip.SetToolTip(this.regexpChk, "Threat the find text as Regular Expression");
- this.regexpChk.CheckedChanged += new System.EventHandler(this.regexpChk_CheckedChanged);
- //
- // wholeWordChk
- //
- this.wholeWordChk.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.wholeWordChk.Location = new System.Drawing.Point(92, 12);
- this.wholeWordChk.Name = "wholeWordChk";
- this.wholeWordChk.Size = new System.Drawing.Size(84, 24);
- this.wholeWordChk.TabIndex = 3;
- this.wholeWordChk.Tag = "";
- this.wholeWordChk.Text = "Whole Word";
- this.toolTip.SetToolTip(this.wholeWordChk, "Search for whole word only");
- //
- // matchCaseChk
- //
- this.matchCaseChk.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.matchCaseChk.Location = new System.Drawing.Point(4, 12);
- this.matchCaseChk.Name = "matchCaseChk";
- this.matchCaseChk.Size = new System.Drawing.Size(88, 24);
- this.matchCaseChk.TabIndex = 2;
- this.matchCaseChk.Tag = "";
- this.matchCaseChk.Text = "Match Case";
- this.toolTip.SetToolTip(this.matchCaseChk, "Ignore the case OF cHaraCtERs");
- //
- // ofrBtn
- //
- this.ofrBtn.BackColor = System.Drawing.Color.Silver;
- this.ofrBtn.Location = new System.Drawing.Point(240, 8);
- this.ofrBtn.Name = "ofrBtn";
- this.ofrBtn.Size = new System.Drawing.Size(64, 32);
- this.ofrBtn.TabIndex = 7;
- this.ofrBtn.Text = "Open Files && Search ";
- this.toolTip.SetToolTip(this.ofrBtn, "Open all the files in the results list and redo he search");
- this.ofrBtn.UseVisualStyleBackColor = false;
- this.ofrBtn.Click += new System.EventHandler(this.OfrBtnClick);
- //
- // button1
- //
- this.button1.Location = new System.Drawing.Point(96, 32);
- this.button1.Name = "button1";
- this.button1.Size = new System.Drawing.Size(40, 27);
- this.button1.TabIndex = 7;
- this.button1.Text = "Clear";
- this.toolTip.SetToolTip(this.button1, "Copies the text from the find box");
- this.button1.Click += new System.EventHandler(this.Button1Click);
- //
- // copyFindReplaceBtn
- //
- this.copyFindReplaceBtn.Location = new System.Drawing.Point(56, 32);
- this.copyFindReplaceBtn.Name = "copyFindReplaceBtn";
- this.copyFindReplaceBtn.Size = new System.Drawing.Size(40, 27);
- this.copyFindReplaceBtn.TabIndex = 7;
- this.copyFindReplaceBtn.Text = "Copy";
- this.toolTip.SetToolTip(this.copyFindReplaceBtn, "Copies the text from the find box");
- this.copyFindReplaceBtn.Click += new System.EventHandler(this.copyFindReplaceBtnClick);
- //
- // replaceBtn
- //
- this.replaceBtn.Location = new System.Drawing.Point(242, 8);
- this.replaceBtn.Name = "replaceBtn";
- this.replaceBtn.Size = new System.Drawing.Size(59, 23);
- this.replaceBtn.TabIndex = 1;
- this.replaceBtn.Text = "Replace";
- this.toolTip.SetToolTip(this.replaceBtn, "Replace the selected text in all the checked entries");
- this.replaceBtn.Click += new System.EventHandler(this.ReplaceBtnClick);
- //
- // switchFindReplaceBtn
- //
- this.switchFindReplaceBtn.Location = new System.Drawing.Point(8, 32);
- this.switchFindReplaceBtn.Name = "switchFindReplaceBtn";
- this.switchFindReplaceBtn.Size = new System.Drawing.Size(48, 27);
- this.switchFindReplaceBtn.TabIndex = 7;
- this.switchFindReplaceBtn.Text = "Switch";
- this.toolTip.SetToolTip(this.switchFindReplaceBtn, "Switches the text between find and replace");
- this.switchFindReplaceBtn.Click += new System.EventHandler(this.SwtchFindReplaceBtnClick);
- //
- // bookmarkBtn
- //
- this.bookmarkBtn.Location = new System.Drawing.Point(8, 7);
- this.bookmarkBtn.Name = "bookmarkBtn";
- this.bookmarkBtn.Size = new System.Drawing.Size(75, 23);
- this.bookmarkBtn.TabIndex = 0;
- this.bookmarkBtn.Text = "Bookmark";
- this.toolTip.SetToolTip(this.bookmarkBtn, "Bookmark all the selected items");
- this.bookmarkBtn.UseVisualStyleBackColor = true;
- this.bookmarkBtn.Click += new System.EventHandler(this.bookmarkBtn_Click);
- //
- // deleteBtn
- //
- this.deleteBtn.Location = new System.Drawing.Point(89, 7);
- this.deleteBtn.Name = "deleteBtn";
- this.deleteBtn.Size = new System.Drawing.Size(75, 23);
- this.deleteBtn.TabIndex = 1;
- this.deleteBtn.Text = "Delete";
- this.toolTip.SetToolTip(this.deleteBtn, "Delete all selected line");
- this.deleteBtn.UseVisualStyleBackColor = true;
- this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click);
- //
- // regExReplaceChk
- //
- this.regExReplaceChk.AutoSize = true;
- this.regExReplaceChk.Location = new System.Drawing.Point(138, 38);
- this.regExReplaceChk.Name = "regExReplaceChk";
- this.regExReplaceChk.Size = new System.Drawing.Size(96, 17);
- this.regExReplaceChk.TabIndex = 8;
- this.regExReplaceChk.Text = "RegEx replace";
- this.toolTip.SetToolTip(this.regExReplaceChk, "If checked, you can use searched groups from the match in your replace. \\n Write " +
- "$1 to insert the text from the first group, and so on.");
- this.regExReplaceChk.UseVisualStyleBackColor = true;
- //
- // tabControl
- //
- this.tabControl.Controls.Add(this.optionsPage);
- this.tabControl.Controls.Add(this.replacePage);
- this.tabControl.Controls.Add(this.filterPage);
- this.tabControl.Controls.Add(this.foldersPage);
- this.tabControl.Controls.Add(this.operationsPage);
- this.tabControl.Location = new System.Drawing.Point(0, 43);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Size = new System.Drawing.Size(312, 90);
- this.tabControl.TabIndex = 5;
- this.tabControl.SelectedIndexChanged += new System.EventHandler(this.TabControlSelectedIndexChanged);
- //
- // optionsPage
- //
- this.optionsPage.Controls.Add(this.autoFeedChk);
- this.optionsPage.Controls.Add(this.autoChk);
- this.optionsPage.Controls.Add(this.openFilesChk);
- this.optionsPage.Location = new System.Drawing.Point(4, 22);
- this.optionsPage.Name = "optionsPage";
- this.optionsPage.Size = new System.Drawing.Size(304, 64);
- this.optionsPage.TabIndex = 2;
- this.optionsPage.Text = "Options";
- this.optionsPage.UseVisualStyleBackColor = true;
- //
- // replacePage
- //
- this.replacePage.Controls.Add(this.regExReplaceChk);
- this.replacePage.Controls.Add(this.switchFindReplaceBtn);
- this.replacePage.Controls.Add(this.replaceTxt);
- this.replacePage.Controls.Add(this.replaceBtn);
- this.replacePage.Controls.Add(this.copyFindReplaceBtn);
- this.replacePage.Controls.Add(this.button1);
- this.replacePage.Controls.Add(this.ofrBtn);
- this.replacePage.Location = new System.Drawing.Point(4, 22);
- this.replacePage.Name = "replacePage";
- this.replacePage.Size = new System.Drawing.Size(304, 64);
- this.replacePage.TabIndex = 0;
- this.replacePage.Text = "Replace";
- this.replacePage.UseVisualStyleBackColor = true;
- //
- // replaceTxt
- //
- this.replaceTxt.Location = new System.Drawing.Point(4, 8);
- this.replaceTxt.Name = "replaceTxt";
- this.replaceTxt.Size = new System.Drawing.Size(238, 20);
- this.replaceTxt.TabIndex = 0;
- this.replaceTxt.Text = "@FIND";
- //
- // filterPage
- //
- this.filterPage.Controls.Add(this.filterTxt);
- this.filterPage.Controls.Add(this.clearFilterBtn);
- this.filterPage.Controls.Add(this.regexHelpBtn);
- this.filterPage.Location = new System.Drawing.Point(4, 22);
- this.filterPage.Name = "filterPage";
- this.filterPage.Size = new System.Drawing.Size(304, 64);
- this.filterPage.TabIndex = 2;
- this.filterPage.Text = "Filter";
- this.filterPage.UseVisualStyleBackColor = true;
- //
- // filterTxt
- //
- this.filterTxt.Items.AddRange(new object[] {
- "",
- "(import|new)\\s*[\\w\\.]*@FIND[\\.;]",
- "(function|var)\\s*\\w*\\s*:\\s*@FIND\\s*[;\\(]"});
- this.filterTxt.Location = new System.Drawing.Point(8, 8);
- this.filterTxt.Name = "filterTxt";
- this.filterTxt.Size = new System.Drawing.Size(243, 21);
- this.filterTxt.TabIndex = 15;
- this.filterTxt.TextChanged += new System.EventHandler(this.FilterTxtTextChanged);
- //
- // clearFilterBtn
- //
- this.clearFilterBtn.Location = new System.Drawing.Point(257, 8);
- this.clearFilterBtn.Name = "clearFilterBtn";
- this.clearFilterBtn.Size = new System.Drawing.Size(19, 21);
- this.clearFilterBtn.TabIndex = 7;
- this.clearFilterBtn.Text = "X";
- this.clearFilterBtn.Click += new System.EventHandler(this.clearFilterBtn_Click);
- //
- // foldersPage
- //
- this.foldersPage.Controls.Add(this.fileMaskTxt);
- this.foldersPage.Controls.Add(this.searchSubfoldersChk);
- this.foldersPage.Controls.Add(this.browseBtn);
- this.foldersPage.Controls.Add(this.folderTxt);
- this.foldersPage.Controls.Add(this.folderFilesChk);
- this.foldersPage.Location = new System.Drawing.Point(4, 22);
- this.foldersPage.Name = "foldersPage";
- this.foldersPage.Size = new System.Drawing.Size(304, 64);
- this.foldersPage.TabIndex = 1;
- this.foldersPage.Text = "Folders";
- this.foldersPage.UseVisualStyleBackColor = true;
- //
- // folderTxt
- //
- this.folderTxt.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.folderTxt.Location = new System.Drawing.Point(4, 8);
- this.folderTxt.Name = "folderTxt";
- this.folderTxt.Size = new System.Drawing.Size(296, 21);
- this.folderTxt.TabIndex = 2;
- this.folderTxt.SelectedIndexChanged += new System.EventHandler(this.FolderTxtSelectedIndexChanged);
- //
- // operationsPage
- //
- this.operationsPage.Controls.Add(this.CopyResultsBtn);
- this.operationsPage.Controls.Add(this.deleteBtn);
- this.operationsPage.Controls.Add(this.bookmarkBtn);
- this.operationsPage.Location = new System.Drawing.Point(4, 22);
- this.operationsPage.Name = "operationsPage";
- this.operationsPage.Padding = new System.Windows.Forms.Padding(3);
- this.operationsPage.Size = new System.Drawing.Size(304, 64);
- this.operationsPage.TabIndex = 3;
- this.operationsPage.Text = "Operations";
- this.operationsPage.UseVisualStyleBackColor = true;
- //
- // resultsLbl
- //
- this.resultsLbl.AutoSize = true;
- this.resultsLbl.Location = new System.Drawing.Point(38, 0);
- this.resultsLbl.Name = "resultsLbl";
- this.resultsLbl.Size = new System.Drawing.Size(19, 13);
- this.resultsLbl.TabIndex = 8;
- this.resultsLbl.Text = "----";
- //
- // filterGroup
- //
- this.filterGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.filterGroup.Controls.Add(this.resultsLbl);
- this.filterGroup.Controls.Add(this.checkFilterRdo);
- this.filterGroup.Controls.Add(this.checkSelectonRdo);
- this.filterGroup.Controls.Add(this.checkFileRdo);
- this.filterGroup.Controls.Add(this.checkcCustomeRdo);
- this.filterGroup.Controls.Add(this.checkAllRdo);
- this.filterGroup.Controls.Add(this.checkNoneRdo);
- this.filterGroup.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.filterGroup.Location = new System.Drawing.Point(0, 278);
- this.filterGroup.Name = "filterGroup";
- this.filterGroup.Size = new System.Drawing.Size(312, 43);
- this.filterGroup.TabIndex = 11;
- this.filterGroup.TabStop = false;
- this.filterGroup.Text = "Filter";
- //
- // at
- //
- this.at.Text = "@";
- this.at.Width = 51;
- //
- // resultsLst
- //
- this.resultsLst.Alignment = System.Windows.Forms.ListViewAlignment.SnapToGrid;
- this.resultsLst.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.resultsLst.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.mark,
- this.at,
- this.result,
- this.filename});
- this.resultsLst.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177)));
- this.resultsLst.FullRowSelect = true;
- this.resultsLst.GridLines = true;
- this.resultsLst.HideSelection = false;
- this.resultsLst.LabelWrap = false;
- this.resultsLst.Location = new System.Drawing.Point(314, 27);
- this.resultsLst.Name = "resultsLst";
- this.resultsLst.ShowGroups = false;
- this.resultsLst.Size = new System.Drawing.Size(540, 291);
- this.resultsLst.TabIndex = 7;
- this.resultsLst.UseCompatibleStateImageBehavior = false;
- this.resultsLst.View = System.Windows.Forms.View.Details;
- this.resultsLst.SelectedIndexChanged += new System.EventHandler(this.resultsLst_SelectedIndexChanged);
- this.resultsLst.DoubleClick += new System.EventHandler(this.ResultsLstDoubleClick);
- this.resultsLst.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ResultsLstItemCheck);
- this.resultsLst.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ResultsLstMouseMove);
- this.resultsLst.MouseLeave += new System.EventHandler(this.resultsLst_MouseLeave);
- this.resultsLst.Click += new System.EventHandler(this.ResultsLstClick);
- //
- // mark
- //
- this.mark.Text = "";
- this.mark.Width = 30;
- //
- // result
- //
- this.result.Text = "Result Line";
- this.result.Width = 260;
- //
- // filename
- //
- this.filename.Text = "File Name";
- //
- // columnLineNum
- //
- this.columnLineNum.Text = "@";
- this.columnLineNum.Width = 35;
- //
- // columnFileName
- //
- this.columnFileName.Text = "File Name";
- this.columnFileName.Width = 87;
- //
- // columnLineText
- //
- this.columnLineText.Text = "Line Text";
- this.columnLineText.Width = 351;
- //
- // findGroup
- //
- this.findGroup.Controls.Add(this.matchCaseChk);
- this.findGroup.Controls.Add(this.wholeWordChk);
- this.findGroup.Controls.Add(this.regexpChk);
- this.findGroup.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.findGroup.Location = new System.Drawing.Point(0, 0);
- this.findGroup.Name = "findGroup";
- this.findGroup.Size = new System.Drawing.Size(312, 41);
- this.findGroup.TabIndex = 4;
- this.findGroup.TabStop = false;
- this.findGroup.Text = "Find";
- //
- // CopyResultsBtn
- //
- this.CopyResultsBtn.Location = new System.Drawing.Point(8, 35);
- this.CopyResultsBtn.Name = "CopyResultsBtn";
- this.CopyResultsBtn.Size = new System.Drawing.Size(107, 23);
- this.CopyResultsBtn.TabIndex = 1;
- this.CopyResultsBtn.Text = "Copy To Results";
- this.CopyResultsBtn.UseVisualStyleBackColor = true;
- this.CopyResultsBtn.Click += new System.EventHandler(this.CopyResultsBtn_Click);
- //
- // PluginUI
- //
- this.BackColor = System.Drawing.SystemColors.Control;
- this.Controls.Add(this.findGroup);
- this.Controls.Add(this.findBtn);
- this.Controls.Add(this.filterGroup);
- this.Controls.Add(this.findTxt);
- this.Controls.Add(this.tabControl);
- this.Controls.Add(this.resultsLst);
- this.Name = "PluginUI";
- this.Size = new System.Drawing.Size(854, 322);
- this.tabControl.ResumeLayout(false);
- this.optionsPage.ResumeLayout(false);
- this.replacePage.ResumeLayout(false);
- this.replacePage.PerformLayout();
- this.filterPage.ResumeLayout(false);
- this.foldersPage.ResumeLayout(false);
- this.foldersPage.PerformLayout();
- this.operationsPage.ResumeLayout(false);
- this.filterGroup.ResumeLayout(false);
- this.filterGroup.PerformLayout();
- this.findGroup.ResumeLayout(false);
- this.ResumeLayout(false);
- this.PerformLayout();
-
- }
- #endregion
-
- #region settings and updates
- ///
- /// udate the selected settings
- ///
- ///
- public void UpdateSettings(Settings settingsObject)
- {
- autoFeedChk.Checked = settingsObject.FeedAsYouType;
-
- autoChk.Checked = settingsObject.FindAsYouType;
- //resizeToFit = resize;
- ChangeFilterPresets(settingsObject.FilterPresets);
-
- resultsLst.ShowGroups = settingsObject.GroupByFile;
- }
-
- ///
- /// update the class paths list for the find in folder
- ///
- /// new class paths
- public void UpdateFolderClassPaths(string[] classPaths)
- {
- string[] presets = classPaths;
- folderTxt.BeginUpdate();
- folderTxt.Items.Clear();
- foreach (string itemTxt in presets)
- {
- folderTxt.Items.Add(itemTxt);
- }
- folderTxt.Text = presets[0];
- lastPath = presets[0];
- folderTxt.EndUpdate();
- }
-
- ///
- /// show or hide the folder tab
- ///
- /// show or hide
- private void ShowFolderMode(bool flag)
- {
- if (flag)
- {
- ShowReplaceMode(false);
- plugin.UpdateProjectClassPaths();
- folderFilesChk.Checked = true;
- }
- else
- {
- folderFilesChk.Checked = false;
- }
- }
-
- ///
- /// focus the find text box
- ///
- public void EnableFocus()
- {
- EnableFocus(false);
- }
-
- ///
- /// focus in the find or the replace input box
- ///
- /// if true - focus on the replace
- public void EnableFocus(bool replace)
- {
- this.plugin.Panel.Show();
-
- if (!replace)
- {
- findTxt.Focus();
- }
- else
- {
- ShowReplace = true;
- replaceTxt.Focus();
- }
- }
-
- ///
- /// save the status of the panel
- ///
- private void SaveState()
- {
- if (state.IndexOf("<>") == 0)
- {
- string pState = "";
- if (autoChk.Checked)
- pState += "A";
- if (autoFeedChk.Checked)
- pState += "F";
- if (MatchCase)
- pState += "I";
- if (WholeWord)
- pState += "W";
- if (RegExp)
- pState += "R";
- if (openFilesChk.Checked)
- pState += "O";
- state = pState;
- }
- }
-
- ///
- /// restore the status of the panel, after some operations that changed it
- ///
- private void RestoreState()
- {
- autoChk.Checked = state.IndexOf("A") > -1;
- autoFeedChk.Checked = state.IndexOf("F") > -1;
- MatchCase = state.IndexOf("I") > -1;
- WholeWord = state.IndexOf("W") > -1;
- RegExp = state.IndexOf("R") > -1;
- openFilesChk.Checked = state.IndexOf("O") > -1;
- state = "<>";
- }
-
- ///
- /// Stops the parse timer if not enabled.
- ///
- public void Terminate()
- {
- }
-
- #endregion
-
- #region Find Code
- ///
- /// set the text in the find box
- ///
- /// new text
- public void SetFindText(string newText)
- {
- SetFindText(newText, false);
- }
-
- ///
- /// Set the text in the find box, no matter what are the settings
- ///
- /// new text
- /// true to force change it
- public void SetFindText(string newText, bool force)
- {
- if ((autoFeedChk.Checked) || force)
- {
- if (ShowReplace)
- {
- replaceTxt.Text = newText;
- }
- else
- {
- findTxt.Text = newText;
- }
- }
- }
-
- ///
- ///lists all the results in the list box
- ///given a results object
- ///
- public void ListAllResults(FindResults results)
- {
- if (state.IndexOf("<>") == 0)
- {
- resultsLst.BeginUpdate();
- resultsLst.Items.Clear();
- resultsLst.Groups.Clear();
- FindMatch match = results.FirstResult();
- String file = "";
- ListViewGroup gr = null;
- while (match != null)
- {
- if (file != match.FileName)
- {
- file = match.FileName;
- gr = new ListViewGroup(file, HorizontalAlignment.Left);
-
- gr.Name = file;
- gr.Header = file;
- this.resultsLst.Groups.Add(gr);
- }
-
- AddMatchToGroup(gr, match);
-
- match = results.NextResult();
- }
-// if (resultsLst.Items.Count > 0)
-// resultsLst.EnsureVisible(resultsLst.Items.Count-1);
- CheckListItems();
- resultsLst.EndUpdate();
- }
- }
-
- ///
- /// Finds a text in open document, or all open documents and list it.
- /// using text in find input box
- ///
- public void ListAllFindText()
- {
- ListAllFindText(findTxt.Text);
- }
-
- ///
- /// Finds a text in open document, or all open documents and list it
- ///
- /// text to find
- public void ListAllFindText(string Text)
- {
- ListAllFindText(Text, (plugin.Settings as Settings).IgnoreBelow);
- }
-
- ///
- /// Finds a text in open document, or all open documents and list it
- ///
- /// text to find
- /// characters threshold
- public void ListAllFindText(string Text, int minChars)
- {
- if (Text.Length >= minChars)
- {
- resultsLst.Tag = folderFilesChk.Checked ? "V": "X";
- DefaultReplaceCheck();
- FindResults results;
- if (folderFilesChk.Checked)
- {
- results = plugin.GetFindInFolderResultsList(Text, folderTxt.Text, fileMaskTxt.Text, searchSubfoldersChk.Checked);
- folderFilesChk.Checked = false;
- }
- else if (openFilesChk.Checked)
- {
- results = plugin.GetAllDocumentsResultsList(Text);
- }
- else
- {
- results = plugin.GetResultsList(Text);
- }
- resultsLst.Columns[2].Text = Text;
- ListAllResults(results);
- }
- }
-
- ///
- /// adds a match item to a list group
- ///
- /// a group
- /// the match to add to the group
- private void AddMatchToGroup(ListViewGroup gr, FindMatch match)
- {
- ListViewItem item = getListItemFromMatch(match);
- item.Group = gr;
- gr.Items.Add(item);
- AddItemToList(item);
- }
-
- ///
- /// Add a list view item to the list
- ///
- /// A list view item to add
- private void AddItemToList(ListViewItem item)
- {
- this.resultsLst.Items.Add(item);
- }
-
- ///
- /// Add a match item to the list
- ///
- /// A match item
- public void AddMatchToList(FindMatch m)
- {
- AddItemToList(getListItemFromMatch(m));
- }
-
- ///
- /// create a list item that represnts a match
- ///
- ///
- ///
- private ListViewItem getListItemFromMatch(FindMatch m)
- {
- string first = " ";
- if (m.FileName == plugin.CurFile)
- first = ">";
- ListViewItem item = new ListViewItem(first, 0);
- item.Tag = m;
- item.SubItems.Add("" + (m.Line + 1));
- item.SubItems.Add(m.LineText.Trim());
- item.SubItems.Add(m.FileName.Substring(m.FileName.LastIndexOf("\\") + 1));
- return item;
- }
-
- ///
- /// Sets the flag of "find as you type"
- ///
- /// New value
- public void SetFindAsYouType(bool val)
- {
- autoChk.Checked = val;
- }
-
- #endregion
-
- #region Replace code
- ///
- /// check the list items that need to be checked according to the settings
- ///
- private void CheckListItems()
- {
- if (state.IndexOf("<>") == 0)
- {
- try
- {
- string curFile = plugin.CurFile;
- string filterText = filterTxt.Tag as string;
- foreach (ListViewItem item in resultsLst.Items)
- {
- FindMatch m = item.Tag as FindMatch;
- if (checkAllRdo.Checked)
- {
- item.Checked = true;
- }
- else if (checkNoneRdo.Checked)
- {
- item.Checked = false;
- }
- else if (checkFileRdo.Checked)
- {
- item.Checked = (m.FileName == curFile);
- }
- else if (checkSelectonRdo.Checked)
- {
- int selStaert = m.Scintilla.SelectionStart;
- int selEnd = m.Scintilla.SelectionEnd;
- bool inRange = m.Position > selStaert & m.Position < selEnd;
- item.Checked = (m.FileName == curFile) & inRange;
- }
- else if (checkFilterRdo.Checked)
- {
- item.Checked = IsMatchInItem(item, 2, filterText);
-
- }
- HilightItem(item, item.Checked);
- }
- UpdateStatusBar();
- }
- catch
- {
- checkNoneRdo.Checked = true;
- }
- }
- }
-
- ///
- /// called when a selection was changed
- ///
- public void SelectionChanged()
- {
- SelectionChanged(true);
- }
-
- ///
- /// Called when a selection is changed in the scientilla
- ///
- /// Is there or isn't there a selection
- public void SelectionChanged(bool flag)
- {
- if (flag)
- {
- checkSelectonRdo.Checked = true;
- }
- else
- {
- DefaultReplaceCheck();
- }
- CheckListItems();
- }
-
- ///
- /// Goes thrugh all the entries and if they are checked, it replaces the text
- ///
- /// the text to replace
- private void ReplaceSelectedEntries(string replaceText)
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = document.SciControl;
-
- SaveState();
- autoFeedChk.Checked = false;
- autoChk.Checked = false;
- string workingFile = "";
- if (replaceShown && replaceText != "")
- {
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
-
- // switch to the next file
- if (fileName != workingFile) {
- doc.EndUndoAction();
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- }
- doc.MBSafeSetSel(m.Position, m.Text);
- string rep = replaceText.Clone() as string;
- if (regExReplaceChk.Checked) rep = ExpandReplaceGroups(rep, m);
- doc.ReplaceSel(rep);
- }
- }
- doc.EndUndoAction();
-
- }
- RestoreState();
- ShowOfr();
- }
-
- ///
- /// Replace regular expressions groups in replacement text
- ///
- /// Text to expand
- /// Search result (for reinjecting groups)
- public string ExpandReplaceGroups(string text, FindMatch match)
- {
- if (text.IndexOf('$') < 0) return match.Text;
- for (int i = 0; i < match.Groups.Count; i++)
- text = text.Replace("$" + i, match.Groups[i].Value);
- return text;
- }
-
- ///
- /// Open all files found in "Find in files" and make the search again
- ///
- private void OpenAndResearch()
- {
- SaveState();
- string findText = findTxt.Text;
- string workingFile = "";
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
- if (fileName != workingFile) {
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- }
- }
- }
- RestoreState();
- ListAllFindText(findText);
- ShowOfr();
- }
-
- ///
- /// Shows the Open and replace button instead of the normal replace
- ///
- private void ShowOfr()
- {
- string fif = "" + resultsLst.Tag;
- bool vis = (fif.IndexOf("V") != 0);
- replaceBtn.Visible = vis;
- ofrBtn.Visible = !vis;
- }
-
- ///
- /// Hides the checkboxes
- ///
- private void HideCheckboxes()
- {
- resultsLst.BeginUpdate();
- resultsLst.Visible = false;
- resultsLst.CheckBoxes = false;
- resultsLst.MultiSelect = false;
- resultsLst.Visible = true;
- resultsLst.EndUpdate();
- }
-
- ///
- /// Shows the checkboxes in the list
- ///
- private void ShowCheckboxes()
- {
- resultsLst.BeginUpdate();
- resultsLst.Visible = false;
- resultsLst.CheckBoxes = true;
- resultsLst.MultiSelect = true;
- CheckListItems();
- resultsLst.Visible = true;
- resultsLst.EndUpdate();
- }
-
- ///
- /// Shows or hide the replace tab
- ///
- /// true - shows the replace tab
- private void ShowReplaceMode(bool flag)
- {
- DefaultReplaceCheck();
- if (flag)
- {
- ShowCheckboxes();
- ShowOfr();
- }
- replaceShown = flag;
- }
- #endregion
-
- #region filter code
- ///
- /// Updates the status bar with the search results
- ///
- private void UpdateStatusBar()
- {
- this.resultsLbl.Text = "Results: "+resultsLst.Items.Count+". Selected: "+resultsLst.CheckedItems.Count;
- }
-
- ///
- /// Highlight the items in the list that match the filter
- ///
- ///
- private void HilightFilteredList(string filterText)
- {
- filterTxt.Tag = "";
- DefaultReplaceCheck();
- if (filterText.Length > 0)
- {
-
- try
- {
- Regex.IsMatch("test pattern", filterTxt.Text);
- filterTxt.Tag = Regex.Replace(filterTxt.Text, "@FIND", findTxt.Text);
- if (!checkFilterRdo.Checked)
- checkFilterRdo.Checked = true;
- }
- catch
- {
- filterTxt.Tag = Regex.Unescape(filterText);
- checkNoneRdo.Checked = true;
- }
- CheckListItems();
- }
- else
- {
-
- }
- }
-
- ///
- /// Highlight an item
- ///
- /// List view item to highlight
- /// true - to highlight
- private void HilightItem(ListViewItem item, bool isHilight)
- {
- Font font = item.Font;
- if (isHilight)
- {
- item.Font = new Font(font, FontStyle.Regular);
- item.BackColor = Color.Lavender;
- }
- else
- {
- item.Font = new Font(font, FontStyle.Regular);
- item.BackColor = Color.White;
- }
- }
-
- ///
- /// Return true if the item match the filter pattern, entered in the filter input box
- ///
- /// a list view item
- /// index of subitem (column)
- /// pattern to match
- ///
- private bool IsMatchInItem(ListViewItem item, int index, string pattern)
- {
- if (pattern.Length > 0)
- {
- bool ret = Regex.IsMatch(item.SubItems[index].Text, pattern, RegexOptions.IgnoreCase);
- return ret;
- }
- else
- return false;
- }
-
- ///
- /// Change the presets for the filter combo box
- ///
- ///
- private void ChangeFilterPresets(string[] newPresets)
- {
- if (newPresets != null)
- {
- string[] presets = newPresets;
- filterTxt.BeginUpdate();
- filterTxt.Items.Clear();
- foreach (string itemTxt in presets)
- {
- filterTxt.Items.Add(itemTxt);
- }
- filterTxt.EndUpdate();
- }
- }
-
- ///
- /// check the default filter mode, is "filter" if there is a pattern entered of "file" if no
- ///
- private void DefaultReplaceCheck()
- {
-
- if (!replaceShown)// && !openFilesChk.Checked)
- {
- FilterRadioCheck();
- }
- else
- {
- checkFileRdo.Checked = true;
- }
- CheckListItems();
- }
-
- ///
- /// Check the filter radio.
- /// If the RegEx is not valid it check the "file" mode
- ///
- private void FilterRadioCheck()
- {
-
- ScintillaControl sci =plugin.CurSciControl;
- if (sci != null)
- {
- if (sci.SelectionStart != sci.SelectionEnd)
- {
- checkSelectonRdo.Checked = true;
- }
- else if (filterTxt.Text.Length > 0)
- {
- checkFilterRdo.Checked = true;
- }
- else
- {
- checkFileRdo.Checked = true;
- }
- }
- }
- #endregion
-
- #region operation code
-
- ///
- /// switch to operation mode, show the checkboxes
- ///
- /// is in operation
- private void ShowOperationMode(bool p)
- {
- if (p)
- {
- ShowCheckboxes();
- }
- }
-
-
- ///
- /// adds bookmarks to all selected items
- ///
- private void BookmarkSearchResults()
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = document.SciControl;
-
- SaveState();
- string workingFile = "";
- doc.BeginUndoAction();
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
- if (fileName != workingFile) {
- doc.EndUndoAction();
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- }
-
- doc.MarkerAdd(m.Line, 0);
- }
- }
-
- RestoreState();
-
- ShowReplace = false;
- }
-
- private void CopyToResultsPanel()
- {
- Globals.MainForm.CallCommand("PluginCommand", "ResultsPanel.ClearResults");
- foreach (ListViewItem item in resultsLst.Items)
- {
- FindMatch m = item.Tag as FindMatch;
- int column = m.Column;
- TraceManager.Add(m.FileName + ":" + (m.Line+1).ToString() + ": characters " + m.Column + "-" + (m.Column + m.Text.Length) + " : " + m.LineText.Trim(), (Int32)TraceType.Info);
- }
- Globals.MainForm.CallCommand("PluginCommand", "ResultsPanel.ShowResults");
-
- ShowReplace = false;
- }
-
- ///
- /// Deletes all the selected (checked) results
- ///
- private void DeleteResultsLines()
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = document.SciControl;
-
- SaveState();
- string workingFile = "";
- doc.BeginUndoAction();
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
- if (fileName != workingFile) {
- doc.EndUndoAction();
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- }
- doc.SetSel(m.Position, m.Position);
- doc.LineDelete();
- }
- }
-
- doc.EndUndoAction();
- RestoreState();
- ShowReplace = false;
- }
- #endregion
-
-
- #region options properties
- ///
- /// Is the mach case sensitive
- ///
- public bool MatchCase
- {
- get {return matchCaseChk.Checked; }
- set {matchCaseChk.Checked = value;}
- }
- ///
- /// Select to match only whole word
- ///
- public bool WholeWord
- {
- get {return wholeWordChk.Checked; }
- set {wholeWordChk.Checked = value; }
- }
- ///
- /// Check as Regular expression or normal text
- ///
- public bool RegExp
- {
- get {return regexpChk.Checked; }
- set {regexpChk.Checked = value; }
- }
- ///
- /// Shows the replace tab
- ///
- public bool ShowReplace
- {
- get {return replaceShown; }
- set
- {
- if (value)
- {
- tabControl.SelectedTab = replacePage;
- }
- else
- {
- tabControl.SelectedIndex = 0;
- }
- replaceShown = value;
- }
- }
- ///
- /// Change the search path for "Find in Files"
- ///
- public string SearchPath
- {
- get {return folderTxt.Text; }
- set { folderTxt.Text = value; }
- }
- #endregion
-
- #region Controlls Events
- private void FindBtnClick(object sender, System.EventArgs e)
- {
- ListAllFindText(findTxt.Text, 1);
- //CheckListItems();
- }
-
- private void ResultsLstDoubleClick(object sender, System.EventArgs e)
- {
-
- ListViewItem item = this.resultsLst.SelectedItems[0];
- if (item == null) return;
- FindMatch m = (FindMatch)item.Tag;
- int position = m.Position;
-
- plugin.GotoPosAndFocus(m.FileName, position, m.Text.Length);
- }
-
- private void FindTxtTextChanged(object sender, System.EventArgs e)
- {
- if(autoChk.Checked)
- {
- ListAllFindText(findTxt.Text);
- }
- }
-
- private void OptionsChkCheckedChanged(object sender, System.EventArgs e)
- {
- ListAllFindText();
- }
-
-
- private void ReplaceBtnClick(object sender, System.EventArgs e)
- {
- string find = findTxt.Text;
- string replace = replaceTxt.Text;
- string curFile = plugin.CurFile;
- int curPosition = plugin.CurPosition;
- replace = Regex.Replace(replace, "@FIND", find);
- ReplaceSelectedEntries(replace);
- //ListAllFindText(replace);
- //replaceTxt.Text = "@FIND";
-// if (plugin.HideReplace)
-// ShowReplace = false;
- if ((plugin.Settings as Settings).AutoHideReplace) {
- ShowReplace = false;
- }
- plugin.GotoPosAndFocus(curFile, curPosition, 0);
- }
-
- private void CheckRdoCheckedChanged(object sender, System.EventArgs e)
- {
- CheckListItems();
- }
-
- private void ResultsLstClick(object sender, System.EventArgs e)
- {
- if (ShowReplace)
- {
- checkcCustomeRdo.Checked = true;
- }
- }
-
- private void ResultsLstItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e)
- {
- ListViewItem item = resultsLst.Items[e.Index];
- HilightItem(item, (e.NewValue == CheckState.Checked));
- }
-
- private void FilterTxtTextChanged(object sender, System.EventArgs e)
- {
- HilightFilteredList(filterTxt.Text);
- }
-
- private void SwtchFindReplaceBtnClick(object sender, System.EventArgs e)
- {
- string tempTxt = replaceTxt.Text;
- replaceTxt.Text = findTxt.Text;
- findTxt.Text = tempTxt;
- }
-
- private void FilterBtnClick(object sender, System.EventArgs e)
- {
- HilightFilteredList(filterTxt.Text);
- }
-
- private void RegexHelpBtnClick(object sender, System.EventArgs e)
- {
- MessageBox.Show("\\t Matches a tab \\u0009.\n\\e Matches an escape \\u001B.\n\\040 Matches an ASCII character as octal (up to three digits); numbers with no leading zero are backreferences \n\\x20 Matches an ASCII character using hexadecimal representation.\n\\cC Matches an ASCII control character; for example, \\cC is control-C.\n\\ When followed by a character that is not recognized as an escaped character, matches that character. For example, \\*.\n---------------------\n"+
- ". Matches any character except \\n.\n[aeiou] Matches any single character included in the specified set of characters.\n[^aeiou] Matches any single character not in the specified set of characters. [0-9a-fA-F] Use of a hyphen (–) allows specification of contiguous character ranges.\n\\w Matches any word character.equivalent to [a-zA-Z_0-9].\n\\W Matches any nonword character. equivalent to [^a-zA-Z_0-9].\n\\s Matches any white-space character. Equivalent to [ \\f\\n\\r\\t\\v].\n\\S Matches any non-white-space character. Equivalent to [^ \\f\\n\\r\\t\\v].\n\\d Matches any decimal digit.\n\\D Matches any nondigit.\n---------------------\n"+
- "\\A Specifies that the match must occur at the beginning of the string\n\\Z Specifies that the match must occur at the end of the string or before \n at the end of the string\n\\z Specifies that the match must occur at the end of the string\n\\b Specifies that the match must occur on word boundaries — that is, at the first or last characters in words separated by any nonalphanumeric characters.\n\\B Specifies that the match must not occur on a \\b boundary.\n---------------------\n"+
- "* Specifies zero or more matches; Equivalent to {0,}.\\+ Specifies one or more matches; Equivalent to {1,}.\n? Specifies zero or one matches; Equivalent to {0,1}. \n{n} Specifies exactly n matches;\n{n,} Specifies at least n matches;\n{n,m} Specifies at least n, but no more than m, matches.\n---------------------\n"+
- "| Matches any one of the terms separated by the | (vertical bar) character; The leftmost successful match wins.\n(?= ) Zero-width positive lookahead assertion. Continues match only if the subexpression matches at this position on the right. \n(?! ) Zero-width negative lookahead assertion. Continues match only if the subexpression does not match at this position on the right. \n(?<= ) Zero-width positive lookbehind assertion. Continues match only if the subexpression matches at this position on the left. For example, \n(?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 140, 17
-
-
- 17, 17
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/Backup/Properties/AssemblyInfo.cs b/ findandreplaceex/Backup/Properties/AssemblyInfo.cs
deleted file mode 100644
index c68fc1c..0000000
--- a/ findandreplaceex/Backup/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("FindReplaceEx")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("I.A.P")]
-[assembly: AssemblyProduct("FindReplaceEx")]
-[assembly: AssemblyCopyright("Copyright © I.A.P 2008")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(true)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("56827e36-936c-412a-a90a-22008a8d9cac")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.0.0")]
-[assembly: AssemblyFileVersion("1.4.0.0")]
diff --git a/ findandreplaceex/Backup/Properties/Resources.Designer.cs b/ findandreplaceex/Backup/Properties/Resources.Designer.cs
deleted file mode 100644
index 5b54c1c..0000000
--- a/ findandreplaceex/Backup/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,72 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:2.0.50727.3053
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace FindReplaceEx.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "2.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FindReplaceEx.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
-
- ///
- /// Looks up a localized string similar to .
- ///
- internal static string Label_ViewMenuItem {
- get {
- return ResourceManager.GetString("Label.ViewMenuItem", resourceCulture);
- }
- }
- }
-}
diff --git a/ findandreplaceex/Backup/Properties/Resources.resx b/ findandreplaceex/Backup/Properties/Resources.resx
deleted file mode 100644
index 4fdb1b6..0000000
--- a/ findandreplaceex/Backup/Properties/Resources.resx
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 1.3
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/Backup/Resources/LocaleHelper.cs b/ findandreplaceex/Backup/Resources/LocaleHelper.cs
deleted file mode 100644
index 6691594..0000000
--- a/ findandreplaceex/Backup/Resources/LocaleHelper.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Text;
-using System.Resources;
-using System.Reflection;
-using System.Collections.Generic;
-using PluginCore.Localization;
-using PluginCore;
-
-namespace FindReplaceEx.Resources
-{
- class LocaleHelper
- {
- private static ResourceManager resources = null;
-
- ///
- /// Initializes the localization of the plugin
- ///
- public static void Initialize(LocaleVersion locale)
- {
- String path = "FindReplaceEx.Resources." + locale.ToString();
- resources = new ResourceManager(path, Assembly.GetExecutingAssembly());
- }
-
- ///
- /// Loads a string from the internal resources
- ///
- public static String GetString(String identifier)
- {
- return resources.GetString(identifier);
- }
-
- }
-
-}
diff --git a/ findandreplaceex/Backup/Resources/en_US.resX b/ findandreplaceex/Backup/Resources/en_US.resX
deleted file mode 100644
index 9291e16..0000000
--- a/ findandreplaceex/Backup/Resources/en_US.resX
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Set to true to automaticaly hide the replace after a successful replace operation.
-
-
- Set to true to feed the "find" input box as you type in the scientilla editor
-
-
- Set to true to automaticaly feed the "find" input with the word under the cursor when the carret is moved.
-
-
- Set true to instantly find all text as you type in the "find" input box.
-
-
- Shortcut to open the Find panel
-
-
- rtcut to open the Replace section in the FindReplace panel
-
-
- Extended Find and Replace Dialog
-
-
- &Find && Replace Ex
-
-
- Find &&Replace Ex
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/Backup/Results.cs b/ findandreplaceex/Backup/Results.cs
deleted file mode 100644
index 7bd3ad1..0000000
--- a/ findandreplaceex/Backup/Results.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * results list holder for find operations
- */
-
-using System;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.IO;
-//using System.Text.RegularExpressions;
-using WeifenLuo.WinFormsUI;
-using ScintillaNet;
-
-namespace FindReplaceEx
-{
- ///
- /// Description of Results.
- ///
- public class FindMatch
- {
- private Match match;
- private string fileName;
- private ScintillaControl scintilla;
- private Int32 position;
- private int column;
- private string text;
- private string lineText;
- private int line;
- private GroupCollection groups;
-
- public FindMatch(ScintillaControl sci, Match m)
- {
- fileName = sci.FileName as string;
- scintilla = sci;
- NewMatch(m);
-
- }
-
- public FindMatch(string file, int fline, int pos, string ftext, Match m)
- {
- match = m;
- fileName = file;
- line = fline;
- position = pos;
- text = ftext;
- lineText = ftext;
- if (scintilla != null)
- {
- column = scintilla.Column(position);
- }
- else
- {
- column = 0;
- }
-
- }
-
- private void NewMatch(Match m)
- {
- match = m;
- position = m.Index;
- line = scintilla.LineFromPosition(position);
- column = scintilla.Column(position);
- text = m.Value;
- lineText = scintilla.GetLine(line);
- }
-
- public int Line {
- get {
- return line;
- }
- }
- public Int32 Position {
- get {
- return position;
- }
- }
- public int Column
- {
- get
- {
- return column;
- }
- }
- ///
- /// the "find" text iteself
- ///
- public string Text {
- get {
- return text;
- }
- }
- public string LineText {
- get {
- return lineText;
- }
- }
- public string FileName {
- get {
- return fileName;
- }
- }
- public Match Match
- {
- get
- {
- return match;
- }
- set
- {
- NewMatch(value);
- }
- }
-
- public GroupCollection Groups
- {
- get
- {
- return match.Groups;
- }
- }
-
- public ScintillaControl Scintilla {
- get {
- return scintilla;
- }
- }
-
-
- }
-
- public class FindResults
- {
- private ArrayList results;
- private int lastIndex;
-
-
- public FindResults()
- {
- results = new ArrayList();
- lastIndex = 0;
- }
-
- public int AddResults(ScintillaControl sci, MatchCollection r)
- {
- int count = r.Count;
- for (int i=0; i< count; i++)
- {
- Match m = r[i];
- AddResult(sci, r[i]);
- }
- return Count;
- }
-
- public int AddResult(ScintillaControl sci, Match m)
- {
- FindMatch fm = new FindMatch(sci, m);
- return AddResult(fm);
- }
-
- public int AddResult(string file, int fline, int pos, string ftext, Match m)
- {
- FindMatch fm = new FindMatch(file, fline, pos, ftext, m);
- return AddResult(fm);
- }
-
- public int AddResult(FindMatch fm)
- {
- results.Add(fm);
- return Count;
- }
-
- public FindMatch GetResult(int index)
- {
- if (index < 0 || index >= Count)
- {
- return null;
- }
- lastIndex = index;
- FindMatch ret = (FindMatch)results[index];
- return ret;
- }
-
- public FindMatch FirstResult()
- {
- return GetResult(0);
- }
-
- public FindMatch NextResult()
- {
- return GetResult(lastIndex + 1);
- }
-
- public FindMatch PreviousResult()
- {
- return GetResult(lastIndex - 1);
- }
-
- public void Filter(string filterText)
- {
- foreach(FindMatch m in results)
- {
- if (Regex.IsMatch(m.LineText, Regex.Unescape(filterText)))
- results.Remove(m);
- }
- }
-
- public int Index {
- get {
- return lastIndex;
- }
- set {
- if (value >= 0 || value < Count)
- lastIndex = value;
- }
- }
-
- public int Count {
- get {
- return results.Count;
- }
- }
- }
-}
diff --git a/ findandreplaceex/Backup/Settings.cs b/ findandreplaceex/Backup/Settings.cs
deleted file mode 100644
index 94db5d3..0000000
--- a/ findandreplaceex/Backup/Settings.cs
+++ /dev/null
@@ -1,125 +0,0 @@
-using System;
-using System.Text;
-using System.Collections.Generic;
-using System.ComponentModel;
-using PluginCore.Localization;
-using System.Windows.Forms;
-
-namespace FindReplaceEx
-{
- [Serializable]
- public class Settings
- {
- public const Keys DEFAULT_FIND = Keys.Alt | Keys.F;
- public const Keys DEFAULT_REPLACE = Keys.Alt| Keys.R;
-
- //public const string[] DEFAULT_FILTER_PRESETS = ["(import|new)\\s*[\\w\\.]*@FIND[\\.;],(function|var)\\s*\\w*\\s*:\\s*@FIND\\s*[;\\(]"];
-
- private Keys findShortcut = DEFAULT_FIND;
- private Keys replaceShortcut = DEFAULT_REPLACE;
- private bool findAsYouType = true;
- private bool feedWordAsYouType = true;
- private bool feedWordOnCaretMovement = true;
- private bool autoHideReplace = true;
- private bool groupByFile = true;
- private int ignoreCharactersBelow = 3;
- private int typingTimerInterval = 500;
- private string[] filterPresets = null;
-
-
- [DisplayName("Find Shortcut")]
- [Category("Shortcuts")]
- [Description("A keybard shortcut to focus on the find input box"), DefaultValue(DEFAULT_FIND)]
- public Keys FindShortcut
- {
- get { return findShortcut; }
- set { findShortcut = value; }
- }
-
- [DisplayName("Replace Shortcut")]
- [Category("Shortcuts")]
- [Description("A keybard shortcut to focus on the find input box"), DefaultValue(DEFAULT_REPLACE)]
- public Keys ReplaceShortcut
- {
- get { return replaceShortcut; }
- set { replaceShortcut = value; }
- }
-
- [DisplayName("Find As You Type")]
- [Category("Settings")]
- [Description("Instantly make a search when you type in the find input. Also search when the input is change via \"FeedAsYouType\"."), DefaultValue(true)]
- public bool FindAsYouType
- {
- get { return findAsYouType; }
- set { findAsYouType = value; }
- }
-
- [DisplayName("Feed As You Type")]
- [Category("Settings")]
- [Description("Feeds the Find input while you type text in the editor."), DefaultValue(true)]
- public bool FeedAsYouType
- {
- get { return feedWordAsYouType; }
- set { feedWordAsYouType = value; }
- }
-
- [DisplayName("Feed As You Move")]
- [Category("Settings")]
- [Description("Feeds the Find input while you move the carret in the editor."), DefaultValue(true)]
- public bool FeedOnCaret
- {
- get { return feedWordOnCaretMovement; }
- set { feedWordOnCaretMovement = value; }
- }
-
- [DisplayName("Auto Hide Replace")]
- [Category("Settings")]
- [Description("Hides the Replace tab after successful replace."), DefaultValue(true)]
- public bool AutoHideReplace
- {
- get { return autoHideReplace; }
- set { autoHideReplace = value; }
- }
-
-
- [DisplayName("Group By File")]
- [Category("Settings")]
- [Description("Group all the results from the same file under a title."), DefaultValue(true)]
- public bool GroupByFile
- {
- get { return groupByFile; }
- set { groupByFile = value; }
- }
-
-
-
-
- [DisplayName("Ignore Below")]
- [Category("Settings")]
- [Description("When FindAsYouType is on, set the minimum characters to activate the find."), DefaultValue(3)]
- public int IgnoreBelow
- {
- get { return ignoreCharactersBelow; }
- set { ignoreCharactersBelow = value; }
- }
-
- [DisplayName("Typing Timer Interval")]
- [Category("Settings")]
- [Description("When FeedAsYouMove is true, sets the delay until the panel is refreshed. This setting is to prevent overload of searches."), DefaultValue("500")]
- public int TypingTimerInterval
- {
- get { return typingTimerInterval; }
- set { typingTimerInterval = value; }
- }
-
- [DisplayName("Filter Presets")]
- [Category("Settings")]
- [Description("Write you favorite regex filters here"), DefaultValue(null)]
- public string[] FilterPresets
- {
- get { return filterPresets; }
- set { filterPresets = value; }
- }
- }
-
-}
diff --git a/ findandreplaceex/Backup/app.config b/ findandreplaceex/Backup/app.config
deleted file mode 100644
index df20690..0000000
--- a/ findandreplaceex/Backup/app.config
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/ findandreplaceex/FindInFiles.cs b/ findandreplaceex/FindInFiles.cs
deleted file mode 100644
index ee4db5e..0000000
--- a/ findandreplaceex/FindInFiles.cs
+++ /dev/null
@@ -1,192 +0,0 @@
-/*
- * FindTool - Find In Files utility
- * Author: Philippe Elsass
- */
-using System;
-using System.IO;
-using System.Collections;
-using System.Text;
-using System.Text.RegularExpressions;
-using System.Threading;
-
-namespace FindReplaceEx
-{
- class FindInFiles
- {
- // already explored pathes
- static ArrayList known;
- static FindResults lastResults;
- // parameters
- static Regex re_pattern;
- static string fileMask;
- static string pattern;
- static bool recursive;
-
-
- ///
- /// Recursively convert classes
- ///
- /// folder to convert
- static void ExploreFolder(string path)
- {
- known.Add(path);
-
- // convert classes
- string[] files = Directory.GetFiles(path, fileMask);
- string src;
- Encoding enc;
- int line = 0;
- int position = 0;
- int lineEndChars = 0;
- TextReader sr;
- //lastResults = new FindResults();
- foreach(string file in files)
- {
- line = 0;
- position = 0;
- enc = GetEncoding(file);
- using( sr = new StreamReader(file, enc) )
- {
-
- lineEndChars = getLineEndMode(sr.ReadToEnd());
- sr.Close();
- }
- using( sr = new StreamReader(file, enc) )
- {
- src = sr.ReadLine();
- //findText = getSafeSearch(findText);
- /**
- MatchCollection searchResults = re_pattern.Matches(src);
- ScintillaNet.ScintillaControl sci = new ScintillaNet.ScintillaControl();
- lastResults.AddResults(sci, searchResults);
- */
- while (src != null)
- {
- if (re_pattern.IsMatch(src))
- {
- byte[] ba = Encoding.Convert(enc, Encoding.Default, enc.GetBytes(src));
- src = Console.Out.Encoding.GetString(ba);
- Match m = re_pattern.Match(src);
- int pos = position + m.Index;
- lastResults.AddResult(file, line, pos, src, m);
- //Console.WriteLine(file+":"+line+": "+src.TrimEnd());
- }
- position += src.Length+lineEndChars;
- line++;
- src = sr.ReadLine();
-
- }
-
- sr.Close();
- }
- }
- if (!recursive)
- return;
-
- // explore subfolders
- string[] dirs = Directory.GetDirectories(path);
- foreach(string dir in dirs)
- {
- if (!known.Contains(dir)) ExploreFolder(dir);
- }
- }
-
- static int getLineEndMode(string input)
- {
- if (input.IndexOf("\n\r") > -1 || input.IndexOf("\r\n") > -1)
- {
- return 2;
- }
- else
- {
- return 1;
- }
- }
-
- ///
- /// Adapted from FlashDevelop: FileSystem.cs
- /// Detects the file encoding from the file data.
- ///
- static Encoding GetEncoding(string file)
- {
- byte[] bom = new byte[4];
- System.IO.FileStream fs = new System.IO.FileStream(file, System.IO.FileMode.Open, System.IO.FileAccess.Read, System.IO.FileShare.Read);
- if (fs.CanSeek)
- {
- fs.Read(bom, 0, 4); fs.Close();
- if ((bom[0] == 0xef && bom[1] == 0xbb && bom[2] == 0xbf))
- {
- return Encoding.UTF8;
- }
- else if ((bom[0] == 0xff && bom[1] == 0xfe))
- {
- return Encoding.Unicode;
- }
- else if ((bom[0] == 0xfe && bom[1] == 0xff))
- {
- return Encoding.BigEndianUnicode;
- }
- else if ((bom[0] == 0x2b && bom[1] == 0x2f && bom[2] == 0xfe && bom[3] == 0x76))
- {
- return Encoding.UTF7;
- }
- else
- {
- return Encoding.Default;
- }
- }
- else
- {
- return Encoding.Default;
- }
- }
-
-
- ///
- /// THIS FUNCTION IS COMPLETE!!
- ///
- ///
- ///
- public static FindResults GetSearchResults(string folder, string input, string mask, bool isRecursive, bool isRegex, bool isWholeWord, bool isIgnoreCase)
- {
- fileMask = mask;
- pattern = input;
- if (!isRegex) pattern = Regex.Escape(pattern);
- if (isWholeWord) pattern = "(?
-
-
- Debug
- AnyCPU
- 9.0.30729
- 2.0
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}
- Library
- Properties
- FindReplaceEx
- FindReplaceEx
- v3.5
- 512
-
-
-
-
- 3.5
-
-
-
- true
- full
- false
- ..\..\..\FlashDevelop\Bin\Debug\Plugins\
- DEBUG;TRACE
- prompt
- 4
-
-
- pdbonly
- true
- ..\..\..\FlashDevelop\Bin\Debug\Plugins\
- TRACE
- prompt
- 4
-
-
- true
- ..\..\..\..\FlashDevelop\flashdevelop-development\FlashDevelop\Bin\Debug\Plugins\
- DEBUG;TRACE
- full
- x86
- prompt
-
-
- bin\x86\Release\
- TRACE
- true
- pdbonly
- x86
- prompt
-
-
-
- ..\..\..\..\FlashDevelop\flashdevelop-development\FlashDevelop\Bin\Debug\Plugins\ASCompletion.dll
-
-
- False
- ..\..\..\..\FlashDevelop\flashdevelop-development\FlashDevelop\Bin\Debug\FlashDevelop.exe
-
-
- False
- ..\..\..\..\FlashDevelop\PluginCore.dll
-
-
-
-
-
-
-
-
-
-
-
- UserControl
-
-
-
- True
- True
- Resources.resx
-
-
-
-
-
-
-
-
-
-
- PluginUI.cs
-
-
- ResXFileCodeGenerator
- Resources.Designer.cs
-
-
- Designer
-
-
-
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/FindReplaceEx.sln b/ findandreplaceex/FindReplaceEx.sln
deleted file mode 100644
index 55fe77b..0000000
--- a/ findandreplaceex/FindReplaceEx.sln
+++ /dev/null
@@ -1,37 +0,0 @@
-
-Microsoft Visual Studio Solution File, Format Version 12.00
-# Visual Studio Express 2013 for Windows Desktop
-VisualStudioVersion = 12.0.31101.0
-MinimumVisualStudioVersion = 10.0.40219.1
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FindReplaceEx", "FindReplaceEx.csproj", "{4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}"
-EndProject
-Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "FlashDevelop", "..\..\..\..\FlashDevelop\flashdevelop-development\FlashDevelop\FlashDevelop.csproj", "{EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}"
-EndProject
-Global
- GlobalSection(SolutionConfigurationPlatforms) = preSolution
- Debug|Any CPU = Debug|Any CPU
- Debug|x86 = Debug|x86
- Release|Any CPU = Release|Any CPU
- Release|x86 = Release|x86
- EndGlobalSection
- GlobalSection(ProjectConfigurationPlatforms) = postSolution
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Debug|x86.ActiveCfg = Debug|x86
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Debug|x86.Build.0 = Debug|x86
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Release|Any CPU.Build.0 = Release|Any CPU
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Release|x86.ActiveCfg = Release|x86
- {4C951C88-D15C-498B-B3CD-AFC5F7AF92D6}.Release|x86.Build.0 = Release|x86
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}.Debug|Any CPU.Build.0 = Debug|Any CPU
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}.Debug|x86.ActiveCfg = Debug|x86
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}.Release|Any CPU.ActiveCfg = Release|Any CPU
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}.Release|Any CPU.Build.0 = Release|Any CPU
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}.Release|x86.ActiveCfg = Release|x86
- {EFD07485-9A64-4EEC-94E7-ACBD4DA5CA93}.Release|x86.Build.0 = Release|x86
- EndGlobalSection
- GlobalSection(SolutionProperties) = preSolution
- HideSolutionNode = FALSE
- EndGlobalSection
-EndGlobal
diff --git a/ findandreplaceex/FindReplaceEx.v12.suo b/ findandreplaceex/FindReplaceEx.v12.suo
deleted file mode 100644
index 0d68ee8..0000000
Binary files a/ findandreplaceex/FindReplaceEx.v12.suo and /dev/null differ
diff --git a/ findandreplaceex/PluginMain.cs b/ findandreplaceex/PluginMain.cs
deleted file mode 100644
index e8b060d..0000000
--- a/ findandreplaceex/PluginMain.cs
+++ /dev/null
@@ -1,611 +0,0 @@
-/*
- * Advanced Find and Replace Plugin for FlashDevelop3
- * Author: Itzik Arzoni IAP (itzikiap@gmail.com)
- *
- */
-
-using System;
-using System.Windows.Forms;
-using System.ComponentModel;
-using System.Text.RegularExpressions;
-using System.Collections;
-//using System.Threading;
-using System.Drawing;
-using System.IO;
-using WeifenLuo.WinFormsUI;
-using WeifenLuo.WinFormsUI.Docking;
-using PluginCore;
-using PluginCore.Controls;
-using ScintillaNet;
-using PluginCore.Localization;
-using PluginCore.Helpers;
-using PluginCore.Managers;
-using PluginCore.Utilities;
-using ASCompletion.Context;
-using ASCompletion.Model;
-using System.Collections.Generic;
-using FindReplaceEx.Resources;
-
-namespace FindReplaceEx
-{
- public class PluginMain : IPlugin
- {
-
- private Timer typingTimer;
- private string pluginName = "FindReplaceEx";
- private string pluginGuid = "0a84cd4e-64d8-4669-a082-8238aee69658";
- private string pluginAuth = "Itzik Arzoni";
- private string pluginHelp = "http://www.flashdevelop.org/community/viewtopic.php?t=485";
- private string pluginDesc = "Find and Replace plugin Expanded";
- private EventType eventMask = EventType.UIRefresh | EventType.ApplySettings | EventType.Keys | EventType.FileSwitch;
- private DockContent pluginPanel;
- private PluginUI pluginUI;
- private String settingFilename;
- private Image pluginImage;
- private Settings settingObject;
-
- private string[] classPaths;
-
- private FindResults results;
-
- #region RequiredPluginVariables
-
- public string Name
- {
- get { return this.pluginName; }
- }
-
- public string Guid
- {
- get { return this.pluginGuid; }
- }
-
- public string Author
- {
- get { return this.pluginAuth; }
- }
-
- public string Description
- {
- get { return this.pluginDesc; }
- }
-
- public string Help
- {
- get { return this.pluginHelp; }
- }
-
- public EventType EventMask
- {
- get { return this.eventMask; }
- }
-
- [Browsable(false)]
- public DockContent Panel
- {
- get { return this.pluginPanel; }
- }
-
- #endregion
-
- #region extra properties
- public IMainForm MainForm
- {
- get { return PluginBase.MainForm; }
- }
-
- [Browsable(false)]
- public PluginUI PluginUI
- {
- get { return this.pluginUI; }
- }
-
- ///
- /// a reference to the currently active acientilla control
- ///
- public ScintillaControl CurSciControl
- {
- get
- {
- // current active document
- ITabbedDocument doc = MainForm.CurrentDocument;
- ScintillaControl sci = doc.SciControl;
- return sci;
- }
- }
-
-
-
- #endregion
-
-
- #region Required Methods
-
- ///
- /// Initializes the plugin
- ///
- public void Initialize()
- {
- this.InitBasics();
- this.LoadSettings();
- this.AddEventHandlers();
- this.CreateMenuItem();
- this.CreatePluginPanel();
-
- this.typingTimer = new Timer();
- this.typingTimer.Enabled = false;
- this.typingTimer.Tick += delegate { this.TypingTimerTick(); };
- }
-
- ///
- /// Disposes the plugin
- ///
- public void Dispose()
- {
- this.SaveSettings();
- this.pluginUI.Terminate();
- }
-
- ///
- /// Handles the incoming events
- ///
- public void HandleEvent(Object sender, NotifyEvent e, HandlingPriority prority)
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = null;
- if (document != null)
- {
- doc = document.SciControl;
- }
-
- switch (e.Type)
- {
-
- case EventType.ApplySettings:
- UpdateSettings();
- break;
-
- case EventType.UIRefresh:
- try
- {
- if (pluginPanel.Visible && !(MainForm == null))
- {
- if (doc.SelectionStart == doc.SelectionEnd)
- {
- if (settingObject.FeedOnCaret)
- {
- typingTimer.Stop();
- typingTimer.Start();
- }
- pluginUI.SelectionChanged(false);
- }
- else
- {
- pluginUI.SelectionChanged();
- }
- }
- }
- catch
- {
- // ignore any error
- }
-
- break;
- case EventType.Keys:
- Keys key = ((KeyEvent)e).Value;
- if (key == PluginBase.MainForm.GetShortcutItemKeys("FindReplaceEx.Replace"))
- {
- this.pluginUI.PluginUI_FocusHandle(null, null);
- e.Handled = false;
- }
- else if (key == PluginBase.MainForm.GetShortcutItemKeys("FindReplaceEx.Find"))
- {
- this.Panel.Show();
- e.Handled = true;
- }
- break;
- case EventType.FileSwitch:
- pluginUI.setFilterMaskTxt(PluginBase.MainForm.CurrentDocument.FileName.Split('.')[1]);
- break;
- }
- }
-
- private void UpdateSettings()
- {
- this.pluginUI.UpdateSettings(settingObject);
-
- this.typingTimer.Interval = settingObject.TypingTimerInterval;
- }
-
- #endregion
-
- #region Custom Methods
-
- ///
- /// Initializes important variables
- ///
- public void InitBasics()
- {
- InitLocalization();
- String dataPath = Path.Combine(PathHelper.DataDir, "FindReplaceEx");
- if (!Directory.Exists(dataPath)) Directory.CreateDirectory(dataPath);
- this.settingFilename = Path.Combine(dataPath, "Settings.fdb");
- this.pluginImage = PluginBase.MainForm.FindImage("484|12|4|-1");
- }
-
-
- ///
- /// Initializes the localization of the plugin
- ///
- public void InitLocalization()
- {
- LocaleVersion locale = PluginBase.MainForm.Settings.LocaleVersion;
- switch (locale)
- {
- /*
- case LocaleVersion.fi_FI :
- // We have Finnish available... or not. :)
- LocaleHelper.Initialize(LocaleVersion.fi_FI);
- break;
- */
- default:
- // Plugins should default to English...
- LocaleHelper.Initialize(LocaleVersion.en_US);
- break;
- }
- this.pluginDesc = LocaleHelper.GetString("Info.Description");
- }
-
-
- ///
- /// Adds the required event handlers
- ///
- public void AddEventHandlers()
- {
- EventManager.AddEventHandler(this, eventMask);
- }
-
- ///
- /// Creates a plugin panel for the plugin
- ///
- public void CreatePluginPanel()
- {
- this.pluginUI = new PluginUI(this);
- this.pluginUI.Text = "Advanced F&R";
- this.pluginPanel = PluginBase.MainForm.CreateDockablePanel(this.pluginUI, this.pluginGuid, this.pluginImage, DockState.DockBottomAutoHide);
- PluginBase.MainForm.DockPanel.ActiveContentChanged += pluginUI.PluginUI_FocusHandle;
- this.Panel.DockHandler.DockStateChanged += pluginUI.DockHandler_DockStateChanged;
- }
-
- ///
- /// Creates a menu item for the plugin and adds a ignored key
- ///
- public void CreateMenuItem()
- {
- //String title = LocalHelper.GetString("Label.ViewMenuItem");
- String title = "Advanced Find And Replace";
- ToolStripMenuItem viewMenu = (ToolStripMenuItem)PluginBase.MainForm.FindMenuItem("ViewMenu");
- viewMenu.DropDownItems.Add(new ToolStripMenuItem(title, this.pluginImage, new EventHandler(this.OpenPanel)));
- }
-
- ///
- /// Loads the plugin settings
- ///
- public void LoadSettings()
- {
- this.settingObject = new Settings();
- if (!File.Exists(this.settingFilename)) this.SaveSettings();
- else
- {
- Object obj = ObjectSerializer.Deserialize(this.settingFilename, this.settingObject);
- this.settingObject = (Settings)obj;
- }
- PluginBase.MainForm.RegisterShortcutItem("FindReplaceEx.Find", Keys.Alt | Keys.F);
- PluginBase.MainForm.RegisterShortcutItem("FindReplaceEx.Replace", Keys.Alt | Keys.R);
- }
-
- ///
- /// Saves the plugin settings
- ///
- public void SaveSettings()
- {
- ObjectSerializer.Serialize(this.settingFilename, this.settingObject);
- }
-
- ///
- /// Opens the plugin panel if closed
- ///
- public void OpenPanel(Object sender, System.EventArgs e)
- {
- this.pluginPanel.Show();
- }
-
- #endregion
-
-
- #region sync project explorer code
-
- ///
- /// Updates the class paths from ther project explorer to use in "Find In Files"
- ///
- public void UpdateProjectClassPaths()
- {
- List classPath = ASContext.Context.Classpath;
- string[] paths = new string[classPath.Count];
- int i = 0;
-
- foreach (PathModel path in classPath)
- {
- paths.SetValue(path.Path, i++);
- }
-/* localClassPaths = (projectInfo["classpaths"]) as string[];
- string[] globalPaths = globalClassPaths.Split(';');
- classPaths = new string[localClassPaths.Length + globalPaths.Length];
- localClassPaths.CopyTo(classPaths, 0);
- globalPaths.CopyTo(classPaths,localClassPaths.Length);*/
- pluginUI.UpdateFolderClassPaths(paths);
- }
-
- #endregion
-
- #region Find and Replace commands
-
- ///
- /// Event that happens several milliseconds after typing was stopped
- /// It update the find input box
- ///
- private void TypingTimerTick()
- {
- typingTimer.Stop();
- SetFindTextInDocument();
- }
-
- ///
- /// update the find input box according to the word that is under the cursor
- ///
- public void SetFindTextInDocument()
- {
- // current active document
- ITabbedDocument doc = MainForm.CurrentDocument;
- if (doc != null)
- {
- ScintillaControl Sci = doc.SciControl;
- string text = Sci.GetWordFromPosition(Sci.CurrentPos + 1);
- SetFindTextInDocument(text);
- }
- }
-
- ///
- /// updates the find input box according to a desired text
- ///
- /// Text to find
- public void SetFindTextInDocument(string Text)
- {
- if (Text != null)
- pluginUI.SetFindText(Text);
- }
-
- ///
- /// Initiate a search for a text
- ///
- /// Text to find
- public void SearchTextInDocument(string text)
- {
- if (text.Length > 1)
- {
- SetFindTextInDocument(text);
- }
- else
- {
- SetFindTextInDocument();
- }
- pluginUI.ListAllFindText();
- }
-
- ///
- /// Get the options to add to the regexp search according to user selection
- ///
- /// Regexp options with the current choice
- private RegexOptions GetRegexOptions()
- {
- RegexOptions options = RegexOptions.None;
- if (!pluginUI.MatchCase)
- options = options | RegexOptions.IgnoreCase;
- return options;
- }
-
- ///
- /// gets a search string that is safe to searchs
- ///
- ///
- ///
- private string getSafeSearch(string input)
- {
- if (!pluginUI.RegExp)
- {
- input = Regex.Escape(input);
- }
- if (pluginUI.WholeWord)
- {
- input = "(?
- /// gets a collection of results based on input text
- ///
- /// Text to find
- /// results
- public FindResults GetResultsList(string findText)
- {
- return GetResultsList(CurSciControl, findText);
- }
-
- ///
- /// gets a collection of results based on input text in a specific scientilla control
- ///
- /// Scientilla control to perform the search
- /// text to find
- /// results
- public FindResults GetResultsList(ScintillaControl sci, string findText)
- {
- results = new FindResults();
- AddToResultsList(sci, findText);
- //SendResults(results, "resultsListUpdate");
- return results;
- }
-
- ///
- /// gets a results list from all open docuents to the wanted text
- ///
- /// text to find
- /// results
- public FindResults GetAllDocumentsResultsList(string findText)
- {
- results = new FindResults();
- foreach (ITabbedDocument document in MainForm.Documents)
- {
- if (document.Controls.Count == 0) continue;
- ScintillaControl sci = document.SciControl;
-
- if (sci == null) continue;
- AddToResultsList(sci , findText);
- }
- //SendResults(results, "resultsListUpdate");
- return results;
- }
-
- ///
- /// Initiate a find in folders search with different file mask
- ///
- /// text to find in a form of regexp expression
- /// folder to search
- /// mask of files to search
- /// set true to search subfolders
- /// results
- public FindResults GetFindInFolderResultsList(string pattern, string folder, string mask, bool recursive)
- {
- results = FindInFiles.GetSearchResults(folder, pattern, mask, recursive, pluginUI.RegExp, pluginUI.WholeWord, pluginUI.MatchCase);
- //SendResults(results, "resultsListUpdate");
- return results;
- }
-
- ///
- /// perform a search
- ///
- ///
- ///
- ///
- private FindResults AddToResultsList(ScintillaControl sci, string findText)
- {
- try
- {
- string inText = sci.Text;
- findText = getSafeSearch(findText);
- MatchCollection searchResults = Regex.Matches(inText, findText, GetRegexOptions());
- results.AddResults(sci, searchResults);
- }
- catch
- {
- //MessageBox.Show("error in addToResultsList");
- //MainForm.AddTraceLogEntry("Error searching in file", 5);
- }
- return results;
- }
-
- ///
- /// focus the scintilla control and move carret to position
- ///
- /// position count in chars from the beginning of document
- public void GotoPosAndFocus(int position)
- {
- try{
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
-
- GotoPosAndFocus(document.SciControl, position, 0);
- }
- catch{
- }
-
- }
-
- ///
- /// focus on a file, open it if needed and position the carret
- ///
- /// file to open
- /// position in file
- ///
- public void GotoPosAndFocus(string fileName, int position, int length)
- {
- MainForm.OpenEditableDocument(fileName);
- GotoPosAndFocus(position);
- }
-
- ///
- /// focus a needed scientilla control and position the carret
- ///
- /// a scientilla control to focus
- /// position of the carret in the text
- ///
- public void GotoPosAndFocus(ScintillaNet.ScintillaControl sci, int position, int length)
- {
- // don't correct to multi-byte safe position (assumed correct)
- int line = sci.LineFromPosition(position);
- //sci.EnsureVisible(line);
- sci.ExpandAllFolds();
-
- sci.SetSel(position, position + length);
- // sci.EnsureVisible(line);
-
- int top = sci.FirstVisibleLine;
- int middle = top + sci.LinesOnScreen/2;
- sci.LineScroll(0, line-middle);
-
- }
-
-
- #endregion
-
- #region settings getters
- public string CurFile
- {
- get {return MainForm.CurrentDocument.FileName; }
- }
-
- public int CurPosition
- {
- get {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- return document.SciControl.CurrentPos;
- }
- }
-
- public string[] ClassPaths
- {
- get {return classPaths;}
- }
- #endregion
-
-
- #region IPlugin Members
-
-
- public object Settings
- {
- get { return settingObject; }
- }
-
- #endregion
-
- #region IPlugin Members
-
-
- public int Api
- {
- get { return 1; }
- }
-
- #endregion
- }
-}
diff --git a/ findandreplaceex/PluginUI.cs b/ findandreplaceex/PluginUI.cs
deleted file mode 100644
index c463eef..0000000
--- a/ findandreplaceex/PluginUI.cs
+++ /dev/null
@@ -1,1851 +0,0 @@
-/*
- * Created by IAP.
- * User: Itzik Arzoni (itzikiap@nana.co.il)
- * Date: 13/12/2005
- * Time: 21:43
- *
- * To change this template use Tools | Options | Coding | Edit Standard Headers.
- */
-
-using System;
-using System.ComponentModel;
-using System.Text.RegularExpressions;
-using WeifenLuo.WinFormsUI;
-using ScintillaNet;
-using System.Windows.Forms;
-using System.Collections;
-using System.Text;
-using System.Diagnostics;
-using System.Collections.Generic;
-using PluginCore;
-using PluginCore.Managers;
-using System.Drawing;
-using PluginCore.Managers;//remove
-using FlashDevelop;
-using WeifenLuo.WinFormsUI.Docking;
-
-
-namespace FindReplaceEx
-{
- ///
- /// Description of PluginUI.
- ///
- public class PluginUI : System.Windows.Forms.DockPanelControl
- {
- private System.ComponentModel.IContainer components;
- // reference to the plugin interface
- private PluginMain plugin;
- private string lastPath;
- private bool replaceShown;
- private ComboBox findTxt;
- private ToolTip toolTip;
- private TabControl tabControl;
- private TabPage optionsPage;
- private CheckBox autoFeedChk;
- private CheckBox autoChk;
- private CheckBox openFilesChk;
- private TabPage replacePage;
- private Label resultsLbl;
- private Button switchFindReplaceBtn;
- private TextBox replaceTxt;
- private Button replaceBtn;
- private Button copyFindReplaceBtn;
- private Button clearReplaceTxt;
- private Button ofrBtn;
- private TabPage filterPage;
- private ComboBox filterTxt;
- private Button regexHelpBtn;
- private TabPage foldersPage;
- private TextBox fileMaskTxt;
- private CheckBox searchSubfoldersChk;
- private Button browseBtn;
- private ComboBox folderTxt;
- private CheckBox folderFilesChk;
- private RadioButton checkNoneRdo;
- private RadioButton checkcCustomeRdo;
- private RadioButton checkFileRdo;
- private RadioButton checkSelectonRdo;
- private RadioButton checkFilterRdo;
- private GroupBox filterGroup;
- private RadioButton checkAllRdo;
- private ColumnHeader at;
- private ListView resultsLst;
- private FolderBrowserDialog fileBrowserDlg;
- private CheckBox regexpChk;
- private CheckBox wholeWordChk;
- private CheckBox matchCaseChk;
- private GroupBox findGroup;
- private ColumnHeader result;
- private ColumnHeader filename;
- private ColumnHeader mark;
- private TabPage operationsPage;
- private Button deleteBtn;
- private Button bookmarkBtn;
- private Button clearFilterBtn;
- private CheckBox regExReplaceChk;
- private Button CopyResultsBtn;
- private ListViewItem currentItem;
- private bool toolTipShow;
- private Splitter splitter;
- private Panel optionsPanel;
- private bool inReplace;
-// private bool classPathRoot;
-
- public PluginUI(PluginMain pluginMain)
- {
- InitializeComponent();
-
- // reference to the plugin interface
- this.plugin = pluginMain;
- toolTip.Active = true;
- // switchFindReplaceBtn.Image = plugin.MainForm.GetSystemImage(10);
-
-
- //resultsPanel = plugin.MainForm.FindPlugin("24df7cd8-e5f0-4171-86eb-7b2a577703ba");
- }
-
- #region Windows Forms Designer generated code
- ///
- /// This method is required for Windows Forms designer support.
- /// Do not change the method contents inside the source code editor. The Forms designer might
- /// not be able to load this method if it was changed manually.
- ///
- private void InitializeComponent() {
- this.components = new System.ComponentModel.Container();
- this.findTxt = new System.Windows.Forms.ComboBox();
- this.toolTip = new System.Windows.Forms.ToolTip(this.components);
- this.checkNoneRdo = new System.Windows.Forms.RadioButton();
- this.checkcCustomeRdo = new System.Windows.Forms.RadioButton();
- this.checkFileRdo = new System.Windows.Forms.RadioButton();
- this.checkSelectonRdo = new System.Windows.Forms.RadioButton();
- this.checkFilterRdo = new System.Windows.Forms.RadioButton();
- this.folderFilesChk = new System.Windows.Forms.CheckBox();
- this.browseBtn = new System.Windows.Forms.Button();
- this.searchSubfoldersChk = new System.Windows.Forms.CheckBox();
- this.fileMaskTxt = new System.Windows.Forms.TextBox();
- this.openFilesChk = new System.Windows.Forms.CheckBox();
- this.autoChk = new System.Windows.Forms.CheckBox();
- this.autoFeedChk = new System.Windows.Forms.CheckBox();
- this.checkAllRdo = new System.Windows.Forms.RadioButton();
- this.regexHelpBtn = new System.Windows.Forms.Button();
- this.regexpChk = new System.Windows.Forms.CheckBox();
- this.wholeWordChk = new System.Windows.Forms.CheckBox();
- this.matchCaseChk = new System.Windows.Forms.CheckBox();
- this.ofrBtn = new System.Windows.Forms.Button();
- this.clearReplaceTxt = new System.Windows.Forms.Button();
- this.copyFindReplaceBtn = new System.Windows.Forms.Button();
- this.replaceBtn = new System.Windows.Forms.Button();
- this.switchFindReplaceBtn = new System.Windows.Forms.Button();
- this.bookmarkBtn = new System.Windows.Forms.Button();
- this.deleteBtn = new System.Windows.Forms.Button();
- this.regExReplaceChk = new System.Windows.Forms.CheckBox();
- this.tabControl = new System.Windows.Forms.TabControl();
- this.optionsPage = new System.Windows.Forms.TabPage();
- this.replacePage = new System.Windows.Forms.TabPage();
- this.replaceTxt = new System.Windows.Forms.TextBox();
- this.filterPage = new System.Windows.Forms.TabPage();
- this.filterTxt = new System.Windows.Forms.ComboBox();
- this.clearFilterBtn = new System.Windows.Forms.Button();
- this.foldersPage = new System.Windows.Forms.TabPage();
- this.folderTxt = new System.Windows.Forms.ComboBox();
- this.operationsPage = new System.Windows.Forms.TabPage();
- this.CopyResultsBtn = new System.Windows.Forms.Button();
- this.resultsLbl = new System.Windows.Forms.Label();
- this.filterGroup = new System.Windows.Forms.GroupBox();
- this.at = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.resultsLst = new System.Windows.Forms.ListView();
- this.mark = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.result = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.filename = ((System.Windows.Forms.ColumnHeader)(new System.Windows.Forms.ColumnHeader()));
- this.fileBrowserDlg = new System.Windows.Forms.FolderBrowserDialog();
- this.findGroup = new System.Windows.Forms.GroupBox();
- this.splitter = new Splitter();
- this.optionsPanel = new Panel();
- this.tabControl.SuspendLayout();
- this.optionsPage.SuspendLayout();
- this.replacePage.SuspendLayout();
- this.filterPage.SuspendLayout();
- this.foldersPage.SuspendLayout();
- this.operationsPage.SuspendLayout();
- this.filterGroup.SuspendLayout();
- this.findGroup.SuspendLayout();
- this.SuspendLayout();
- this.hideLeftSide();
- //
- // findTxt
- //
- this.findTxt.Anchor = ((System.Windows.Forms.AnchorStyles)(((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.findTxt.IntegralHeight = false;
- //this.findTxt.Location = new System.Drawing.Point(374, 4);
- this.findTxt.Name = "findTxt";
- //this.findTxt.Size = new System.Drawing.Size(216, 21);
- this.findTxt.Dock = DockStyle.Top;
- this.findTxt.TabIndex = 0;
- this.findTxt.SelectedValueChanged += new System.EventHandler(this.selectedItemFindTxt);
- this.findTxt.TextChanged += new System.EventHandler(this.FindTxtTextChanged);
- this.findTxt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.keyDownHandler);
- //
- // checkNoneRdo
- //
- this.checkNoneRdo.AutoSize = true;
- this.checkNoneRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkNoneRdo.Location = new System.Drawing.Point(314, 16);
- this.checkNoneRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkNoneRdo.Name = "checkNoneRdo";
- this.checkNoneRdo.Size = new System.Drawing.Size(51, 17);
- this.checkNoneRdo.TabIndex = 3;
- this.checkNoneRdo.Text = "None";
- this.toolTip.SetToolTip(this.checkNoneRdo, "Uncheck all the entries to not replace");
- this.checkNoneRdo.UseVisualStyleBackColor = false;
- this.checkNoneRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkcCustomeRdo
- //
- this.checkcCustomeRdo.AutoSize = true;
- this.checkcCustomeRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkcCustomeRdo.Location = new System.Drawing.Point(182, 16);
- this.checkcCustomeRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkcCustomeRdo.Name = "checkcCustomeRdo";
- this.checkcCustomeRdo.Size = new System.Drawing.Size(66, 17);
- this.checkcCustomeRdo.TabIndex = 6;
- this.checkcCustomeRdo.Text = "Custome";
- this.toolTip.SetToolTip(this.checkcCustomeRdo, "Default for manually checked entries.");
- this.checkcCustomeRdo.UseVisualStyleBackColor = false;
- this.checkcCustomeRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkFileRdo
- //
- this.checkFileRdo.AutoSize = true;
- this.checkFileRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkFileRdo.Checked = true;
- this.checkFileRdo.Location = new System.Drawing.Point(2, 16);
- this.checkFileRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkFileRdo.Name = "checkFileRdo";
- this.checkFileRdo.Size = new System.Drawing.Size(41, 17);
- this.checkFileRdo.TabIndex = 4;
- this.checkFileRdo.TabStop = false;
- this.checkFileRdo.Text = "File";
- this.toolTip.SetToolTip(this.checkFileRdo, "Check all the entries of the current file. (Same as All if \"search all opened fil" +
- "es\" is unchecked)");
- this.checkFileRdo.UseVisualStyleBackColor = false;
- this.checkFileRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkSelectonRdo
- //
- this.checkSelectonRdo.AutoSize = true;
- this.checkSelectonRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkSelectonRdo.Location = new System.Drawing.Point(46, 16);
- this.checkSelectonRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkSelectonRdo.Name = "checkSelectonRdo";
- this.checkSelectonRdo.Size = new System.Drawing.Size(69, 17);
- this.checkSelectonRdo.TabIndex = 5;
- this.checkSelectonRdo.Text = "Selection";
- this.toolTip.SetToolTip(this.checkSelectonRdo, "Check all the checkboxes that inside the selection.");
- this.checkSelectonRdo.UseVisualStyleBackColor = false;
- this.checkSelectonRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // checkFilterRdo
- //
- this.checkFilterRdo.AutoSize = true;
- this.checkFilterRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkFilterRdo.Location = new System.Drawing.Point(121, 16);
- this.checkFilterRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkFilterRdo.Name = "checkFilterRdo";
- this.checkFilterRdo.Size = new System.Drawing.Size(47, 17);
- this.checkFilterRdo.TabIndex = 6;
- this.checkFilterRdo.Text = "Filter";
- this.toolTip.SetToolTip(this.checkFilterRdo, "Check the entries that match the filter string");
- this.checkFilterRdo.UseVisualStyleBackColor = false;
- this.checkFilterRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // folderFilesChk
- //
- this.folderFilesChk.Location = new System.Drawing.Point(8, 32);
- this.folderFilesChk.Name = "folderFilesChk";
- this.folderFilesChk.Size = new System.Drawing.Size(108, 24);
- this.folderFilesChk.TabIndex = 9;
- this.folderFilesChk.Text = "All Files in Folder";
- this.folderFilesChk.ThreeState = true;
- this.toolTip.SetToolTip(this.folderFilesChk, "Check this to set the next search to be in alll files in the above directory.");
- this.folderFilesChk.CheckStateChanged += new System.EventHandler(this.FolderFilesChkCheckedStateChanged);
- //
- // browseBtn
- //
- this.browseBtn.Location = new System.Drawing.Point(232, 32);
- this.browseBtn.Name = "browseBtn";
- this.browseBtn.Size = new System.Drawing.Size(66, 23);
- this.browseBtn.TabIndex = 1;
- this.browseBtn.Text = "Browse...";
- this.toolTip.SetToolTip(this.browseBtn, "Browse for a folder to search in.");
- this.browseBtn.Click += new System.EventHandler(this.BrowseBtnClick);
- //
- // searchSubfoldersChk
- //
- this.searchSubfoldersChk.Checked = true;
- this.searchSubfoldersChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.searchSubfoldersChk.Location = new System.Drawing.Point(104, 32);
- this.searchSubfoldersChk.Name = "searchSubfoldersChk";
- this.searchSubfoldersChk.Size = new System.Drawing.Size(80, 24);
- this.searchSubfoldersChk.TabIndex = 9;
- this.searchSubfoldersChk.Text = "Subfolders";
- this.toolTip.SetToolTip(this.searchSubfoldersChk, "Also search in subfolders.");
- this.searchSubfoldersChk.CheckedChanged += new System.EventHandler(this.FolderFilesChkCheckedStateChanged);
- //
- // fileMaskTxt
- //
- this.fileMaskTxt.Location = new System.Drawing.Point(177, 33);
- this.fileMaskTxt.Name = "fileMaskTxt";
- this.fileMaskTxt.Size = new System.Drawing.Size(48, 20);
- this.fileMaskTxt.TabIndex = 10;
- this.toolTip.SetToolTip(this.fileMaskTxt, "Specify the file mask to search in.");
- //
- // openFilesChk
- //
- this.openFilesChk.Checked = true;
- this.openFilesChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.openFilesChk.Name = "openFilesChk";
- this.openFilesChk.TabIndex = 9;
- this.openFilesChk.Dock = DockStyle.Top;
- this.openFilesChk.Text = "All Opened Files";
- this.toolTip.SetToolTip(this.openFilesChk, "Show the reslts from all opened files.");
- this.openFilesChk.CheckedChanged += new System.EventHandler(this.OptionsChkCheckedChanged);
- //
- // autoChk
- //
- this.autoChk.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Right)));
- this.autoChk.Checked = true;
- this.autoChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.autoChk.Name = "autoChk";
- this.autoChk.Dock = DockStyle.Top;
- this.autoChk.TabIndex = 4;
- this.autoChk.Tag = "";
- this.autoChk.Text = "Automatic find";
- this.toolTip.SetToolTip(this.autoChk, "List results immediately while typing in the find box.");
- //
- // autoFeedChk
- //
- this.autoFeedChk.Checked = true;
- this.autoFeedChk.CheckState = System.Windows.Forms.CheckState.Checked;
- this.autoFeedChk.Name = "autoFeedChk";
- this.autoFeedChk.Dock = DockStyle.Top;
- this.autoFeedChk.TabIndex = 21;
- this.autoFeedChk.Tag = "";
- this.autoFeedChk.Text = "Update as you type";
- this.toolTip.SetToolTip(this.autoFeedChk, "Update the find box when typing in the editor");
- //
- // checkAllRdo
- //
- this.checkAllRdo.AutoSize = true;
- this.checkAllRdo.BackColor = System.Drawing.Color.Transparent;
- this.checkAllRdo.Location = new System.Drawing.Point(264, 16);
- this.checkAllRdo.Margin = new System.Windows.Forms.Padding(0);
- this.checkAllRdo.Name = "checkAllRdo";
- this.checkAllRdo.Size = new System.Drawing.Size(36, 17);
- this.checkAllRdo.TabIndex = 2;
- this.checkAllRdo.Text = "All";
- this.toolTip.SetToolTip(this.checkAllRdo, "Check all the entries to replace");
- this.checkAllRdo.UseVisualStyleBackColor = false;
- this.checkAllRdo.CheckedChanged += new System.EventHandler(this.CheckRdoCheckedChanged);
- //
- // regexHelpBtn
- //
- this.regexHelpBtn.Location = new System.Drawing.Point(282, 8);
- this.regexHelpBtn.Name = "regexHelpBtn";
- this.regexHelpBtn.Size = new System.Drawing.Size(19, 21);
- this.regexHelpBtn.TabIndex = 7;
- this.regexHelpBtn.Text = "?";
- this.toolTip.SetToolTip(this.regexHelpBtn, "Help about regular expressions");
- this.regexHelpBtn.Click += new System.EventHandler(this.RegexHelpBtnClick);
- //
- // regexpChk
- //
- this.regexpChk.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.regexpChk.Location = new System.Drawing.Point(189, 12);
- this.regexpChk.Name = "regexpChk";
- this.regexpChk.Size = new System.Drawing.Size(54, 24);
- this.regexpChk.TabIndex = 4;
- this.regexpChk.Tag = "";
- this.regexpChk.Text = "RegEx";
- this.toolTip.SetToolTip(this.regexpChk, "Threat the find text as Regular Expression");
- this.regexpChk.CheckedChanged += new System.EventHandler(this.regexpChk_CheckedChanged);
- //
- // wholeWordChk
- //
- this.wholeWordChk.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.wholeWordChk.Location = new System.Drawing.Point(99, 12);
- this.wholeWordChk.Name = "wholeWordChk";
- this.wholeWordChk.Size = new System.Drawing.Size(84, 24);
- this.wholeWordChk.TabIndex = 3;
- this.wholeWordChk.Tag = "";
- this.wholeWordChk.Text = "Whole Word";
- this.toolTip.SetToolTip(this.wholeWordChk, "Search for whole word only");
- //
- // matchCaseChk
- //
- this.matchCaseChk.FlatStyle = System.Windows.Forms.FlatStyle.Popup;
- this.matchCaseChk.Location = new System.Drawing.Point(11, 12);
- this.matchCaseChk.Name = "matchCaseChk";
- this.matchCaseChk.Size = new System.Drawing.Size(88, 24);
- this.matchCaseChk.TabIndex = 2;
- this.matchCaseChk.Tag = "";
- this.matchCaseChk.Text = "Match Case";
- this.toolTip.SetToolTip(this.matchCaseChk, "Ignore the case OF cHaraCtERs");
- //
- // ofrBtn
- //
- this.ofrBtn.BackColor = System.Drawing.Color.Silver;
- this.ofrBtn.Location = new System.Drawing.Point(240, 8);
- this.ofrBtn.Name = "ofrBtn";
- this.ofrBtn.Size = new System.Drawing.Size(64, 32);
- this.ofrBtn.TabIndex = 7;
- this.ofrBtn.Text = "Open Files && Search ";
- this.toolTip.SetToolTip(this.ofrBtn, "Open all the files in the results list and redo he search");
- this.ofrBtn.UseVisualStyleBackColor = false;
- this.ofrBtn.Click += new System.EventHandler(this.OfrBtnClick);
- //
- // button1
- //
- this.clearReplaceTxt.Location = new System.Drawing.Point(this.copyFindReplaceBtn.Location.X + this.copyFindReplaceBtn.Size.Width+30, 32);
- this.clearReplaceTxt.Name = "button1";
- this.clearReplaceTxt.Size = new System.Drawing.Size(45, 27);
- this.clearReplaceTxt.TabIndex = 7;
- this.clearReplaceTxt.Text = "Clear";
- this.toolTip.SetToolTip(this.clearReplaceTxt, "Clear the text from the find box");
- this.clearReplaceTxt.Click += new System.EventHandler(this.clearReplaceTxtClick);
- //
- // copyFindReplaceBtn
- //
- this.copyFindReplaceBtn.Location = new System.Drawing.Point(this.switchFindReplaceBtn.Location.X + this.switchFindReplaceBtn.Size.Width-15, 32);
- this.copyFindReplaceBtn.Name = "copyFindReplaceBtn";
- this.copyFindReplaceBtn.Size = new System.Drawing.Size(45, 27);
- this.copyFindReplaceBtn.TabIndex = 7;
- this.copyFindReplaceBtn.Text = "Copy";
- this.toolTip.SetToolTip(this.copyFindReplaceBtn, "Copies the text from the find box");
- this.copyFindReplaceBtn.Click += new System.EventHandler(this.copyFindReplaceBtnClick);
- //
- // replaceBtn
- //
- this.replaceBtn.Location = new System.Drawing.Point(242, 8);
- this.replaceBtn.Name = "replaceBtn";
- this.replaceBtn.Size = new System.Drawing.Size(59, 23);
- this.replaceBtn.TabIndex = 1;
- this.replaceBtn.Text = "Replace";
- this.toolTip.SetToolTip(this.replaceBtn, "Replace the selected text in all the checked entries");
- this.replaceBtn.Click += new System.EventHandler(this.ReplaceBtnClick);
- //
- // switchFindReplaceBtn
- //
- this.switchFindReplaceBtn.Location = new System.Drawing.Point(8, 32);
- this.switchFindReplaceBtn.Name = "switchFindReplaceBtn";
- this.switchFindReplaceBtn.Size = new System.Drawing.Size(52, 27);
- this.switchFindReplaceBtn.TabIndex = 7;
- this.switchFindReplaceBtn.Text = "Switch";
- this.toolTip.SetToolTip(this.switchFindReplaceBtn, "Switches the text between find and replace");
- this.switchFindReplaceBtn.Click += new System.EventHandler(this.SwtchFindReplaceBtnClick);
- //
- // bookmarkBtn
- //
- this.bookmarkBtn.Location = new System.Drawing.Point(8, 7);
- this.bookmarkBtn.Name = "bookmarkBtn";
- this.bookmarkBtn.Size = new System.Drawing.Size(75, 23);
- this.bookmarkBtn.TabIndex = 0;
- this.bookmarkBtn.Text = "Bookmark";
- this.toolTip.SetToolTip(this.bookmarkBtn, "Bookmark all the selected items");
- this.bookmarkBtn.UseVisualStyleBackColor = true;
- this.bookmarkBtn.Click += new System.EventHandler(this.bookmarkBtn_Click);
- //
- // deleteBtn
- //
- this.deleteBtn.Location = new System.Drawing.Point(89, 7);
- this.deleteBtn.Name = "deleteBtn";
- this.deleteBtn.Size = new System.Drawing.Size(75, 23);
- this.deleteBtn.TabIndex = 1;
- this.deleteBtn.Text = "Delete";
- this.toolTip.SetToolTip(this.deleteBtn, "Delete all selected line");
- this.deleteBtn.UseVisualStyleBackColor = true;
- this.deleteBtn.Click += new System.EventHandler(this.deleteBtn_Click);
- //
- // regExReplaceChk
- //
- this.regExReplaceChk.AutoSize = true;
- this.regExReplaceChk.Location = new System.Drawing.Point(160, 36);
- this.regExReplaceChk.Name = "regExReplaceChk";
- this.regExReplaceChk.Size = new System.Drawing.Size(96, 17);
- this.regExReplaceChk.TabIndex = 8;
- this.regExReplaceChk.Text = "RegEx replace";
- this.toolTip.SetToolTip(this.regExReplaceChk, "If checked, you can use searched groups from the match in your replace. \\n Write " +
- "$1 to insert the text from the first group, and so on.");
- this.regExReplaceChk.UseVisualStyleBackColor = true;
- //
- // tabControl
- //
- this.tabControl.Controls.Add(this.optionsPage);
- this.tabControl.Controls.Add(this.replacePage);
- this.tabControl.Controls.Add(this.filterPage);
- this.tabControl.Controls.Add(this.foldersPage);
- this.tabControl.Controls.Add(this.operationsPage);
- this.tabControl.Name = "tabControl";
- this.tabControl.SelectedIndex = 0;
- this.tabControl.Dock = DockStyle.Fill;
- this.tabControl.TabIndex = 5;
- this.tabControl.SelectedIndexChanged += new System.EventHandler(this.TabControlSelectedIndexChanged);
- //
- // optionsPage
- //
- this.optionsPage.Controls.Add(this.autoFeedChk);
- this.optionsPage.Controls.Add(this.autoChk);
- this.optionsPage.Controls.Add(this.openFilesChk);
- this.optionsPage.Location = new System.Drawing.Point(4, 22);
- this.optionsPage.Name = "optionsPage";
- this.optionsPage.Size = new System.Drawing.Size(304, 64);
- this.optionsPage.TabIndex = 2;
- this.optionsPage.Text = "Options";
- this.optionsPage.UseVisualStyleBackColor = true;
- //
- // replacePage
- //
- this.replacePage.Controls.Add(this.regExReplaceChk);
- this.replacePage.Controls.Add(this.switchFindReplaceBtn);
- this.replacePage.Controls.Add(this.replaceTxt);
- this.replacePage.Controls.Add(this.replaceBtn);
- this.replacePage.Controls.Add(this.copyFindReplaceBtn);
- this.replacePage.Controls.Add(this.clearReplaceTxt);
- this.replacePage.Controls.Add(this.ofrBtn);
- this.replacePage.Location = new System.Drawing.Point(4, 22);
- this.replacePage.Name = "replacePage";
- this.replacePage.Size = new System.Drawing.Size(304, 64);
- this.replacePage.TabIndex = 0;
- this.replacePage.Text = "Replace";
- this.replacePage.UseVisualStyleBackColor = true;
- //
- // replaceTxt
- //
- this.replaceTxt.Location = new System.Drawing.Point(4, 8);
- this.replaceTxt.Name = "replaceTxt";
- this.replaceTxt.Size = new System.Drawing.Size(238, 20);
- this.replaceTxt.TabIndex = 0;
- this.replaceTxt.Text = "@FIND";
- this.replaceTxt.KeyDown += new System.Windows.Forms.KeyEventHandler(this.keyDownHandler);
- //
- // filterPage
- //
- this.filterPage.Controls.Add(this.filterTxt);
- this.filterPage.Controls.Add(this.clearFilterBtn);
- this.filterPage.Controls.Add(this.regexHelpBtn);
- this.filterPage.Location = new System.Drawing.Point(4, 22);
- this.filterPage.Name = "filterPage";
- this.filterPage.Size = new System.Drawing.Size(304, 64);
- this.filterPage.TabIndex = 2;
- this.filterPage.Text = "Filter";
- this.filterPage.UseVisualStyleBackColor = true;
- //
- // filterTxt
- //
- this.filterTxt.Items.AddRange(new object[] {
- "",
- "(import|new)\\s*[\\w\\.]*@FIND[\\.;]",
- "(function|var)\\s*\\w*\\s*:\\s*@FIND\\s*[;\\(]"});
- this.filterTxt.Location = new System.Drawing.Point(8, 8);
- this.filterTxt.Name = "filterTxt";
- this.filterTxt.Size = new System.Drawing.Size(243, 21);
- this.filterTxt.TabIndex = 15;
- this.filterTxt.TextChanged += new System.EventHandler(this.FilterTxtTextChanged);
- //
- // clearFilterBtn
- //
- this.clearFilterBtn.Location = new System.Drawing.Point(257, 8);
- this.clearFilterBtn.Name = "clearFilterBtn";
- this.clearFilterBtn.Size = new System.Drawing.Size(19, 21);
- this.clearFilterBtn.TabIndex = 7;
- this.clearFilterBtn.Text = "X";
- this.clearFilterBtn.Click += new System.EventHandler(this.clearFilterBtn_Click);
- //
- // foldersPage
- //
- this.foldersPage.Controls.Add(this.fileMaskTxt);
- this.foldersPage.Controls.Add(this.searchSubfoldersChk);
- this.foldersPage.Controls.Add(this.browseBtn);
- this.foldersPage.Controls.Add(this.folderTxt);
- this.foldersPage.Controls.Add(this.folderFilesChk);
- this.foldersPage.Location = new System.Drawing.Point(4, 22);
- this.foldersPage.Name = "foldersPage";
- this.foldersPage.Size = new System.Drawing.Size(304, 64);
- this.foldersPage.TabIndex = 1;
- this.foldersPage.Text = "Folders";
- this.foldersPage.UseVisualStyleBackColor = true;
- //
- // folderTxt
- //
- this.folderTxt.ImeMode = System.Windows.Forms.ImeMode.NoControl;
- this.folderTxt.Location = new System.Drawing.Point(4, 8);
- this.folderTxt.Name = "folderTxt";
- this.folderTxt.Size = new System.Drawing.Size(296, 21);
- this.folderTxt.TabIndex = 2;
- this.folderTxt.DrawMode = DrawMode.OwnerDrawFixed;
- this.folderTxt.DrawItem += folderTxt_DrawItem;
- this.folderTxt.DropDownClosed += folderTxt_DropDownClosed;
- this.folderTxt.SelectedIndexChanged += new System.EventHandler(this.FolderTxtSelectedIndexChanged);
- //
- // operationsPage
- //
- this.operationsPage.Controls.Add(this.CopyResultsBtn);
- this.operationsPage.Controls.Add(this.deleteBtn);
- this.operationsPage.Controls.Add(this.bookmarkBtn);
- this.operationsPage.Location = new System.Drawing.Point(4, 22);
- this.operationsPage.Name = "operationsPage";
- this.operationsPage.Padding = new System.Windows.Forms.Padding(3);
- this.operationsPage.Size = new System.Drawing.Size(304, 64);
- this.operationsPage.TabIndex = 3;
- this.operationsPage.Text = "Operations";
- this.operationsPage.UseVisualStyleBackColor = true;
- //
- // CopyResultsBtn
- //
- this.CopyResultsBtn.Location = new System.Drawing.Point(8, 35);
- this.CopyResultsBtn.Name = "CopyResultsBtn";
- this.CopyResultsBtn.Size = new System.Drawing.Size(107, 23);
- this.CopyResultsBtn.TabIndex = 1;
- this.CopyResultsBtn.Text = "Copy To Results";
- this.CopyResultsBtn.UseVisualStyleBackColor = true;
- this.CopyResultsBtn.Click += new System.EventHandler(this.CopyResultsBtn_Click);
- //
- // resultsLbl
- //
- this.resultsLbl.AutoSize = true;
- this.resultsLbl.Location = new System.Drawing.Point(38, 0);
- this.resultsLbl.Name = "resultsLbl";
- this.resultsLbl.Size = new System.Drawing.Size(19, 13);
- this.resultsLbl.TabIndex = 8;
- this.resultsLbl.Text = "----";
- //
- // filterGroup
- //
- this.filterGroup.Anchor = ((System.Windows.Forms.AnchorStyles)((System.Windows.Forms.AnchorStyles.Bottom | System.Windows.Forms.AnchorStyles.Left)));
- this.filterGroup.Controls.Add(this.resultsLbl);
- this.filterGroup.Controls.Add(this.checkFilterRdo);
- this.filterGroup.Controls.Add(this.checkSelectonRdo);
- this.filterGroup.Controls.Add(this.checkFileRdo);
- this.filterGroup.Controls.Add(this.checkcCustomeRdo);
- this.filterGroup.Controls.Add(this.checkAllRdo);
- this.filterGroup.Controls.Add(this.checkNoneRdo);
- this.filterGroup.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.filterGroup.Dock = DockStyle.Bottom;
- this.filterGroup.Name = "filterGroup";
- this.filterGroup.Height = 43;
- this.filterGroup.TabIndex = 11;
- this.filterGroup.TabStop = false;
- this.filterGroup.Text = "Filter";
- //
- // at
- //
- this.at.Text = "@";
- this.at.Width = -1;
- //
- // resultsLst
- //
- this.resultsLst.Alignment = System.Windows.Forms.ListViewAlignment.SnapToGrid;
- this.resultsLst.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom)
- | System.Windows.Forms.AnchorStyles.Left)
- | System.Windows.Forms.AnchorStyles.Right)));
- this.resultsLst.Columns.AddRange(new System.Windows.Forms.ColumnHeader[] {
- this.mark,
- this.at,
- this.result,
- this.filename});
- this.resultsLst.Font = new System.Drawing.Font("Microsoft Sans Serif", 9.75F, System.Drawing.FontStyle.Regular, System.Drawing.GraphicsUnit.Point, ((byte)(177)));
- this.resultsLst.FullRowSelect = true;
- this.resultsLst.GridLines = true;
- this.resultsLst.HideSelection = false;
- this.resultsLst.LabelWrap = false;
- this.resultsLst.Dock = DockStyle.Fill;
- this.resultsLst.Name = "resultsLst";
- this.resultsLst.ShowGroups = false;
- this.resultsLst.TabIndex = 7;
- this.resultsLst.UseCompatibleStateImageBehavior = false;
- this.resultsLst.View = System.Windows.Forms.View.Details;
- this.resultsLst.ItemCheck += new System.Windows.Forms.ItemCheckEventHandler(this.ResultsLstItemCheck);
- this.resultsLst.SelectedIndexChanged += new System.EventHandler(this.resultsLst_SelectedIndexChanged);
- this.resultsLst.Click += new System.EventHandler(this.ResultsLstClick);
- this.resultsLst.DoubleClick += new System.EventHandler(this.ResultsLstDoubleClick);
- this.resultsLst.MouseLeave += new System.EventHandler(this.resultsLst_MouseLeave);
- this.resultsLst.MouseMove += new System.Windows.Forms.MouseEventHandler(this.ResultsLstMouseMove);
- this.resultsLst.SizeChanged += new EventHandler(this.ResultsLst_SizeChanged);
- //
- // mark
- //
- this.mark.Text = "";
- this.mark.Width = -1;
- //
- // result
- //
- this.result.Text = "Result Line";
- this.result.Width = -1;
- //
- // filename
- //
- this.filename.Text = "File Name";
- this.filename.Width = -1;
- //
- // findGroup
- //
- this.findGroup.Controls.Add(this.matchCaseChk);
- this.findGroup.Controls.Add(this.wholeWordChk);
- this.findGroup.Controls.Add(this.regexpChk);
- this.findGroup.FlatStyle = System.Windows.Forms.FlatStyle.System;
- this.findGroup.Name = "findGroup";
- this.findGroup.Height = 41;
- this.findGroup.Dock = DockStyle.Top;
- this.findGroup.TabIndex = 4;
- this.findGroup.TabStop = false;
- this.findGroup.Text = "Find";
- //
- // optionsPanel
- //
- this.optionsPanel.Controls.Add(tabControl);
- this.optionsPanel.Controls.Add(findGroup);
- this.optionsPanel.Controls.Add(findTxt);
- this.optionsPanel.Controls.Add(filterGroup);
- this.optionsPanel.Size = new Size(375,200);
- //
- // PluginUI
- //
- this.BackColor = System.Drawing.SystemColors.Control;
- this.Controls.AddRange(new Control[] { this.resultsLst, this.splitter,this.optionsPanel });
- this.Name = "PluginUI";
- this.Size = new System.Drawing.Size(656, 322);
- this.tabControl.ResumeLayout(false);
- this.optionsPage.ResumeLayout(false);
- this.replacePage.ResumeLayout(false);
- this.replacePage.PerformLayout();
- this.filterPage.ResumeLayout(false);
- this.foldersPage.ResumeLayout(false);
- this.foldersPage.PerformLayout();
- this.operationsPage.ResumeLayout(false);
- this.filterGroup.ResumeLayout(false);
- this.filterGroup.PerformLayout();
- this.findGroup.ResumeLayout(false);
- this.ResumeLayout(false);
- }
-
- #endregion
-
- #region settings and updates
- ///
- /// udate the selected settings
- ///
- ///
- public void UpdateSettings(Settings settingsObject)
- {
- autoFeedChk.Checked = settingsObject.FeedAsYouType;
-
- autoChk.Checked = settingsObject.FindAsYouType;
- //resizeToFit = resize;
- ChangeFilterPresets(settingsObject.FilterPresets);
- findTxt.MaxDropDownItems = settingsObject.SearchHistoryLimit;
- resultsLst.ShowGroups = settingsObject.GroupByFile;
- }
-
- ///
- /// update the class paths list for the find in folder
- ///
- /// new class paths
- public void UpdateFolderClassPaths(string[] classPaths)
- {
- string[] presets = classPaths;
- folderTxt.BeginUpdate();
- folderTxt.Items.Clear();
- foreach (string itemTxt in presets)
- {
- folderTxt.Items.Add(itemTxt);
- }
- folderTxt.Text = presets[0];
- lastPath = presets[0];
- folderTxt.EndUpdate();
- }
-
- ///
- /// show or hide the folder tab
- ///
- /// show or hide
- private void ShowFolderMode(bool flag)
- {
- if (flag)
- {
- ShowReplaceMode(false);
- plugin.UpdateProjectClassPaths();
- if (folderFilesChk.CheckState == CheckState.Unchecked)
- {
- folderFilesChk.CheckState = CheckState.Checked;
- }
- }
- else if (folderFilesChk.CheckState != CheckState.Indeterminate)
- {
- folderFilesChk.CheckState = CheckState.Unchecked;
- }
- }
-
- ///
- /// handle with focus
- ///
- public void PluginUI_FocusHandle(object sender, EventArgs e)
- {
-
-
- if (PluginBase.MainForm.DockPanel.ActiveContent == this.plugin.Panel)
- {
- revealLeftSide();
- findTxt.Focus();
- }
- else
- {
- if (sender == null)
- {
- this.plugin.Panel.Show();
- revealLeftSide();
- this.ShowReplace = true;
- this.replaceTxt.Focus();
- }
- else
- {
- Settings settingsObject = this.plugin.Settings as Settings;
- if ((tabControl.SelectedTab == optionsPage && settingsObject.ResizeOptionsTab) || (tabControl.SelectedTab == replacePage && settingsObject.ResizeReplaceTab) || (tabControl.SelectedTab == filterPage && settingsObject.ResizeFilterTab) || (tabControl.SelectedTab == foldersPage && settingsObject.ResizeFoldersTab) || (tabControl.SelectedTab == operationsPage && settingsObject.ResizeOperationsTab))
- {
- tabControl.SelectedTab = optionsPage;
- hideLeftSide();
- }
- }
- }
-
- }
-
- ///
- /// Stops the parse timer if not enabled.
- ///
- public void Terminate()
- {
- }
-
- #endregion
-
- #region Find Code
- ///
- /// set the text in the find box
- ///
- /// new text
- public void SetFindText(string newText)
- {
- SetFindText(newText, false);
- }
-
- ///
- /// Set the text in the find box, no matter what are the settings
- ///
- /// new text
- /// true to force change it
- public void SetFindText(string newText, bool force)
- {
- if ((autoFeedChk.Checked) || force)
- {
- if (ShowReplace)
- {
- replaceTxt.Text = newText;
- }
- else
- {
- findTxt.Text = newText;
- }
- }
- }
-
- ///
- ///lists all the results in the list box
- ///given a results object
- ///
- public void ListAllResults(FindResults results)
- {
- resultsLst.BeginUpdate();
- resultsLst.Items.Clear();
- resultsLst.Groups.Clear();
- FindMatch match = results.FirstResult();
- String file = "";
- ListViewGroup gr = null;
- while (match != null)
- {
- if (file != match.FileName)
- {
- file = match.FileName;
- gr = new ListViewGroup(file, HorizontalAlignment.Left);
-
- gr.Name = file;
- gr.Header = file;
- this.resultsLst.Groups.Add(gr);
- }
-
- AddMatchToGroup(gr, match);
-
- match = results.NextResult();
- }
-// if (resultsLst.Items.Count > 0)
-// resultsLst.EnsureVisible(resultsLst.Items.Count-1);
- CheckListItems();
- this.mark.Width = -1;
- this.at.Width = -1;
- this.filename.Width = -1;
- resultsLst.EndUpdate();
- }
-
- private void startSearch()
- {
- bool itemExists = false;
- foreach (string cbi in findTxt.Items)
- {
- itemExists = cbi == findTxt.Text;
- if (itemExists) break;
- }
- if (!itemExists)
- findTxt.Items.Add(findTxt.Text);
- ListAllFindText(findTxt.Text, 1);
- }
-
- ///
- /// Finds a text in open document, or all open documents and list it.
- /// using text in find input box
- ///
- public void ListAllFindText()
- {
- ListAllFindText(findTxt.Text);
- }
-
- ///
- /// Finds a text in open document, or all open documents and list it
- ///
- /// text to find
- public void ListAllFindText(string Text)
- {
- ListAllFindText(Text, (plugin.Settings as Settings).IgnoreBelow);
- }
-
- ///
- /// Finds a text in open document, or all open documents and list it
- ///
- /// text to find
- /// characters threshold
- public void ListAllFindText(string Text, int minChars)
- {
- if (Text.Length >= minChars)
- {
- resultsLst.Tag = folderFilesChk.Checked ? "V": "X";
- DefaultReplaceCheck();
- FindResults results;
- if ((folderFilesChk.CheckState == CheckState.Checked || folderFilesChk.CheckState == CheckState.Indeterminate) && tabControl.SelectedTab == foldersPage)
- {
- results = plugin.GetFindInFolderResultsList(Text, folderTxt.Text, fileMaskTxt.Text, searchSubfoldersChk.Checked);
- if (folderFilesChk.CheckState == CheckState.Checked)
- {
- folderFilesChk.CheckState = CheckState.Unchecked;
- }
- }
- else if (openFilesChk.Checked)
- {
- results = plugin.GetAllDocumentsResultsList(Text);
- }
- else
- {
- results = plugin.GetResultsList(Text);
- }
- resultsLst.Columns[2].Text = Text;
- ListAllResults(results);
- }
- }
-
- ///
- /// adds a match item to a list group
- ///
- /// a group
- /// the match to add to the group
- private void AddMatchToGroup(ListViewGroup gr, FindMatch match)
- {
- ListViewItem item = getListItemFromMatch(match);
- item.Group = gr;
- gr.Items.Add(item);
- AddItemToList(item);
- }
-
- ///
- /// Add a list view item to the list
- ///
- /// A list view item to add
- private void AddItemToList(ListViewItem item)
- {
- this.resultsLst.Items.Add(item);
- }
-
- ///
- /// Add a match item to the list
- ///
- /// A match item
- public void AddMatchToList(FindMatch m)
- {
- AddItemToList(getListItemFromMatch(m));
- }
-
- ///
- /// create a list item that represnts a match
- ///
- ///
- ///
- private ListViewItem getListItemFromMatch(FindMatch m)
- {
- string first = " ";
- if (m.FileName == plugin.CurFile)
- first = ">";
- ListViewItem item = new ListViewItem(first, 0);
- item.Tag = m;
- item.SubItems.Add("" + (m.Line + 1));
- item.SubItems.Add(m.LineText.Trim());
- item.SubItems.Add(m.FileName.Substring(m.FileName.LastIndexOf("\\") + 1));
- return item;
- }
-
- ///
- /// Sets the flag of "find as you type"
- ///
- /// New value
- public void SetFindAsYouType(bool val)
- {
- autoChk.Checked = val;
- }
-
- #endregion
-
- #region Replace code
- ///
- /// check the list items that need to be checked according to the settings
- ///
- private void CheckListItems()
- {
- if (!inReplace)
- {
- try
- {
- string curFile = plugin.CurFile;
- string filterText = filterTxt.Tag as string;
- foreach (ListViewItem item in resultsLst.Items)
- {
- FindMatch m = item.Tag as FindMatch;
- if (checkAllRdo.Checked)
- {
- item.Checked = true;
- }
- else if (checkNoneRdo.Checked)
- {
- item.Checked = false;
- }
- else if (checkFileRdo.Checked)
- {
- item.Checked = (m.FileName == curFile);
- }
- else if (checkSelectonRdo.Checked)
- {
- int selStaert = m.Scintilla.SelectionStart;
- int selEnd = m.Scintilla.SelectionEnd;
- bool inRange = m.Position > selStaert & m.Position < selEnd;
- item.Checked = (m.FileName == curFile) & inRange;
- }
- else if (checkFilterRdo.Checked)
- {
- item.Checked = IsMatchInItem(item, 2, filterText);
-
- }
- HilightItem(item, item.Checked);
- }
- UpdateStatusBar();
- }
- catch
- {
- checkNoneRdo.Checked = true;
- }
- }
- }
-
- ///
- /// called when a selection was changed
- ///
- public void SelectionChanged()
- {
- SelectionChanged(true);
- }
-
- ///
- /// Called when a selection is changed in the scientilla
- ///
- /// Is there or isn't there a selection
- public void SelectionChanged(bool flag)
- {
- if (flag)
- {
- checkSelectonRdo.Checked = true;
- }
- else
- {
- DefaultReplaceCheck();
- }
- CheckListItems();
- }
-
- ///
- /// Goes thrugh all the entries and if they are checked, it replaces the text
- ///
- /// the text to replace
- private void ReplaceSelectedEntries(string replaceText)
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = document.SciControl;
-
- //autoFeedChk.Checked = false;
- //autoChk.Checked = false;
- string workingFile = "";
- inReplace = true;
- if (replaceShown && replaceText != "")
- {
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
-
- // switch to the next file
- if (fileName != workingFile) {
- doc.EndUndoAction();
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- }
- doc.MBSafeSetSel(m.Position, m.Text);
- string rep = replaceText.Clone() as string;
- if (regExReplaceChk.Checked) rep = ExpandReplaceGroups(rep, m);
- doc.ReplaceSel(rep);
- }
- }
- doc.EndUndoAction();
-
- }
- inReplace = false;
- ShowOfr();
- }
-
- ///
- /// Replace regular expressions groups in replacement text
- ///
- /// Text to expand
- /// Search result (for reinjecting groups)
- public string ExpandReplaceGroups(string text, FindMatch match)
- {
- if (text.IndexOf('$') < 0) return match.Text;
- for (int i = 0; i < match.Groups.Count; i++)
- text = text.Replace("$" + i, match.Groups[i].Value);
- return text;
- }
-
- ///
- /// Open all files found in "Find in files" and make the search again
- ///
- private void OpenAndResearch()
- {
- string findText = findTxt.Text;
- string workingFile = "";
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
- if (fileName != workingFile) {
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- }
- }
- }
- ListAllFindText(findText);
- ShowOfr();
- }
-
- ///
- /// Shows the Open and replace button instead of the normal replace
- ///
- private void ShowOfr()
- {
- string fif = "" + resultsLst.Tag;
- bool vis = (fif.IndexOf("V") != 0);
- replaceBtn.Visible = vis;
- ofrBtn.Visible = !vis;
- }
-
- ///
- /// Hides the checkboxes
- ///
- private void HideCheckboxes()
- {
- resultsLst.BeginUpdate();
- resultsLst.Visible = false;
- resultsLst.CheckBoxes = false;
- resultsLst.MultiSelect = false;
- resultsLst.Visible = true;
- resultsLst.EndUpdate();
- }
-
- ///
- /// Shows the checkboxes in the list
- ///
- private void ShowCheckboxes()
- {
- resultsLst.BeginUpdate();
- resultsLst.Visible = false;
- resultsLst.CheckBoxes = true;
- resultsLst.MultiSelect = true;
- CheckListItems();
- resultsLst.Visible = true;
- resultsLst.EndUpdate();
- }
-
- ///
- /// Shows or hide the replace tab
- ///
- /// true - shows the replace tab
- private void ShowReplaceMode(bool flag)
- {
- DefaultReplaceCheck();
- if (flag)
- {
- ShowCheckboxes();
- ShowOfr();
- }
- replaceShown = flag;
- }
- #endregion
-
- #region filter code
- ///
- /// Updates the status bar with the search results
- ///
- private void UpdateStatusBar()
- {
- this.resultsLbl.Text = "Results: "+resultsLst.Items.Count+". Selected: "+resultsLst.CheckedItems.Count;
- }
-
- ///
- /// Highlight the items in the list that match the filter
- ///
- ///
- private void HilightFilteredList(string filterText)
- {
- filterTxt.Tag = "";
- DefaultReplaceCheck();
- if (filterText.Length > 0)
- {
-
- try
- {
- Regex.IsMatch("test pattern", filterTxt.Text);
- filterTxt.Tag = Regex.Replace(filterTxt.Text, "@FIND", findTxt.Text);
- if (!checkFilterRdo.Checked)
- checkFilterRdo.Checked = true;
- }
- catch
- {
- filterTxt.Tag = Regex.Unescape(filterText);
- checkNoneRdo.Checked = true;
- }
- CheckListItems();
- }
- else
- {
-
- }
- }
-
- ///
- /// Highlight an item
- ///
- /// List view item to highlight
- /// true - to highlight
- private void HilightItem(ListViewItem item, bool isHilight)
- {
- Font font = item.Font;
- if (isHilight)
- {
- item.Font = new Font(font, FontStyle.Regular);
- item.BackColor = Color.Lavender;
- }
- else
- {
- item.Font = new Font(font, FontStyle.Regular);
- item.BackColor = Color.White;
- }
- }
-
- ///
- /// Return true if the item match the filter pattern, entered in the filter input box
- ///
- /// a list view item
- /// index of subitem (column)
- /// pattern to match
- ///
- private bool IsMatchInItem(ListViewItem item, int index, string pattern)
- {
- if (pattern.Length > 0)
- {
- bool ret = Regex.IsMatch(item.SubItems[index].Text, pattern, RegexOptions.IgnoreCase);
- return ret;
- }
- else
- return false;
- }
-
- ///
- /// Change the presets for the filter combo box
- ///
- ///
- private void ChangeFilterPresets(string[] newPresets)
- {
- if (newPresets != null)
- {
- string[] presets = newPresets;
- filterTxt.BeginUpdate();
- filterTxt.Items.Clear();
- foreach (string itemTxt in presets)
- {
- filterTxt.Items.Add(itemTxt);
- }
- filterTxt.EndUpdate();
- }
- }
-
- ///
- /// check the default filter mode, is "filter" if there is a pattern entered of "file" if no
- ///
- private void DefaultReplaceCheck()
- {
-
- if (!replaceShown)// && !openFilesChk.Checked)
- {
- FilterRadioCheck();
- }
- else
- {
- checkFileRdo.Checked = true;
- }
- CheckListItems();
- }
-
- ///
- /// Check the filter radio.
- /// If the RegEx is not valid it check the "file" mode
- ///
- private void FilterRadioCheck()
- {
-
- ScintillaControl sci =plugin.CurSciControl;
- if (sci != null)
- {
- if (sci.SelectionStart != sci.SelectionEnd)
- {
- checkSelectonRdo.Checked = true;
- }
- else if (filterTxt.Text.Length > 0)
- {
- checkFilterRdo.Checked = true;
- }
- else
- {
- checkFileRdo.Checked = true;
- }
- }
- }
- #endregion
-
- #region operation code
-
- ///
- /// switch to operation mode, show the checkboxes
- ///
- /// is in operation
- private void ShowOperationMode(bool p)
- {
- if (p)
- {
- ShowCheckboxes();
- }
- }
-
-
- ///
- /// adds bookmarks to all selected items
- ///
- private void BookmarkSearchResults()
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = document.SciControl;
-
- string workingFile = "";
- doc.BeginUndoAction();
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
- if (fileName != workingFile) {
- doc.EndUndoAction();
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- }
-
- doc.MarkerAdd(m.Line, 0);
- }
- }
-
-
- ShowReplace = false;
- }
-
- private void CopyToResultsPanel()
- {
- Globals.MainForm.CallCommand("PluginCommand", "ResultsPanel.ClearResults");
- foreach (ListViewItem item in resultsLst.Items)
- {
- FindMatch m = item.Tag as FindMatch;
- int column = m.Column;
- if (item.Checked)
- {
- TraceManager.Add(m.FileName + ":" + (m.Line + 1).ToString() + ": characters " + m.Column + "-" + (m.Column + m.Text.Length) + " : " + m.LineText.Trim(), (Int32)TraceType.Info);
- }
- }
- Globals.MainForm.CallCommand("PluginCommand", "ResultsPanel.ShowResults");
-
- ShowReplace = false;
- }
-
- ///
- /// Deletes all the selected (checked) results
- ///
- private void DeleteResultsLines()
- {
- ITabbedDocument document = PluginBase.MainForm.CurrentDocument;
- ScintillaControl doc = document.SciControl;
-
- string workingFile = "";
- doc.BeginUndoAction();
- int numOfEntries = resultsLst.Items.Count;
- for(int i= numOfEntries-1; i >= 0; i--)
- {
- ListViewItem item = resultsLst.Items[i];
- if (item.Checked)
- {
- FindMatch m = item.Tag as FindMatch;
- string fileName = m.FileName;
- if (fileName != workingFile) {
- doc.EndUndoAction();
- plugin.MainForm.OpenEditableDocument(fileName);
- workingFile = fileName;
- document = PluginBase.MainForm.CurrentDocument;
- doc = document.SciControl;
- doc.BeginUndoAction();
- }
- doc.SetSel(m.Position, m.Position);
- doc.LineDelete();
- }
- }
-
- doc.EndUndoAction();
- ShowReplace = false;
- }
- #endregion
-
-
- #region options properties
- ///
- /// Is the mach case sensitive
- ///
- public bool MatchCase
- {
- get {return matchCaseChk.Checked; }
- set {matchCaseChk.Checked = value;}
- }
- ///
- /// Select to match only whole word
- ///
- public bool WholeWord
- {
- get {return wholeWordChk.Checked; }
- set {wholeWordChk.Checked = value; }
- }
- ///
- /// Check as Regular expression or normal text
- ///
- public bool RegExp
- {
- get {return regexpChk.Checked; }
- set {regexpChk.Checked = value; }
- }
- ///
- /// Shows the replace tab
- ///
- public bool ShowReplace
- {
- get {return replaceShown; }
- set
- {
- if (value)
- {
- tabControl.SelectedTab = replacePage;
- }
- else
- {
- tabControl.SelectedIndex = 0;
- }
- replaceShown = value;
- }
- }
- ///
- /// Change the search path for "Find in Files"
- ///
- public string SearchPath
- {
- get {return folderTxt.Text; }
- set { folderTxt.Text = value; }
- }
- #endregion
-
- #region Controlls Events
-
- private void ResultsLstDoubleClick(object sender, System.EventArgs e)
- {
-
- ListViewItem item = this.resultsLst.SelectedItems[0];
- if (item == null) return;
- FindMatch m = (FindMatch)item.Tag;
- int position = m.Position;
-
- plugin.GotoPosAndFocus(m.FileName, position, m.Text.Length);
- }
-
- private void keyDownHandler(object sender, KeyEventArgs e)
- {
- if (findTxt.Focused && e.KeyCode == Keys.Enter)
- {
- startSearch();
- }
- else if (replaceTxt.Focused && e.KeyCode == Keys.Enter)
- {
- ReplaceBtnClick(null, null);
- }
- }
-
- private void FindTxtTextChanged(object sender, System.EventArgs e)
- {
- if(autoChk.Checked)
- {
- ListAllFindText(findTxt.Text);
- }
- }
-
- private void OptionsChkCheckedChanged(object sender, System.EventArgs e)
- {
- ListAllFindText();
- }
-
-
- private void ReplaceBtnClick(object sender, System.EventArgs e)
- {
- string find = findTxt.Text;
- string replace = replaceTxt.Text;
- string curFile = plugin.CurFile;
- int curPosition = plugin.CurPosition;
- replace = Regex.Replace(replace, "@FIND", find);
- ReplaceSelectedEntries(replace);
- ListAllFindText(find, 1);
- //replaceTxt.Text = "@FIND";
-// if (plugin.HideReplace)
-// ShowReplace = false;
- if ((plugin.Settings as Settings).AutoHideReplace) {
- ShowReplace = false;
- }
- plugin.GotoPosAndFocus(curFile, curPosition, 0);
- }
-
- private void CheckRdoCheckedChanged(object sender, System.EventArgs e)
- {
- CheckListItems();
- }
-
- private void ResultsLstClick(object sender, System.EventArgs e)
- {
- if (ShowReplace)
- {
- checkcCustomeRdo.Checked = true;
- }
- }
-
- private void ResultsLstItemCheck(object sender, System.Windows.Forms.ItemCheckEventArgs e)
- {
- ListViewItem item = resultsLst.Items[e.Index];
- HilightItem(item, (e.NewValue == CheckState.Checked));
- }
-
- private void FilterTxtTextChanged(object sender, System.EventArgs e)
- {
- HilightFilteredList(filterTxt.Text);
- }
-
- private void SwtchFindReplaceBtnClick(object sender, System.EventArgs e)
- {
- string tempTxt = replaceTxt.Text;
- replaceTxt.Text = findTxt.Text;
- findTxt.Text = tempTxt;
- }
-
- private void FilterBtnClick(object sender, System.EventArgs e)
- {
- HilightFilteredList(filterTxt.Text);
- }
-
- private void RegexHelpBtnClick(object sender, System.EventArgs e)
- {
- MessageBox.Show("\\t Matches a tab \\u0009.\n\\e Matches an escape \\u001B.\n\\040 Matches an ASCII character as octal (up to three digits); numbers with no leading zero are backreferences \n\\x20 Matches an ASCII character using hexadecimal representation.\n\\cC Matches an ASCII control character; for example, \\cC is control-C.\n\\ When followed by a character that is not recognized as an escaped character, matches that character. For example, \\*.\n---------------------\n"+
- ". Matches any character except \\n.\n[aeiou] Matches any single character included in the specified set of characters.\n[^aeiou] Matches any single character not in the specified set of characters. [0-9a-fA-F] Use of a hyphen (–) allows specification of contiguous character ranges.\n\\w Matches any word character.equivalent to [a-zA-Z_0-9].\n\\W Matches any nonword character. equivalent to [^a-zA-Z_0-9].\n\\s Matches any white-space character. Equivalent to [ \\f\\n\\r\\t\\v].\n\\S Matches any non-white-space character. Equivalent to [^ \\f\\n\\r\\t\\v].\n\\d Matches any decimal digit.\n\\D Matches any nondigit.\n---------------------\n"+
- "\\A Specifies that the match must occur at the beginning of the string\n\\Z Specifies that the match must occur at the end of the string or before \n at the end of the string\n\\z Specifies that the match must occur at the end of the string\n\\b Specifies that the match must occur on word boundaries — that is, at the first or last characters in words separated by any nonalphanumeric characters.\n\\B Specifies that the match must not occur on a \\b boundary.\n---------------------\n"+
- "* Specifies zero or more matches; Equivalent to {0,}.\\+ Specifies one or more matches; Equivalent to {1,}.\n? Specifies zero or one matches; Equivalent to {0,1}. \n{n} Specifies exactly n matches;\n{n,} Specifies at least n matches;\n{n,m} Specifies at least n, but no more than m, matches.\n---------------------\n"+
- "| Matches any one of the terms separated by the | (vertical bar) character; The leftmost successful match wins.\n(?= ) Zero-width positive lookahead assertion. Continues match only if the subexpression matches at this position on the right. \n(?! ) Zero-width negative lookahead assertion. Continues match only if the subexpression does not match at this position on the right. \n(?<= ) Zero-width positive lookbehind assertion. Continues match only if the subexpression matches at this position on the left. For example, \n(?
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- 140, 17
-
-
- 17, 17
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/Properties/AssemblyInfo.cs b/ findandreplaceex/Properties/AssemblyInfo.cs
deleted file mode 100644
index 19f73ae..0000000
--- a/ findandreplaceex/Properties/AssemblyInfo.cs
+++ /dev/null
@@ -1,36 +0,0 @@
-using System.Reflection;
-using System.Runtime.CompilerServices;
-using System.Runtime.InteropServices;
-
-// General Information about an assembly is controlled through the following
-// set of attributes. Change these attribute values to modify the information
-// associated with an assembly.
-[assembly: AssemblyTitle("FindReplaceEx")]
-[assembly: AssemblyDescription("")]
-[assembly: AssemblyConfiguration("")]
-[assembly: AssemblyCompany("I.A.P")]
-[assembly: AssemblyProduct("FindReplaceEx")]
-[assembly: AssemblyCopyright("Copyright © I.A.P 2008")]
-[assembly: AssemblyTrademark("")]
-[assembly: AssemblyCulture("")]
-
-// Setting ComVisible to false makes the types in this assembly not visible
-// to COM components. If you need to access a type in this assembly from
-// COM, set the ComVisible attribute to true on that type.
-[assembly: ComVisible(true)]
-
-// The following GUID is for the ID of the typelib if this project is exposed to COM
-[assembly: Guid("56827e36-936c-412a-a90a-22008a8d9cac")]
-
-// Version information for an assembly consists of the following four values:
-//
-// Major Version
-// Minor Version
-// Build Number
-// Revision
-//
-// You can specify all the values or you can default the Build and Revision Numbers
-// by using the '*' as shown below:
-// [assembly: AssemblyVersion("1.0.*")]
-[assembly: AssemblyVersion("1.4.0.0")]
-[assembly: AssemblyFileVersion("1.4.0.0")]
diff --git a/ findandreplaceex/Properties/Resources.Designer.cs b/ findandreplaceex/Properties/Resources.Designer.cs
deleted file mode 100644
index 7aa9c72..0000000
--- a/ findandreplaceex/Properties/Resources.Designer.cs
+++ /dev/null
@@ -1,63 +0,0 @@
-//------------------------------------------------------------------------------
-//
-// This code was generated by a tool.
-// Runtime Version:4.0.30319.34209
-//
-// Changes to this file may cause incorrect behavior and will be lost if
-// the code is regenerated.
-//
-//------------------------------------------------------------------------------
-
-namespace FindReplaceEx.Properties {
- using System;
-
-
- ///
- /// A strongly-typed resource class, for looking up localized strings, etc.
- ///
- // This class was auto-generated by the StronglyTypedResourceBuilder
- // class via a tool like ResGen or Visual Studio.
- // To add or remove a member, edit your .ResX file then rerun ResGen
- // with the /str option, or rebuild your VS project.
- [global::System.CodeDom.Compiler.GeneratedCodeAttribute("System.Resources.Tools.StronglyTypedResourceBuilder", "4.0.0.0")]
- [global::System.Diagnostics.DebuggerNonUserCodeAttribute()]
- [global::System.Runtime.CompilerServices.CompilerGeneratedAttribute()]
- internal class Resources {
-
- private static global::System.Resources.ResourceManager resourceMan;
-
- private static global::System.Globalization.CultureInfo resourceCulture;
-
- [global::System.Diagnostics.CodeAnalysis.SuppressMessageAttribute("Microsoft.Performance", "CA1811:AvoidUncalledPrivateCode")]
- internal Resources() {
- }
-
- ///
- /// Returns the cached ResourceManager instance used by this class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Resources.ResourceManager ResourceManager {
- get {
- if (object.ReferenceEquals(resourceMan, null)) {
- global::System.Resources.ResourceManager temp = new global::System.Resources.ResourceManager("FindReplaceEx.Properties.Resources", typeof(Resources).Assembly);
- resourceMan = temp;
- }
- return resourceMan;
- }
- }
-
- ///
- /// Overrides the current thread's CurrentUICulture property for all
- /// resource lookups using this strongly typed resource class.
- ///
- [global::System.ComponentModel.EditorBrowsableAttribute(global::System.ComponentModel.EditorBrowsableState.Advanced)]
- internal static global::System.Globalization.CultureInfo Culture {
- get {
- return resourceCulture;
- }
- set {
- resourceCulture = value;
- }
- }
- }
-}
diff --git a/ findandreplaceex/Properties/Resources.resx b/ findandreplaceex/Properties/Resources.resx
deleted file mode 100644
index 85c9090..0000000
--- a/ findandreplaceex/Properties/Resources.resx
+++ /dev/null
@@ -1,101 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 1.3
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.3500.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/Resources/LocaleHelper.cs b/ findandreplaceex/Resources/LocaleHelper.cs
deleted file mode 100644
index c6a9cc3..0000000
--- a/ findandreplaceex/Resources/LocaleHelper.cs
+++ /dev/null
@@ -1,34 +0,0 @@
-using System;
-using System.Text;
-using System.Resources;
-using System.Reflection;
-using System.Collections.Generic;
-using PluginCore.Localization;
-using PluginCore;
-
-namespace FindReplaceEx.Resources
-{
- class LocaleHelper
- {
- private static ResourceManager resources = null;
-
- ///
- /// Initializes the localization of the plugin
- ///
- public static void Initialize(LocaleVersion locale)
- {
- String path = "FindReplaceEx.Resources." + locale.ToString();
- resources = new ResourceManager(path, Assembly.GetExecutingAssembly());
- }
-
- ///
- /// Loads a string from the internal resources
- ///
- public static String GetString(String identifier)
- {
- return resources.GetString(identifier);
- }
-
- }
-
-}
diff --git a/ findandreplaceex/Resources/en_US.resX b/ findandreplaceex/Resources/en_US.resX
deleted file mode 100644
index 8adf81e..0000000
--- a/ findandreplaceex/Resources/en_US.resX
+++ /dev/null
@@ -1,147 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- text/microsoft-resx
-
-
- 2.0
-
-
- System.Resources.ResXResourceReader, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- System.Resources.ResXResourceWriter, System.Windows.Forms, Version=2.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
-
-
- Set to true to automaticaly hide the replace after a successful replace operation.
-
-
- Set to true to feed the "find" input box as you type in the scientilla editor
-
-
- Set to true to automaticaly feed the "find" input with the word under the cursor when the carret is moved.
-
-
- Set true to instantly find all text as you type in the "find" input box.
-
-
- Shortcut to open the Find panel
-
-
- rtcut to open the Replace section in the FindReplace panel
-
-
- Extended Find and Replace Dialog
-
-
- &Find && Replace Ex
-
-
- Find &&Replace Ex
-
-
\ No newline at end of file
diff --git a/ findandreplaceex/Results.cs b/ findandreplaceex/Results.cs
deleted file mode 100644
index ea62190..0000000
--- a/ findandreplaceex/Results.cs
+++ /dev/null
@@ -1,223 +0,0 @@
-/*
- * results list holder for find operations
- */
-
-using System;
-using System.Text.RegularExpressions;
-using System.Collections;
-using System.IO;
-//using System.Text.RegularExpressions;
-using WeifenLuo.WinFormsUI;
-using ScintillaNet;
-
-namespace FindReplaceEx
-{
- ///
- /// Description of Results.
- ///
- public class FindMatch
- {
- private Match match;
- private string fileName;
- private ScintillaControl scintilla;
- private Int32 position;
- private int column;
- private string text;
- private string lineText;
- private int line;
- //private GroupCollection groups;
-
- public FindMatch(ScintillaControl sci, Match m)
- {
- fileName = sci.FileName as string;
- scintilla = sci;
- NewMatch(m);
-
- }
-
- public FindMatch(string file, int fline, int pos, string ftext, Match m)
- {
- match = m;
- fileName = file;
- line = fline;
- position = pos;
- text = ftext;
- lineText = ftext;
- if (scintilla != null)
- {
- column = scintilla.Column(position);
- }
- else
- {
- column = 0;
- }
-
- }
-
- private void NewMatch(Match m)
- {
- match = m;
- position = m.Index;
- line = scintilla.LineFromPosition(position);
- column = scintilla.Column(position);
- text = m.Value;
- lineText = scintilla.GetLine(line);
- }
-
- public int Line {
- get {
- return line;
- }
- }
- public Int32 Position {
- get {
- return position;
- }
- }
- public int Column
- {
- get
- {
- return column;
- }
- }
- ///
- /// the "find" text iteself
- ///
- public string Text {
- get {
- return text;
- }
- }
- public string LineText {
- get {
- return lineText;
- }
- }
- public string FileName {
- get {
- return fileName;
- }
- }
- public Match Match
- {
- get
- {
- return match;
- }
- set
- {
- NewMatch(value);
- }
- }
-
- public GroupCollection Groups
- {
- get
- {
- return match.Groups;
- }
- }
-
- public ScintillaControl Scintilla {
- get {
- return scintilla;
- }
- }
-
-
- }
-
- public class FindResults
- {
- private ArrayList results;
- private int lastIndex;
-
-
- public FindResults()
- {
- results = new ArrayList();
- lastIndex = 0;
- }
-
- public int AddResults(ScintillaControl sci, MatchCollection r)
- {
- int count = r.Count;
- for (int i=0; i< count; i++)
- {
- Match m = r[i];
- AddResult(sci, r[i]);
- }
- return Count;
- }
-
- public int AddResult(ScintillaControl sci, Match m)
- {
- FindMatch fm = new FindMatch(sci, m);
- return AddResult(fm);
- }
-
- public int AddResult(string file, int fline, int pos, string ftext, Match m)
- {
- FindMatch fm = new FindMatch(file, fline, pos, ftext, m);
- return AddResult(fm);
- }
-
- public int AddResult(FindMatch fm)
- {
- results.Add(fm);
- return Count;
- }
-
- public FindMatch GetResult(int index)
- {
- if (index < 0 || index >= Count)
- {
- return null;
- }
- lastIndex = index;
- FindMatch ret = (FindMatch)results[index];
- return ret;
- }
-
- public FindMatch FirstResult()
- {
- return GetResult(0);
- }
-
- public FindMatch NextResult()
- {
- return GetResult(lastIndex + 1);
- }
-
- public FindMatch PreviousResult()
- {
- return GetResult(lastIndex - 1);
- }
-
- public void Filter(string filterText)
- {
- foreach(FindMatch m in results)
- {
- if (Regex.IsMatch(m.LineText, Regex.Unescape(filterText)))
- results.Remove(m);
- }
- }
-
- public int Index {
- get {
- return lastIndex;
- }
- set {
- if (value >= 0 || value < Count)
- lastIndex = value;
- }
- }
-
- public int Count {
- get {
- return results.Count;
- }
- }
- }
-}
diff --git a/ findandreplaceex/Settings.cs b/ findandreplaceex/Settings.cs
deleted file mode 100644
index 4af3662..0000000
--- a/ findandreplaceex/Settings.cs
+++ /dev/null
@@ -1,163 +0,0 @@
-using System;
-using System.Text;
-using System.Collections.Generic;
-using System.ComponentModel;
-using PluginCore.Localization;
-using System.Windows.Forms;
-
-namespace FindReplaceEx
-{
- [Serializable]
- public class Settings
- {
-
- //public const string[] DEFAULT_FILTER_PRESETS = ["(import|new)\\s*[\\w\\.]*@FIND[\\.;],(function|var)\\s*\\w*\\s*:\\s*@FIND\\s*[;\\(]"];
-
- private bool findAsYouType = true;
- private bool feedWordAsYouType = true;
- private bool feedWordOnCaretMovement = true;
- private bool autoHideReplace = true;
- private bool groupByFile = true;
- private int ignoreCharactersBelow = 3;
- private int typingTimerInterval = 500;
- private int searchHistoryLimit = 10;
- private bool resizeOptionsTab = true;
- private bool resizeReplaceTab = false;
- private bool resizeFilterTab = false;
- private bool resizeFoldersTab = true;
- private bool resizeOperationsTab = true;
- private string[] filterPresets = null;
-
- [DisplayName("Find As You Type")]
- [Category("Settings")]
- [Description("Instantly make a search when you type in the find input. Also search when the input is change via \"FeedAsYouType\"."), DefaultValue(true)]
- public bool FindAsYouType
- {
- get { return findAsYouType; }
- set { findAsYouType = value; }
- }
-
- [DisplayName("Feed As You Type")]
- [Category("Settings")]
- [Description("Feeds the Find input while you type text in the editor."), DefaultValue(true)]
- public bool FeedAsYouType
- {
- get { return feedWordAsYouType; }
- set { feedWordAsYouType = value; }
- }
-
- [DisplayName("Feed As You Move")]
- [Category("Settings")]
- [Description("Feeds the Find input while you move the carret in the editor."), DefaultValue(true)]
- public bool FeedOnCaret
- {
- get { return feedWordOnCaretMovement; }
- set { feedWordOnCaretMovement = value; }
- }
-
- [DisplayName("Auto Hide Replace")]
- [Category("Settings")]
- [Description("Hides the Replace tab after successful replace."), DefaultValue(true)]
- public bool AutoHideReplace
- {
- get { return autoHideReplace; }
- set { autoHideReplace = value; }
- }
-
-
- [DisplayName("Group By File")]
- [Category("Settings")]
- [Description("Group all the results from the same file under a title."), DefaultValue(true)]
- public bool GroupByFile
- {
- get { return groupByFile; }
- set { groupByFile = value; }
- }
-
-
-
-
- [DisplayName("Ignore Below")]
- [Category("Settings")]
- [Description("When FindAsYouType is on, set the minimum characters to activate the find."), DefaultValue(3)]
- public int IgnoreBelow
- {
- get { return ignoreCharactersBelow; }
- set { ignoreCharactersBelow = value; }
- }
-
- [DisplayName("Typing Timer Interval")]
- [Category("Settings")]
- [Description("When FeedAsYouMove is true, sets the delay until the panel is refreshed. This setting is to prevent overload of searches."), DefaultValue("500")]
- public int TypingTimerInterval
- {
- get { return typingTimerInterval; }
- set { typingTimerInterval = value; }
- }
-
- [DisplayName("Filter Presets")]
- [Category("Settings")]
- [Description("Write you favorite regex filters here"), DefaultValue(null)]
- public string[] FilterPresets
- {
- get { return filterPresets; }
- set { filterPresets = value; }
- }
-
- [DisplayName("Search History Limit")]
- [Category("Settings")]
- [Description("Determine how much history will be saved in find combo box"), DefaultValue(10)]
- public int SearchHistoryLimit
- {
- get { return searchHistoryLimit; }
- set { searchHistoryLimit = value; }
- }
-
- [DisplayName("Options Tab Open")]
- [Category("Resize Result List")]
- [Description("Resize result list if the plugin lost focus when Options tab open"), DefaultValue(true)]
- public bool ResizeOptionsTab
- {
- get { return resizeOptionsTab; }
- set { resizeOptionsTab = value; }
- }
-
- [DisplayName("Replace Tab Open")]
- [Category("Resize Result List")]
- [Description("Resize result list if the plugin lost focus when Replace tab open"), DefaultValue(false)]
- public bool ResizeReplaceTab
- {
- get { return resizeReplaceTab; }
- set { resizeReplaceTab = value; }
- }
-
- [DisplayName("Filter Tab Open")]
- [Category("Resize Result List")]
- [Description("Resize result list if the plugin lost focus when Filter tab open"), DefaultValue(false)]
- public bool ResizeFilterTab
- {
- get { return resizeFilterTab; }
- set { resizeFilterTab = value; }
- }
-
- [DisplayName("Folders Tab Open")]
- [Category("Resize Result List")]
- [Description("Resize result list if the plugin lost focus when Folders tab open"), DefaultValue(true)]
- public bool ResizeFoldersTab
- {
- get { return resizeFoldersTab; }
- set { resizeFoldersTab = value; }
- }
-
- [DisplayName("Operations Tab Open")]
- [Category("Resize Result List")]
- [Description("Resize result list if the plugin lost focus when Operations tab open"), DefaultValue(true)]
- public bool ResizeOperationsTab
- {
- get { return resizeOperationsTab; }
- set { resizeOperationsTab = value; }
- }
-
- }
-
-}
diff --git a/ findandreplaceex/UpgradeLog.htm b/ findandreplaceex/UpgradeLog.htm
deleted file mode 100644
index 678b716..0000000
Binary files a/ findandreplaceex/UpgradeLog.htm and /dev/null differ
diff --git a/ findandreplaceex/app.config b/ findandreplaceex/app.config
deleted file mode 100644
index 9448af8..0000000
--- a/ findandreplaceex/app.config
+++ /dev/null
@@ -1,3 +0,0 @@
-
-
-
diff --git a/ findandreplaceex/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ findandreplaceex/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 89ced11..0000000
Binary files a/ findandreplaceex/obj/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/FindReplaceEx.PluginUI.resources b/ findandreplaceex/obj/Debug/FindReplaceEx.PluginUI.resources
deleted file mode 100644
index 06c24d0..0000000
Binary files a/ findandreplaceex/obj/Debug/FindReplaceEx.PluginUI.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/FindReplaceEx.Properties.Resources.resources b/ findandreplaceex/obj/Debug/FindReplaceEx.Properties.Resources.resources
deleted file mode 100644
index 06c24d0..0000000
Binary files a/ findandreplaceex/obj/Debug/FindReplaceEx.Properties.Resources.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/FindReplaceEx.Resources.en_US.resources b/ findandreplaceex/obj/Debug/FindReplaceEx.Resources.en_US.resources
deleted file mode 100644
index 6319027..0000000
Binary files a/ findandreplaceex/obj/Debug/FindReplaceEx.Resources.en_US.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/FindReplaceEx.csproj.FileListAbsolute.txt b/ findandreplaceex/obj/Debug/FindReplaceEx.csproj.FileListAbsolute.txt
deleted file mode 100644
index 07d4216..0000000
--- a/ findandreplaceex/obj/Debug/FindReplaceEx.csproj.FileListAbsolute.txt
+++ /dev/null
@@ -1,53 +0,0 @@
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\ResolveAssemblyReference.cache
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.Properties.Resources.resources
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\bin\Debug\FindReplaceEx.dll.config
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\bin\Debug\FindReplaceEx.dll
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\bin\Debug\FindReplaceEx.pdb
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\bin\Debug\FlashDevelop.exe
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\bin\Debug\PluginCore.dll
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\bin\Debug\FlashDevelop.pdb
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\bin\Debug\PluginCore.pdb
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.dll
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.pdb
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.PluginUI.resources
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.Resources.en_US.resources
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\ResolveAssemblyReference.cache
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.PluginUI.resources
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.Properties.Resources.resources
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.Resources.en_US.resources
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.dll
-d:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Debug\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Debug\ResolveAssemblyReference.cache
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Debug\FindReplaceEx.PluginUI.resources
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Debug\FindReplaceEx.Properties.Resources.resources
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Debug\FindReplaceEx.Resources.en_US.resources
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Debug\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Debug\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\My Documents\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\My Documents\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\My Documents\FlashDevelop dev\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\FD4\External\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\My Documents\FlashDevelop dev\FD4\External\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\FD4\External\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Debug\ResolveAssemblyReference.cache
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Debug\FindReplaceEx.PluginUI.resources
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Debug\FindReplaceEx.Properties.Resources.resources
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Debug\FindReplaceEx.Resources.en_US.resources
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Debug\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Debug\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\FD4\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\My Documents\FlashDevelop dev\FD4\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\FD4\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
diff --git a/ findandreplaceex/obj/Debug/FindReplaceEx.csproj.GenerateResource.Cache b/ findandreplaceex/obj/Debug/FindReplaceEx.csproj.GenerateResource.Cache
deleted file mode 100644
index d9457cb..0000000
Binary files a/ findandreplaceex/obj/Debug/FindReplaceEx.csproj.GenerateResource.Cache and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/FindReplaceEx.dll b/ findandreplaceex/obj/Debug/FindReplaceEx.dll
deleted file mode 100644
index e26181a..0000000
Binary files a/ findandreplaceex/obj/Debug/FindReplaceEx.dll and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/FindReplaceEx.pdb b/ findandreplaceex/obj/Debug/FindReplaceEx.pdb
deleted file mode 100644
index 17e951a..0000000
Binary files a/ findandreplaceex/obj/Debug/FindReplaceEx.pdb and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/ResolveAssemblyReference.cache b/ findandreplaceex/obj/Debug/ResolveAssemblyReference.cache
deleted file mode 100644
index 884aa9a..0000000
Binary files a/ findandreplaceex/obj/Debug/ResolveAssemblyReference.cache and /dev/null differ
diff --git a/ findandreplaceex/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll b/ findandreplaceex/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll
deleted file mode 100644
index 684128c..0000000
Binary files a/ findandreplaceex/obj/Debug/TempPE/Properties.Resources.Designer.cs.dll and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/FindReplaceEx.PluginUI.resources b/ findandreplaceex/obj/Release/FindReplaceEx.PluginUI.resources
deleted file mode 100644
index 06c24d0..0000000
Binary files a/ findandreplaceex/obj/Release/FindReplaceEx.PluginUI.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/FindReplaceEx.Properties.Resources.resources b/ findandreplaceex/obj/Release/FindReplaceEx.Properties.Resources.resources
deleted file mode 100644
index 06c24d0..0000000
Binary files a/ findandreplaceex/obj/Release/FindReplaceEx.Properties.Resources.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/FindReplaceEx.Resources.en_US.resources b/ findandreplaceex/obj/Release/FindReplaceEx.Resources.en_US.resources
deleted file mode 100644
index 6319027..0000000
Binary files a/ findandreplaceex/obj/Release/FindReplaceEx.Resources.en_US.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/FindReplaceEx.csproj.FileListAbsolute.txt b/ findandreplaceex/obj/Release/FindReplaceEx.csproj.FileListAbsolute.txt
deleted file mode 100644
index 2b6e7e2..0000000
--- a/ findandreplaceex/obj/Release/FindReplaceEx.csproj.FileListAbsolute.txt
+++ /dev/null
@@ -1,31 +0,0 @@
-E:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\ResolveAssemblyReference.cache
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\ResolveAssemblyReference.cache
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\FindReplaceEx.PluginUI.resources
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\FindReplaceEx.Properties.Resources.resources
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\FindReplaceEx.Resources.en_US.resources
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\FindReplaceEx.csproj.GenerateResource.Cache
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\FindReplaceEx.dll
-D:\My Documents\Bdelphi\new FlashDevelop\FD3\External\Plugins\FindReplaceEx\obj\Release\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\My Documents\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\My Documents\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Release\ResolveAssemblyReference.cache
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Release\FindReplaceEx.PluginUI.resources
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Release\FindReplaceEx.Properties.Resources.resources
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Release\FindReplaceEx.Resources.en_US.resources
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Release\FindReplaceEx.csproj.GenerateResource.Cache
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Release\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\local\FindReplaceEx\obj\Release\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\FD4\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\My Documents\FlashDevelop dev\FD4\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\FD4\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Release\ResolveAssemblyReference.cache
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Release\FindReplaceEx.PluginUI.resources
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Release\FindReplaceEx.Properties.Resources.resources
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Release\FindReplaceEx.Resources.en_US.resources
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Release\FindReplaceEx.csproj.GenerateResource.Cache
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Release\FindReplaceEx.dll
-D:\My Documents\FlashDevelop dev\FD4\External\3rdParty\FindReplaceEx\obj\Release\FindReplaceEx.pdb
diff --git a/ findandreplaceex/obj/Release/FindReplaceEx.csproj.GenerateResource.Cache b/ findandreplaceex/obj/Release/FindReplaceEx.csproj.GenerateResource.Cache
deleted file mode 100644
index 4dc2356..0000000
Binary files a/ findandreplaceex/obj/Release/FindReplaceEx.csproj.GenerateResource.Cache and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/FindReplaceEx.dll b/ findandreplaceex/obj/Release/FindReplaceEx.dll
deleted file mode 100644
index af61123..0000000
Binary files a/ findandreplaceex/obj/Release/FindReplaceEx.dll and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/FindReplaceEx.pdb b/ findandreplaceex/obj/Release/FindReplaceEx.pdb
deleted file mode 100644
index 7308d97..0000000
Binary files a/ findandreplaceex/obj/Release/FindReplaceEx.pdb and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/ResolveAssemblyReference.cache b/ findandreplaceex/obj/Release/ResolveAssemblyReference.cache
deleted file mode 100644
index 8eae647..0000000
Binary files a/ findandreplaceex/obj/Release/ResolveAssemblyReference.cache and /dev/null differ
diff --git a/ findandreplaceex/obj/Release/TempPE/Properties.Resources.Designer.cs.dll b/ findandreplaceex/obj/Release/TempPE/Properties.Resources.Designer.cs.dll
deleted file mode 100644
index c984e8c..0000000
Binary files a/ findandreplaceex/obj/Release/TempPE/Properties.Resources.Designer.cs.dll and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache b/ findandreplaceex/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache
deleted file mode 100644
index 438a1dc..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/DesignTimeResolveAssemblyReferences.cache and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache b/ findandreplaceex/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache
deleted file mode 100644
index 0e6dea0..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/DesignTimeResolveAssemblyReferencesInput.cache and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.PluginUI.resources b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.PluginUI.resources
deleted file mode 100644
index 06c24d0..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.PluginUI.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.Properties.Resources.resources b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.Properties.Resources.resources
deleted file mode 100644
index 06c24d0..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.Properties.Resources.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.Resources.en_US.resources b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.Resources.en_US.resources
deleted file mode 100644
index 6319027..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.Resources.en_US.resources and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csproj.FileListAbsolute.txt b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csproj.FileListAbsolute.txt
deleted file mode 100644
index 80c651d..0000000
--- a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csproj.FileListAbsolute.txt
+++ /dev/null
@@ -1,38 +0,0 @@
-D:\michael\FlashDevelop\flashdevelop-development\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll.config
-D:\michael\FlashDevelop\flashdevelop-development\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.dll
-D:\michael\FlashDevelop\flashdevelop-development\FlashDevelop\Bin\Debug\Plugins\FindReplaceEx.pdb
-D:\michael\projects\VisualStudio\c#\FindReplaceEx\obj\x86\Debug\FindReplaceEx.PluginUI.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceEx\obj\x86\Debug\FindReplaceEx.Properties.Resources.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceEx\obj\x86\Debug\FindReplaceEx.Resources.en_US.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceEx\obj\x86\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-D:\michael\projects\VisualStudio\c#\FindReplaceEx\obj\x86\Debug\FindReplaceEx.dll
-D:\michael\projects\VisualStudio\c#\FindReplaceEx\obj\x86\Debug\FindReplaceEx.pdb
-D:\michael\projects\VisualStudio\c#\FindReplaceEx\obj\x86\Debug\FindReplaceEx.csprojResolveAssemblyReference.cache
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry\obj\x86\Debug\FindReplaceEx.csprojResolveAssemblyReference.cache
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry\obj\x86\Debug\FindReplaceEx.PluginUI.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry\obj\x86\Debug\FindReplaceEx.Properties.Resources.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry\obj\x86\Debug\FindReplaceEx.Resources.en_US.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry\obj\x86\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry\obj\x86\Debug\FindReplaceEx.dll
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry\obj\x86\Debug\FindReplaceEx.pdb
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry2\obj\x86\Debug\FindReplaceEx.csprojResolveAssemblyReference.cache
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry2\obj\x86\Debug\FindReplaceEx.PluginUI.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry2\obj\x86\Debug\FindReplaceEx.Properties.Resources.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry2\obj\x86\Debug\FindReplaceEx.Resources.en_US.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry2\obj\x86\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry2\obj\x86\Debug\FindReplaceEx.dll
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry2\obj\x86\Debug\FindReplaceEx.pdb
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry3\obj\x86\Debug\FindReplaceEx.csprojResolveAssemblyReference.cache
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry3\obj\x86\Debug\FindReplaceEx.PluginUI.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry3\obj\x86\Debug\FindReplaceEx.Properties.Resources.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry3\obj\x86\Debug\FindReplaceEx.Resources.en_US.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry3\obj\x86\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry3\obj\x86\Debug\FindReplaceEx.dll
-D:\michael\projects\VisualStudio\c#\FindReplaceExTry3\obj\x86\Debug\FindReplaceEx.pdb
-D:\michael\projects\VisualStudio\c#\FindReplaceEx4\obj\x86\Debug\FindReplaceEx.csprojResolveAssemblyReference.cache
-D:\michael\projects\VisualStudio\c#\FindReplaceEx4\obj\x86\Debug\FindReplaceEx.PluginUI.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceEx4\obj\x86\Debug\FindReplaceEx.Properties.Resources.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceEx4\obj\x86\Debug\FindReplaceEx.Resources.en_US.resources
-D:\michael\projects\VisualStudio\c#\FindReplaceEx4\obj\x86\Debug\FindReplaceEx.csproj.GenerateResource.Cache
-D:\michael\projects\VisualStudio\c#\FindReplaceEx4\obj\x86\Debug\FindReplaceEx.dll
-D:\michael\projects\VisualStudio\c#\FindReplaceEx4\obj\x86\Debug\FindReplaceEx.pdb
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csproj.GenerateResource.Cache b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csproj.GenerateResource.Cache
deleted file mode 100644
index c39b085..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csproj.GenerateResource.Cache and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csprojResolveAssemblyReference.cache b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csprojResolveAssemblyReference.cache
deleted file mode 100644
index dde4654..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.csprojResolveAssemblyReference.cache and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.dll b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.dll
deleted file mode 100644
index 144b478..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.dll and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.pdb b/ findandreplaceex/obj/x86/Debug/FindReplaceEx.pdb
deleted file mode 100644
index 842e958..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/FindReplaceEx.pdb and /dev/null differ
diff --git a/ findandreplaceex/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll b/ findandreplaceex/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll
deleted file mode 100644
index d6aff83..0000000
Binary files a/ findandreplaceex/obj/x86/Debug/TempPE/Properties.Resources.Designer.cs.dll and /dev/null differ
diff --git "a/ findandreplaceex/\327\236\327\251\327\231\327\236\327\225\327\252.txt" "b/ findandreplaceex/\327\236\327\251\327\231\327\236\327\225\327\252.txt"
deleted file mode 100644
index aacaf97..0000000
--- "a/ findandreplaceex/\327\236\327\251\327\231\327\236\327\225\327\252.txt"
+++ /dev/null
@@ -1,31 +0,0 @@
-ùçøåø 1
-V - úé÷åï èåìèéô îäáäá
-V - äåñôú ÷éöåøé î÷ùéí ìkeybord manager
-V - áçéôåù úé÷éåú ìäçìéó àú äö'÷ áå÷ñ ì-3 îöáéí - äîöá äùìéùé îùàéø àú äàôùøåú ìçåöä
-V - ìçéöä òì àðèø îçìéôä (åîçôùú?).
-V - äéñèåøééú çéôåùéí - àôùø ìäåñéó ëàùø ìåçöéí òì àéðèø
-V - äåøãú ëôúåø äçéôåù, îòëùéå îçôùéí åîçìéôéí òí àðèø
-V-úé÷åï áâ -ùîéøú ä-V áùìåùú äö'÷áå÷ñ äòìéåðéí
-V - äåñôú èåìèéô òí äðúéá äîìà áëøèéñééä úé÷éåú
-V - ìäåñéó îùúðä áñèéðâ ùé÷áò ëîä éùîøå áäéñèåøééú äçéôåùéí
-V - îîùéê ìçôù áëì äúé÷éåú àí äö'÷ áå÷ñ îáåîï ëøéáåò.
-V - ñéãåø îçãù ùì äìééàååè.
-V - äåñôú ñôìéèø äîàôùø äâãìä ùì çìåï äúåöàåú
-V - ìàçø äçìôä ìà îåøéã àú äúåöàåú.
-ùçøåø 2
-V - ùéðåé ñéåîú áèàá ôåìãøñ àí æä ä÷ñ àå AS
-V - ñéãåø äòîåãåú áôàðì result
-V - äøçáú ôàðì äúåöàåú ëàùø ä-result ìà áôå÷åñ - ìòùåú áäâãøåú ùàôùø ìäçìéè äàí ôàðì äøéñåìè éúøçá ìàçø çéôåù(ôø èàá)
-V - ìòùåú ùéúàéí âí àí ùîéí áöã ( åìà ø÷ ìîèä)
-
--ùìà éáöò çéôåù îçãù áîòáø áéï ÷áöéí
-- ìáãå÷ àéê îåñéôéí ôìàéï ì-APPMAN
--ìòùåú àú ä-tooltip ùì äúåöàåú ÷áåò åìà îäáäá.
-- ìçæ÷ àú äñéîåï ùì äñì÷ùï - contrast
-
-- çéôåù åäçìôä áúé÷éåú ìà òåáã ëîå ùöøéê
-
-? - ìîä äñéø àú ä-V îäö'÷ áå÷ñéí?
-? - àåìé ëãàé ìòùåú tab ø÷ òì find å-replace?
-?- ìäçìéó àú ä-try-catch á-tooltip
-?- ìîä öøéê àú äñéôåø ùì ä÷åðèøñè? ìîä ìà ìñðï àú äúåöàåú ìâîøé?
\ No newline at end of file