-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSettings.cs
163 lines (140 loc) · 5.68 KB
/
Settings.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
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; }
}
}
}