'From Squeak3.3alpha of 18 January 2002 [latest update: #4934] on 31 July 2002 at 2:20:41 pm'! "Change Set: classNamesContaining-sw Date: 31 July 2002 Author: Scott Wallace Published to 3.3a as 4950classNamesContaining-sw.cs. Adds 'class names containing it' to the more... (shifted) branch of the text-editor menus; when chosen, this new command puts up a class-list browser displaying all classes whose names contain the current text selection. Use shift-key to make the search case-sensitive."! !ParagraphEditor methodsFor: 'menu messages' stamp: 'sw 7/31/2002 01:54'! classNamesContainingIt "Open a browser on classes whose names contain the selected string" self lineSelectAndEmptyCheck: [^ self]. Smalltalk browseClassesWithNamesContaining: self selection string caseSensitive: Sensor leftShiftDown! ! !ParagraphEditor class methodsFor: 'class initialization' stamp: 'sw 7/31/2002 01:35'! shiftedYellowButtonMenu "Answer the menu to be presented when the yellow button is pressed while the shift key is down" ^ SelectionMenu fromArray: #( ('set font... (k)' offerFontMenu) ('set style... (K)' changeStyle) ('set alignment...' chooseAlignment) - ('explain' explain) ('pretty print' prettyPrint) ('pretty print with color' prettyPrintWithColor) ('file it in (G)' fileItIn) ('tiles from it' selectionAsTiles) ('recognizer (r)' recognizeCharacters) ('spawn (o)' spawn) - ('definition of word' wordDefinition) ('verify spelling of word' verifyWordSpelling) " ('spell check it' spellCheckIt) " ('translate it' translateIt) ('choose language' languagePrefs) - ('browse it (b)' browseIt) ('senders of it (n)' sendersOfIt) ('implementors of it (m)' implementorsOfIt) ('references to it (N)' referencesToIt) - ('selectors containing it (W)' methodNamesContainingIt) ('method strings with it (E)' methodStringsContainingit) ('method source with it' methodSourceContainingIt) ('class names containing it' classNamesContainingIt) ('class comments with it' classCommentsContainingIt) ('change sets with it' browseChangeSetsWithSelector) - ('save contents to file...' saveContentsInFile) ('send contents to printer' sendContentsToPrinter) ('printer setup' printerSetup) - ('special menu...' presentSpecialMenu) ('more...' yellowButtonActivity))! ! !PluggableTextMorph methodsFor: 'menu commands' stamp: 'sw 7/31/2002 01:48'! classNamesContainingIt self handleEdit: [textMorph editor classNamesContainingIt]! ! !SystemDictionary methodsFor: 'browsing' stamp: 'sw 7/31/2002 01:46'! browseClassesWithNamesContaining: aString caseSensitive: caseSensitive "Smalltalk browseClassesWithNamesContaining: 'eMorph' caseSensitive: true " "Launch a class-list list browser on all classes whose names containg aString as a substring." | suffix aList | suffix _ caseSensitive ifTrue: [' (case-sensitive)'] ifFalse: [' (use shift for case-sensitive)']. aList _ OrderedCollection new. Cursor wait showWhile: [Smalltalk allClassesDo: [:class | (class name includesSubstring: aString caseSensitive: caseSensitive) ifTrue: [aList add: class name]]]. aList size > 0 ifTrue: [ClassListBrowser new initForClassesNamed: aList asSet asSortedArray title: 'Classes whose names contain ' , aString , suffix]! !