redcar 0.10 → 0.11.0dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGES +14 -0
- data/Rakefile +68 -29
- data/lib/redcar.rb +2 -2
- data/plugins/application/lib/application/dialogs/filter_list_dialog.rb +2 -1
- data/plugins/application_swt/spec/application_swt/gradient_spec.rb +3 -12
- data/plugins/core/lib/core/resource.rb +13 -5
- data/plugins/document_search/features/find.feature +366 -214
- data/plugins/document_search/features/incremental_search.feature +351 -0
- data/plugins/document_search/features/replace.feature +16 -16
- data/plugins/document_search/features/step_definitions/find_steps.rb +16 -0
- data/plugins/document_search/features/support/env.rb +11 -0
- data/plugins/document_search/lib/document_search.rb +149 -109
- data/plugins/document_search/lib/document_search/commands.rb +251 -202
- data/plugins/document_search/lib/document_search/find_speedbar.rb +138 -81
- data/plugins/document_search/lib/document_search/incremental_search_speedbar.rb +70 -0
- data/plugins/document_search/lib/document_search/query_options.rb +15 -39
- data/plugins/document_search/plugin.rb +1 -1
- data/plugins/edit_view/features/step_definitions/editing_steps.rb +6 -2
- data/plugins/edit_view_swt/lib/edit_view_swt.rb +2 -2
- data/plugins/file_parser/lib/file_parser.rb +6 -1
- data/plugins/html_view/features/step_definitions/web_view_steps.rb +12 -0
- data/plugins/html_view/features/support/env.rb +16 -0
- data/plugins/html_view/lib/html_view.rb +5 -1
- data/plugins/line_tools/lib/line_tools.rb +16 -0
- data/plugins/project/features/find_file.feature +28 -0
- data/plugins/project/features/open_and_save_files.feature +11 -0
- data/plugins/project/features/step_definitions/file_steps.rb +6 -1
- data/plugins/project/features/support/env.rb +2 -0
- data/plugins/project/lib/project.rb +49 -6
- data/plugins/project/lib/project/commands.rb +18 -6
- data/plugins/project/lib/project/find_file_dialog.rb +19 -8
- data/plugins/project/lib/project/find_recent_dialog.rb +30 -0
- data/plugins/project/lib/project/manager.rb +41 -10
- data/plugins/project/lib/project/recent.rb +64 -0
- data/plugins/project/spec/fixtures/myproject/vendor/bar.rb +0 -0
- data/plugins/project/spec/fixtures/myproject/vendor/plugins/bar.rb +0 -0
- data/plugins/{find-in-project → project_search}/TODO.md +3 -3
- data/plugins/project_search/features/support/env.rb +6 -0
- data/plugins/project_search/features/word_search.feature +34 -0
- data/plugins/project_search/lib/project_search.rb +73 -0
- data/plugins/project_search/lib/project_search/binary_data_detector.rb +46 -0
- data/plugins/project_search/lib/project_search/commands.rb +62 -0
- data/plugins/project_search/lib/project_search/hit.rb +17 -0
- data/plugins/{find-in-project/lib/find_in_project → project_search/lib/project_search}/images/collapsed.png +0 -0
- data/plugins/{find-in-project/lib/find_in_project → project_search/lib/project_search}/images/expanded.png +0 -0
- data/plugins/{find-in-project/lib/find_in_project → project_search/lib/project_search}/images/spinner.gif +0 -0
- data/plugins/project_search/lib/project_search/lucene_index.rb +64 -0
- data/plugins/project_search/lib/project_search/lucene_refresh.rb +22 -0
- data/plugins/project_search/lib/project_search/project.rb +14 -0
- data/plugins/project_search/lib/project_search/query.rb +29 -0
- data/plugins/{find-in-project/lib/find_in_project → project_search/lib/project_search}/stylesheets/style.css +14 -3
- data/plugins/project_search/lib/project_search/views/_file.html.erb +60 -0
- data/plugins/{find-in-project/lib/find_in_project → project_search/lib/project_search}/views/index.html.erb +12 -9
- data/plugins/project_search/lib/project_search/word_search.rb +105 -0
- data/plugins/project_search/lib/project_search/word_search_controller.rb +207 -0
- data/plugins/project_search/plugin.rb +8 -0
- data/plugins/project_search/spec/fixtures/project/binary_file.bin +0 -0
- data/plugins/project_search/spec/fixtures/project/foo.txt +43 -0
- data/plugins/project_search/spec/fixtures/project/qux.rb +3 -0
- data/plugins/project_search/spec/project_search/binary_data_detector_spec.rb +24 -0
- data/plugins/project_search/spec/project_search/word_search_spec.rb +157 -0
- data/plugins/project_search/spec/spec_helper.rb +27 -0
- data/plugins/redcar/redcar.rb +77 -71
- data/plugins/ruby/lib/ruby/syntax_checker.rb +1 -1
- data/plugins/snippets/features/snippets.feature +12 -0
- data/plugins/snippets/lib/snippets/tab_handler.rb +1 -1
- metadata +46 -25
- data/plugins/document_search/features/find_and_replace.feature +0 -723
- data/plugins/document_search/lib/document_search/find_and_replace_speedbar.rb +0 -142
- data/plugins/find-in-project/lib/find_in_project.rb +0 -35
- data/plugins/find-in-project/lib/find_in_project/commands.rb +0 -30
- data/plugins/find-in-project/lib/find_in_project/controllers.rb +0 -170
- data/plugins/find-in-project/lib/find_in_project/views/_divider.html.erb +0 -4
- data/plugins/find-in-project/lib/find_in_project/views/_file_heading.html.erb +0 -10
- data/plugins/find-in-project/lib/find_in_project/views/_file_line.html.erb +0 -6
- data/plugins/find-in-project/plugin.rb +0 -11
- data/plugins/project/lib/project/recent_directories.rb +0 -54
@@ -0,0 +1,351 @@
|
|
1
|
+
# Note: Most scenarios in this file can and should be adapted for the Find speedbar and added to
|
2
|
+
# find.feature. Aside from different names, the tests will need to be adjusted to not rely on
|
3
|
+
# incremental updating of query matches.
|
4
|
+
|
5
|
+
@speedbar
|
6
|
+
Feature: Incremental Search
|
7
|
+
|
8
|
+
Background:
|
9
|
+
Given I open a new edit tab
|
10
|
+
|
11
|
+
Scenario: Open Incremental Search speedbar
|
12
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
13
|
+
And I move the cursor to 0
|
14
|
+
And I open the incremental search speedbar
|
15
|
+
Then I should see the incremental search speedbar
|
16
|
+
|
17
|
+
Scenario: Search for a word should select next occurrence
|
18
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
19
|
+
And I move the cursor to 0
|
20
|
+
And I open the incremental search speedbar
|
21
|
+
And I type "Bar" into the "Find" field in the speedbar
|
22
|
+
Then the selected text should be "Bar"
|
23
|
+
|
24
|
+
Scenario: Search twice should move to the next occurrence
|
25
|
+
When I replace the contents with "Foo\nBar\nFoo"
|
26
|
+
And I move the cursor to 0
|
27
|
+
And I open the incremental search speedbar
|
28
|
+
And I type "Foo" into the "Find" field in the speedbar
|
29
|
+
Then the selection should be on line 0
|
30
|
+
When I open the incremental search speedbar
|
31
|
+
Then the selected text should be "Foo"
|
32
|
+
And the selection should be on line 2
|
33
|
+
|
34
|
+
Scenario: Search should incrementally update
|
35
|
+
When I replace the contents with "Foo\nBaar\nBaaz"
|
36
|
+
And I move the cursor to 0
|
37
|
+
And I open the incremental search speedbar
|
38
|
+
And I type "Ba" into the "Find" field in the speedbar
|
39
|
+
Then the selected text should be "Ba"
|
40
|
+
And the selection should be on line 1
|
41
|
+
When I type "Baa" into the "Find" field in the speedbar
|
42
|
+
And the selection should be on line 1
|
43
|
+
When I type "Baaz" into the "Find" field in the speedbar
|
44
|
+
Then the selected text should be "Baaz"
|
45
|
+
And the selection should be on line 2
|
46
|
+
When I type "Baa" into the "Find" field in the speedbar
|
47
|
+
Then the selection should be on line 2
|
48
|
+
|
49
|
+
Scenario: Search for a word adjacent to cursor should select word
|
50
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
51
|
+
And I move the cursor to 0
|
52
|
+
And I open the incremental search speedbar
|
53
|
+
And I type "Foo" into the "Find" field in the speedbar
|
54
|
+
Then the selected text should be "Foo"
|
55
|
+
|
56
|
+
Scenario: Search for a word should find occurrence after the cursor
|
57
|
+
When I replace the contents with "Foo\nBar\nBaz\nFoo"
|
58
|
+
And I move the cursor to 1
|
59
|
+
And I open the incremental search speedbar
|
60
|
+
And I type "Foo" into the "Find" field in the speedbar
|
61
|
+
Then the selection should be on line 3
|
62
|
+
And the selected text should be "Foo"
|
63
|
+
When I open the incremental search speedbar
|
64
|
+
Then the selected text should be "Foo"
|
65
|
+
And the selection should be on line 0
|
66
|
+
|
67
|
+
Scenario: Search for a word should wrap to earlier occurrence if none left
|
68
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
69
|
+
And I move the cursor to 1
|
70
|
+
And I open the incremental search speedbar
|
71
|
+
And I type "Foo" into the "Find" field in the speedbar
|
72
|
+
Then the selected text should be "Foo"
|
73
|
+
And the selection should be on line 0
|
74
|
+
|
75
|
+
Scenario: Not thrown off by multi-byte characters
|
76
|
+
When I replace the contents with "Benedikt Müller"
|
77
|
+
And I move the cursor to 0
|
78
|
+
And I open the incremental search speedbar
|
79
|
+
And I type "ler" into the "Find" field in the speedbar
|
80
|
+
Then the selected text should be "ler"
|
81
|
+
And the selection range should be from 12 to 15
|
82
|
+
|
83
|
+
Scenario: Not thrown off by multi-byte characters 2
|
84
|
+
When I replace the contents with "Benedikt Müller\n foo "
|
85
|
+
And I move the cursor to 0
|
86
|
+
And I open the incremental search speedbar
|
87
|
+
And I type "foo" into the "Find" field in the speedbar
|
88
|
+
Then the selected text should be "foo"
|
89
|
+
And the selection range should be from 17 to 20
|
90
|
+
|
91
|
+
Scenario: Not thrown off by multi-byte characters 3
|
92
|
+
When I replace the contents with "你好, 凯兰\nYou make my heart super happy."
|
93
|
+
And I move the cursor to 0
|
94
|
+
And I open the incremental search speedbar
|
95
|
+
And I type "you" into the "Find" field in the speedbar
|
96
|
+
Then the selected text should be "You"
|
97
|
+
And the selection range should be from 7 to 10
|
98
|
+
|
99
|
+
Scenario: Handles repeated search across by multi-byte characters
|
100
|
+
When I replace the contents with "Foo\n你好, 凯兰\nFoo\nBar\nFoo\nBaz"
|
101
|
+
And I move the cursor to 0
|
102
|
+
And I open the incremental search speedbar
|
103
|
+
And I type "foo" into the "Find" field in the speedbar
|
104
|
+
Then the selected text should be "Foo"
|
105
|
+
And the selection should be on line 0
|
106
|
+
When I open the incremental search speedbar
|
107
|
+
Then the selected text should be "Foo"
|
108
|
+
And the selection should be on line 2
|
109
|
+
When I open the incremental search speedbar
|
110
|
+
Then the selected text should be "Foo"
|
111
|
+
And the selection should be on line 4
|
112
|
+
When I open the incremental search speedbar
|
113
|
+
Then the selected text should be "Foo"
|
114
|
+
And the selection should be on line 0
|
115
|
+
When I open the incremental search speedbar
|
116
|
+
Then the selected text should be "Foo"
|
117
|
+
And the selection should be on line 2
|
118
|
+
|
119
|
+
Scenario: Should select multi-byte characters
|
120
|
+
When I replace the contents with "Benedikt Müller"
|
121
|
+
And I move the cursor to 0
|
122
|
+
And I open the incremental search speedbar
|
123
|
+
And I type "mül" into the "Find" field in the speedbar
|
124
|
+
Then the selected text should be "Mül"
|
125
|
+
And the selection range should be from 9 to 12
|
126
|
+
|
127
|
+
Scenario: Should select multi-byte characters
|
128
|
+
When I replace the contents with "Benedikt Müller"
|
129
|
+
And I move the cursor to 0
|
130
|
+
And I open the incremental search speedbar
|
131
|
+
And I type "mül" into the "Find" field in the speedbar
|
132
|
+
Then the selected text should be "Mül"
|
133
|
+
And the selection range should be from 9 to 12
|
134
|
+
|
135
|
+
Scenario: Should select multi-byte characters 2
|
136
|
+
When I replace the contents with "你好, 凯兰\nYou make my heart super happy."
|
137
|
+
And I move the cursor to 0
|
138
|
+
And I open the incremental search speedbar
|
139
|
+
And I type "凯兰" into the "Find" field in the speedbar
|
140
|
+
Then the selected text should be "凯兰"
|
141
|
+
And the selection range should be from 4 to 6
|
142
|
+
|
143
|
+
Scenario: Doesn't search for a regex
|
144
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
145
|
+
And I move the cursor to 0
|
146
|
+
And I open the incremental search speedbar
|
147
|
+
And I type "Ba." into the "Find" field in the speedbar
|
148
|
+
Then there should not be any text selected
|
149
|
+
|
150
|
+
Scenario: Search for a regex
|
151
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
152
|
+
And I move the cursor to 0
|
153
|
+
And I open the incremental search speedbar
|
154
|
+
And I type "Ba." into the "Find" field in the speedbar
|
155
|
+
Then there should not be any text selected
|
156
|
+
When I check "Regex" in the speedbar
|
157
|
+
Then the selected text should be "Bar"
|
158
|
+
When I open the incremental search speedbar
|
159
|
+
Then the selected text should be "Baz"
|
160
|
+
|
161
|
+
Scenario: Search for a regex matches a second time
|
162
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
163
|
+
And I move the cursor to 0
|
164
|
+
And I open the incremental search speedbar
|
165
|
+
And I type "Ba." into the "Find" field in the speedbar
|
166
|
+
Then there should not be any text selected
|
167
|
+
When I check "Regex" in the speedbar
|
168
|
+
Then the selected text should be "Bar"
|
169
|
+
When I open the incremental search speedbar
|
170
|
+
Then the selected text should be "Baz"
|
171
|
+
|
172
|
+
Scenario: Should not match case by default
|
173
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
174
|
+
And I move the cursor to 0
|
175
|
+
And I open the incremental search speedbar
|
176
|
+
And I type "foo" into the "Find" field in the speedbar
|
177
|
+
Then the selected text should be "Foo"
|
178
|
+
|
179
|
+
Scenario: Should not match case with regex by default
|
180
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
181
|
+
And I move the cursor to 0
|
182
|
+
And I open the incremental search speedbar
|
183
|
+
And I type "fo." into the "Find" field in the speedbar
|
184
|
+
Then there should not be any text selected
|
185
|
+
When I check "Regex" in the speedbar
|
186
|
+
Then the selected text should be "Foo"
|
187
|
+
|
188
|
+
Scenario: Should match case if requested
|
189
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
190
|
+
And I move the cursor to 0
|
191
|
+
And I open the incremental search speedbar
|
192
|
+
And I type "foo" into the "Find" field in the speedbar
|
193
|
+
Then the selected text should be "Foo"
|
194
|
+
When I check "Match case" in the speedbar
|
195
|
+
Then there should not be any text selected
|
196
|
+
When I type "Foo" into the "Find" field in the speedbar
|
197
|
+
Then the selected text should be "Foo"
|
198
|
+
|
199
|
+
Scenario: Should match case if requested with regex
|
200
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
201
|
+
And I move the cursor to 0
|
202
|
+
And I open the incremental search speedbar
|
203
|
+
And I check "Regex" in the speedbar
|
204
|
+
And I type "fo." into the "Find" field in the speedbar
|
205
|
+
Then the selected text should be "Foo"
|
206
|
+
When I check "Match case" in the speedbar
|
207
|
+
Then there should not be any text selected
|
208
|
+
|
209
|
+
Scenario: Repeat incremental search with wrap around
|
210
|
+
When I replace the contents with "Foo\nBar Foo\nHmm\nBaz"
|
211
|
+
And I move the cursor to 0
|
212
|
+
And I open the incremental search speedbar
|
213
|
+
And I type "Foo" into the "Find" field in the speedbar
|
214
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
215
|
+
And the selected text should be "Foo"
|
216
|
+
And the selection range should be from 0 to 3
|
217
|
+
When I open the incremental search speedbar
|
218
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
219
|
+
And the selected text should be "Foo"
|
220
|
+
And the selection range should be from 8 to 11
|
221
|
+
When I open the incremental search speedbar
|
222
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
223
|
+
And the selected text should be "Foo"
|
224
|
+
And the selection range should be from 0 to 3
|
225
|
+
|
226
|
+
Scenario: Repeat incremental search without wrap around
|
227
|
+
When I replace the contents with "Foo\nBar Foo\nHmm\nBaz"
|
228
|
+
And I move the cursor to 0
|
229
|
+
And I open the incremental search speedbar
|
230
|
+
And I uncheck "Wrap around" in the speedbar
|
231
|
+
And I type "Foo" into the "Find" field in the speedbar
|
232
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
233
|
+
And the selected text should be "Foo"
|
234
|
+
And the selection range should be from 0 to 3
|
235
|
+
When I open the incremental search speedbar
|
236
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
237
|
+
And the selected text should be "Foo"
|
238
|
+
And the selection range should be from 8 to 11
|
239
|
+
When I open the incremental search speedbar
|
240
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
241
|
+
And there should not be any text selected
|
242
|
+
|
243
|
+
Scenario: Find next with wrap around
|
244
|
+
When I replace the contents with "Foo\nBar Foo\nHmm\nBaz"
|
245
|
+
And I move the cursor to 0
|
246
|
+
And I open the incremental search speedbar
|
247
|
+
And I type "Foo" into the "Find" field in the speedbar
|
248
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
249
|
+
And the selected text should be "Foo"
|
250
|
+
And the selection range should be from 0 to 3
|
251
|
+
When I run the command Redcar::DocumentSearch::DoFindNextCommand
|
252
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
253
|
+
And the selected text should be "Foo"
|
254
|
+
And the selection range should be from 8 to 11
|
255
|
+
When I run the command Redcar::DocumentSearch::DoFindNextCommand
|
256
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
257
|
+
And the selected text should be "Foo"
|
258
|
+
And the selection range should be from 0 to 3
|
259
|
+
|
260
|
+
Scenario: Find next without wrap around
|
261
|
+
When I replace the contents with "Foo\nBar Foo\nHmm\nBaz"
|
262
|
+
And I move the cursor to 0
|
263
|
+
And I open the incremental search speedbar
|
264
|
+
And I uncheck "Wrap around" in the speedbar
|
265
|
+
And I type "foo" into the "Find" field in the speedbar
|
266
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
267
|
+
And the selected text should be "Foo"
|
268
|
+
And the selection range should be from 0 to 3
|
269
|
+
When I run the command Redcar::DocumentSearch::DoFindNextCommand
|
270
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
271
|
+
And the selected text should be "Foo"
|
272
|
+
And the selection range should be from 8 to 11
|
273
|
+
When I run the command Redcar::DocumentSearch::DoFindNextCommand
|
274
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
275
|
+
And there should not be any text selected
|
276
|
+
|
277
|
+
Scenario: Find previous with wrap around by default
|
278
|
+
When I replace the contents with "Foo\nBar Foo\nHmm\nBaz"
|
279
|
+
And I move the cursor to 18
|
280
|
+
And I open the incremental search speedbar
|
281
|
+
And I type "foo" into the "Find" field in the speedbar
|
282
|
+
Then the selected text should be "Foo"
|
283
|
+
And the selection range should be from 0 to 3
|
284
|
+
When I run the command Redcar::DocumentSearch::DoFindPreviousCommand
|
285
|
+
Then the selected text should be "Foo"
|
286
|
+
And the selection range should be from 8 to 11
|
287
|
+
When I run the command Redcar::DocumentSearch::DoFindPreviousCommand
|
288
|
+
Then the selected text should be "Foo"
|
289
|
+
And the selection range should be from 0 to 3
|
290
|
+
When I run the command Redcar::DocumentSearch::DoFindPreviousCommand
|
291
|
+
Then the selected text should be "Foo"
|
292
|
+
And the selection range should be from 8 to 11
|
293
|
+
|
294
|
+
Scenario: Find previous without wrap around
|
295
|
+
When I replace the contents with "Foo\nBar Foo\nHmm\nBaz"
|
296
|
+
And I move the cursor to 18
|
297
|
+
And I open the incremental search speedbar
|
298
|
+
And I uncheck "Wrap around" in the speedbar
|
299
|
+
And I type "Foo" into the "Find" field in the speedbar
|
300
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
301
|
+
And there should not be any text selected
|
302
|
+
When I run the command Redcar::DocumentSearch::DoFindPreviousCommand
|
303
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
304
|
+
And the selected text should be "Foo"
|
305
|
+
And the selection range should be from 8 to 11
|
306
|
+
When I run the command Redcar::DocumentSearch::DoFindPreviousCommand
|
307
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
308
|
+
And the selected text should be "Foo"
|
309
|
+
And the selection range should be from 0 to 3
|
310
|
+
When I run the command Redcar::DocumentSearch::DoFindPreviousCommand
|
311
|
+
Then the contents should be "Foo\nBar Foo\nHmm\nBaz"
|
312
|
+
And there should not be any text selected
|
313
|
+
|
314
|
+
Scenario: Should scroll vertically to the match
|
315
|
+
When I replace the contents with 100 lines of "xxx" then "Foo"
|
316
|
+
And I scroll to the top of the document
|
317
|
+
And I move the cursor to 0
|
318
|
+
And I open the incremental search speedbar
|
319
|
+
And I type "foo" into the "Find" field in the speedbar
|
320
|
+
Then the selected text should be "Foo"
|
321
|
+
And line number 100 should be visible
|
322
|
+
|
323
|
+
Scenario: "Should scroll horizontally to the match"
|
324
|
+
When I replace the contents with 300 "x" then "Foo"
|
325
|
+
And I move the cursor to 0
|
326
|
+
And I open the incremental search speedbar
|
327
|
+
And I type "foo" into the "Find" field in the speedbar
|
328
|
+
Then the selected text should be "Foo"
|
329
|
+
And horizontal offset 302 should be visible
|
330
|
+
|
331
|
+
Scenario: Should not reopen with the same text as the previous search
|
332
|
+
When I open the incremental search speedbar
|
333
|
+
And I type "foo" into the "Find" field in the speedbar
|
334
|
+
And I close the speedbar
|
335
|
+
And I open the incremental search speedbar
|
336
|
+
Then the "Find" field in the speedbar should have text ""
|
337
|
+
|
338
|
+
Scenario: Should not initialize query with the currently selected text
|
339
|
+
When I replace the contents with "Flux\nBar\nFoo"
|
340
|
+
And I move the cursor to 0
|
341
|
+
And I select from 0 to 4
|
342
|
+
And I open the incremental search speedbar
|
343
|
+
Then the "Find" field in the speedbar should have text ""
|
344
|
+
|
345
|
+
Scenario: Search for a word should start from the start of a selection
|
346
|
+
When I replace the contents with "Foo\nBar\nBaz"
|
347
|
+
And I select from 5 to 8
|
348
|
+
And I open the incremental search speedbar
|
349
|
+
And I type "Ba" into the "Find" field in the speedbar
|
350
|
+
Then the selected text should be "Ba"
|
351
|
+
And the selection should be on line 2
|
@@ -8,13 +8,13 @@ Feature: Replace in file
|
|
8
8
|
Scenario: Open replace speedbar
|
9
9
|
When I replace the contents with "Foo\nBar\nBaz"
|
10
10
|
And I move the cursor to 0
|
11
|
-
And I
|
12
|
-
Then the
|
11
|
+
And I open the find and replace speedbar
|
12
|
+
Then I should see the find and replace speedbar
|
13
13
|
|
14
14
|
Scenario: Replace next occurrence on the same line
|
15
15
|
When I replace the contents with "Foo\nBar Rab Rab\nBaz"
|
16
16
|
And I move the cursor to 4
|
17
|
-
And I
|
17
|
+
And I open the find and replace speedbar
|
18
18
|
And I type "Rab" into the "Find" field in the speedbar
|
19
19
|
And I type "RABBIT" into the "Replace" field in the speedbar
|
20
20
|
And I press "Replace && Find" in the speedbar
|
@@ -25,7 +25,7 @@ Feature: Replace in file
|
|
25
25
|
Scenario: Replace next occurrence on the same line twice
|
26
26
|
When I replace the contents with "Foo\nBar Rab Rab\nBaz"
|
27
27
|
And I move the cursor to 4
|
28
|
-
And I
|
28
|
+
And I open the find and replace speedbar
|
29
29
|
And I type "Rab" into the "Find" field in the speedbar
|
30
30
|
And I type "RAB" into the "Replace" field in the speedbar
|
31
31
|
And I press "Replace && Find" in the speedbar
|
@@ -37,7 +37,7 @@ Feature: Replace in file
|
|
37
37
|
Scenario: Replace next occurrence
|
38
38
|
When I replace the contents with "Foo\nBar\nBaz\nBar\nQux"
|
39
39
|
And I move the cursor to 0
|
40
|
-
And I
|
40
|
+
And I open the find and replace speedbar
|
41
41
|
And I type "Bar" into the "Find" field in the speedbar
|
42
42
|
And I type "Rab" into the "Replace" field in the speedbar
|
43
43
|
And I press "Replace && Find" in the speedbar
|
@@ -48,7 +48,7 @@ Feature: Replace in file
|
|
48
48
|
Scenario: Replace next occurrence twice
|
49
49
|
When I replace the contents with "Foo\nBar\nBaz\nBar\nQux"
|
50
50
|
And I move the cursor to 0
|
51
|
-
And I
|
51
|
+
And I open the find and replace speedbar
|
52
52
|
And I type "Bar" into the "Find" field in the speedbar
|
53
53
|
And I type "Rab" into the "Replace" field in the speedbar
|
54
54
|
And I press "Replace && Find" in the speedbar
|
@@ -60,7 +60,7 @@ Feature: Replace in file
|
|
60
60
|
Scenario: Replace next occurrence wraps
|
61
61
|
When I replace the contents with "Foo\nBar\nBaz"
|
62
62
|
And I move the cursor to 8
|
63
|
-
And I
|
63
|
+
And I open the find and replace speedbar
|
64
64
|
And I type "Bar" into the "Find" field in the speedbar
|
65
65
|
And I type "Rab" into the "Replace" field in the speedbar
|
66
66
|
When I press "Replace && Find" in the speedbar
|
@@ -70,7 +70,7 @@ Feature: Replace in file
|
|
70
70
|
Scenario: Replace all replaces one
|
71
71
|
When I replace the contents with "Foo\nBar\nBaz"
|
72
72
|
And I move the cursor to 0
|
73
|
-
And I
|
73
|
+
And I open the find and replace speedbar
|
74
74
|
And I type "Bar" into the "Find" field in the speedbar
|
75
75
|
And I type "Rab" into the "Replace" field in the speedbar
|
76
76
|
When I press "Replace All" in the speedbar
|
@@ -81,7 +81,7 @@ Feature: Replace in file
|
|
81
81
|
Scenario: Replace all replaces two
|
82
82
|
When I replace the contents with "Foo\nBar\nBaz\nBar\nQux"
|
83
83
|
And I move the cursor to 0
|
84
|
-
And I
|
84
|
+
And I open the find and replace speedbar
|
85
85
|
And I type "Bar" into the "Find" field in the speedbar
|
86
86
|
And I type "Rab" into the "Replace" field in the speedbar
|
87
87
|
When I press "Replace All" in the speedbar
|
@@ -91,7 +91,7 @@ Feature: Replace in file
|
|
91
91
|
|
92
92
|
Scenario: Replace all replaces two on the same line
|
93
93
|
When I replace the contents with "abcabc"
|
94
|
-
And I
|
94
|
+
And I open the find and replace speedbar
|
95
95
|
And I type "bc" into the "Find" field in the speedbar
|
96
96
|
And I type "xx" into the "Replace" field in the speedbar
|
97
97
|
When I press "Replace All" in the speedbar
|
@@ -99,7 +99,7 @@ Feature: Replace in file
|
|
99
99
|
|
100
100
|
Scenario: Replace all replaces overlapping occurences on the same line
|
101
101
|
When I replace the contents with "deedeedeed"
|
102
|
-
And I
|
102
|
+
And I open the find and replace speedbar
|
103
103
|
And I type "deed" into the "Find" field in the speedbar
|
104
104
|
And I type "misdeed" into the "Replace" field in the speedbar
|
105
105
|
When I press "Replace All" in the speedbar
|
@@ -107,7 +107,7 @@ Feature: Replace in file
|
|
107
107
|
|
108
108
|
Scenario: Replace all is a single undo action
|
109
109
|
When I replace the contents with "abcabc"
|
110
|
-
And I
|
110
|
+
And I open the find and replace speedbar
|
111
111
|
And I type "bc" into the "Find" field in the speedbar
|
112
112
|
And I type "xx" into the "Replace" field in the speedbar
|
113
113
|
When I press "Replace All" in the speedbar
|
@@ -118,7 +118,7 @@ Feature: Replace in file
|
|
118
118
|
Scenario: Replace next occurrence test bug
|
119
119
|
When I replace the contents with "the\n* Speedbars have access to the properties of the widgets in them."
|
120
120
|
And I move the cursor to 0
|
121
|
-
And I
|
121
|
+
And I open the find and replace speedbar
|
122
122
|
And I type "the" into the "Find" field in the speedbar
|
123
123
|
And I type "THE" into the "Replace" field in the speedbar
|
124
124
|
And I press "Replace && Find" in the speedbar
|
@@ -138,7 +138,7 @@ Feature: Replace in file
|
|
138
138
|
Scenario: Replace regex with back-references
|
139
139
|
When I replace the contents with "Curry chicken"
|
140
140
|
And I move the cursor to 0
|
141
|
-
And I
|
141
|
+
And I open the find and replace speedbar
|
142
142
|
And I choose "Regex" in the "query_type" field in the speedbar
|
143
143
|
And I type "(\w+) chicken" into the "Find" field in the speedbar
|
144
144
|
And I type "\1 beef" into the "Replace" field in the speedbar
|
@@ -148,7 +148,7 @@ Feature: Replace in file
|
|
148
148
|
Scenario: Replace should move past the current replacement if the query is a substring of the replacement
|
149
149
|
When I replace the contents with "foo\nfoo\nfoo"
|
150
150
|
And I move the cursor to 0
|
151
|
-
And I
|
151
|
+
And I open the find and replace speedbar
|
152
152
|
And I type "foo" into the "Find" field in the speedbar
|
153
153
|
And I type "foobar" into the "Replace" field in the speedbar
|
154
154
|
And I press "Replace && Find" in the speedbar
|
@@ -161,7 +161,7 @@ Feature: Replace in file
|
|
161
161
|
Scenario: The Search-and-Replace Speedbar should get initialized with the currently selected text
|
162
162
|
When I replace the contents with "Foo\nBar\nFoo"
|
163
163
|
And I select from 4 to 7
|
164
|
-
When I
|
164
|
+
When I open the find and replace speedbar
|
165
165
|
Then the "Find" field in the speedbar should have text "Bar"
|
166
166
|
When I type "Foo" into the "Replace" field in the speedbar
|
167
167
|
And I press "Replace && Find" in the speedbar
|