322 <resource: #programMenu > |
322 <resource: #programMenu > |
323 |
323 |
324 |items m| |
324 |items m| |
325 |
325 |
326 self sensor ctrlDown ifTrue:[ |
326 self sensor ctrlDown ifTrue:[ |
|
327 "/ notice - the only difference is the shortKey assignment below |
|
328 "/ findNext/prev will search for the same thing again. |
327 lastSearchType == #selector ifTrue:[ |
329 lastSearchType == #selector ifTrue:[ |
328 items := #( |
330 items := #( |
329 ('search class' findClass #Find ) |
331 ('search class' findClass #Find ) |
330 ('next for this class' findNextForClass ) |
332 ('next for this class' findNextForClass ) |
331 ('previous for this class' findPreviousForClass ) |
333 ('previous for this class' findPreviousForClass ) |
332 ('-' ) |
334 ('-' ) |
333 ('search selector' findSelector ) |
335 ('search selector' findSelector ) |
334 ('next with this selector' findNextForSelector #FindNext ) |
336 ('next with this selector' findNextForSelector #FindNext ) |
335 ('previous with this selector' findPreviousForSelector #FindPrev ) |
337 ('previous with this selector' findPreviousForSelector #FindPrev ) |
|
338 ('-' ) |
|
339 ('search string' findString ) |
336 ('-' ) |
340 ('-' ) |
337 ('next snapshot' findNextSnapshot ) |
341 ('next snapshot' findNextSnapshot ) |
338 ('previous snapshot' findPreviousSnapshot ) |
342 ('previous snapshot' findPreviousSnapshot ) |
339 ). |
343 ). |
340 ] ifFalse:[ |
344 ] ifFalse:[ |
344 ('previous for this class' findPreviousForClass #FindPrev ) |
348 ('previous for this class' findPreviousForClass #FindPrev ) |
345 ('-' ) |
349 ('-' ) |
346 ('search selector' findSelector ) |
350 ('search selector' findSelector ) |
347 ('next with this selector' findNextForSelector ) |
351 ('next with this selector' findNextForSelector ) |
348 ('previous with this selector' findPreviousForSelector ) |
352 ('previous with this selector' findPreviousForSelector ) |
|
353 ('-' ) |
|
354 ('search string' findString ) |
349 ('-' ) |
355 ('-' ) |
350 ('next snapshot' findNextSnapshot ) |
356 ('next snapshot' findNextSnapshot ) |
351 ('previous snapshot' findPreviousSnapshot ) |
357 ('previous snapshot' findPreviousSnapshot ) |
352 ). |
358 ). |
353 ]. |
359 ]. |
3294 "Modified: / 18.4.1997 / 12:47:52 / stefan" |
3300 "Modified: / 18.4.1997 / 12:47:52 / stefan" |
3295 "Created: / 18.6.1998 / 22:17:04 / cg" |
3301 "Created: / 18.6.1998 / 22:17:04 / cg" |
3296 "Modified: / 29.4.1999 / 22:42:14 / cg" |
3302 "Modified: / 29.4.1999 / 22:42:14 / cg" |
3297 ! |
3303 ! |
3298 |
3304 |
|
3305 findString |
|
3306 |sel searchString search| |
|
3307 |
|
3308 lastSearchType := #string. |
|
3309 |
|
3310 searchString := codeView selection. |
|
3311 searchString := Dialog |
|
3312 request:'string to search for:' |
|
3313 initialAnswer:searchString |
|
3314 onCancel:nil. |
|
3315 searchString isNil ifTrue:[ |
|
3316 ^ self |
|
3317 ]. |
|
3318 |
|
3319 changeNrShown isNil ifTrue:[ |
|
3320 search := 1. |
|
3321 ] ifFalse:[ |
|
3322 search := changeNrShown + 1 |
|
3323 ]. |
|
3324 |
|
3325 self withCursor:Cursor questionMark do:[ |
|
3326 |lastNr cls nr s | |
|
3327 |
|
3328 lastNr := self numberOfChanges. |
|
3329 nr := search. |
|
3330 [nr <= lastNr] whileTrue:[ |
|
3331 s := self sourceOfMethodChange:nr. |
|
3332 s notNil ifTrue:[ |
|
3333 ((searchString includesMatchCharacters not |
|
3334 and:[(s findString:searchString) ~~ 0]) |
|
3335 or:[ searchString includesMatchCharacters |
|
3336 and:[s match:('*' , searchString , '*')]]) ifTrue:[ |
|
3337 changeListView setSelection:nr. |
|
3338 self changeSelection:nr. |
|
3339 codeView setSearchPattern:searchString. |
|
3340 codeView |
|
3341 searchFwd:searchString |
|
3342 ignoreCase:false |
|
3343 startingAtLine:1 col:0 |
|
3344 ifAbsent:nil. |
|
3345 ^ self |
|
3346 ]. |
|
3347 ]. |
|
3348 nr := nr + 1. |
|
3349 ]. |
|
3350 ]. |
|
3351 self showNotFound. |
|
3352 |
|
3353 ! |
|
3354 |
3299 noChangesAllowed |
3355 noChangesAllowed |
3300 "show a warning that changes cannot be changed" |
3356 "show a warning that changes cannot be changed" |
3301 |
3357 |
3302 self warn:'changes are not allowed to be changed' |
3358 self warn:'changes are not allowed to be changed' |
3303 ! |
3359 ! |