'From Squeak6.0alpha of 25 April 2021 [latest update: #20458] on 25 April 2021 at 10:34:10 pm'!

!Browser methodsFor: 'message functions' stamp: 'ct 4/25/2021 21:10'!
browseMethodFull

	| previous systemWindow |
	systemWindow := Smalltalk classNamed: #SystemWindow.
	systemWindow ifNil: [^ super browseMethodFull].
	
	previous := systemWindow reuseWindows.
	systemWindow reuseWindows: false.
	^ [super browseMethodFull]
		ensure: [systemWindow reuseWindows: previous]! !

!Browser methodsFor: 'morphic ui' stamp: 'ct 4/25/2021 21:07'!
representsSameBrowseeAs: anotherBrowser

	^ self hasUnacceptedEdits not
		and: [self selectedClass == anotherBrowser selectedClass]
		and: [self selectedMessage = anotherBrowser selectedMessage]! !


!HierarchyBrowser methodsFor: 'testing' stamp: 'ct 4/25/2021 22:28'!
isHierarchyBrowser

	^ true! !

!HierarchyBrowser methodsFor: 'controls' stamp: 'ct 4/25/2021 22:28'!
optionalButtonPairs

	self isHierarchyBrowser ifFalse: [^ super optionalButtonPairs].
	
	^ super optionalButtonPairs reject: [:pair |
		pair second = #browseClassHierarchy]! !


!ClassListBrowser methodsFor: 'testing' stamp: 'ct 4/25/2021 22:28'!
isHierarchyBrowser

	^ false! !


!SearchBar methodsFor: 'searching' stamp: 'ct 4/25/2021 21:10'!
smartSearch: text in: morph
	"Take the user input and perform an appropriate search"
	| input newContents |
	self removeResultsWidget.
	input := text asString ifEmpty:[^self].
	self class useSmartSearch ifFalse: [^ ToolSet default browseMessageNames: input].

	(Symbol lookup: input) ifNotNil:
		[:symbol| input := symbol].
	"If it is a global or a full class name, browse that class."
	(Smalltalk bindingOf: input) ifNotNil:
		[:assoc| | class |
		class := (assoc value isBehavior ifTrue:[assoc value] ifFalse:[assoc value class]) theNonMetaClass.
		^ToolSet browseClass: class].
	
	"If it is a symbol and there are implementors of it, browse those implementors."
	input isSymbol ifTrue:
		[(SystemNavigation new allImplementorsOf: input) ifNotEmpty:
			[:list|
			^SystemNavigation new
				browseMessageList: list
				name: 'Implementors of ' , input]].

	"If it starts uppercase, browse classes if any. Otherwise, just search for messages."
	input first isUppercase ifTrue:
		[(UIManager default classFromPattern: input withCaption: '') ifNotNil:
			[:aClass| ^ToolSet browse: aClass selector: nil].
		newContents := input, ' -- not found.'.
		self searchTerm: newContents.
		self selection: (input size+1 to: newContents size).
		self currentHand newKeyboardFocus: morph textMorph.
		^ self].

	"Default to browse message names..."
	ToolSet default browseMessageNames: input! !


!ClassListBrowser reorganize!
('initialization' defaultBrowserTitle initAlphabeticListing initForClassesNamed:)
('title' defaultTitle: labelString)
('toolbuilder' setupIfNotInitialisedYet)
('testing' isHierarchyBrowser)
!


!HierarchyBrowser reorganize!
('class list' classList)
('initialization' classListIndex: defaultBrowserTitle initHierarchyForClass: selectClassNamed: selectedClassName setClass: systemCategorySingleton updateAfterClassChange)
('menu messages' buildClassBrowserEditString: removeSystemCategory systemCatSingletonKey:from: systemCatSingletonMenu:)
('toolbuilder' buildAndOpenBrowserLabel: buildDefaultBrowserWith: setupIfNotInitialisedYet)
('multi-window support' isHierarchy)
('class functions' copyClass defineClass:notifying: renameClass)
('traits' defineTrait:notifying:)
('morphic ui' postAcceptBrowseFor: representsSameBrowseeAs:)
('private' spawnOrNavigateTo:)
('testing' isHierarchyBrowser)
('controls' optionalButtonPairs)
!


!Browser reorganize!
('accessing' contents contentsSelection contents:notifying: couldBrowseAnyClass doItReceiver editSelection editSelection: environment newClassContents noteSelectionIndex:for: request:initialAnswer: selectEnvironment: spawn: suggestCategoryToSpawnedBrowser:)
('annotation' annotation annotation:)
('class comment pane' annotationForClassCommentFor: annotationForClassDefinitionFor: noCommentNagString stripNaggingAttributeFromComment:)
('class functions' addAllMethodsToCurrentChangeSet classCommentText classDefinitionText classListMenu: classListMenu:shifted: classListMenuMore: copyClass createInstVarAccessors defineClass:notifying: editClass editComment explainSpecial: fileOutClass findMethod hierarchy makeNewSubclass plusButtonHit printOutClass removeClass renameClass shiftedClassListMenu: shiftedClassListMenuMore:)
('class list' classIconAt: classList classListIndex classListIndex: classListIndexOf: classListSingleton createHierarchyTreeOf: defaultClassList flattenHierarchyTree:on:indent: flattenHierarchyTree:on:indent:by: flattenHierarchyTree:on:indent:by:format: hasClassSelected hierarchicalClassList recent selectClass: selectClassNamed: selectedClass selectedClassName)
('code pane' aboutToStyle: compileMessage:notifying: showBytecodes)
('copying' veryDeepInner:)
('drag and drop' dragFromClassList: dragFromMessageList: dragTypeForMessageListAt: dropOnMessageCategories:at: dropOnSystemCategories:at: wantsMessageCategoriesDrop: wantsSystemCategoriesDrop:)
('initialize-release' classListFrame: classListFrame:fromLeft:width: classListFrame:fromTop:fromLeft:width: defaultBrowserTitle frameOffsetFromTop:fromLeft:width:bottomFraction: labelString methodCategoryChanged setClass: setClass:selector: setSelector: switchesFrame: switchesFrame:fromLeft:width: systemCatSingletonKey:from: systemOrganizer: topConstantHeightFrame:fromLeft:width:)
('message category functions' addCategory alphabetizeMessageCategories buildMessageCategoryBrowser buildMessageCategoryBrowserEditString: canShowMultipleMessageCategories categoryOfCurrentMethod changeMessageCategories: editMessageCategories fileOutMessageCategories highlightMessageList:with: mainMessageCategoryMenu: messageCategoryMenu: printOutMessageCategories removeEmptyCategories removeMessageCategory renameCategory showHomeCategory)
('message category list' categorizeAllUncategorizedMethods hasMessageCategorySelected messageCatListSingleton messageCategoryList messageCategoryListIndex messageCategoryListIndex: messageCategoryListKey:from: messageCategoryListSelection rawMessageCategoryList recategorizeMethodSelector: selectMessageCategoryNamed: selectedMessageCategoryName setOriginalCategoryIndexForCurrentMethod toggleCategorySelectionForCurrentMethod)
('message functions' browseAllCommentsForClass browseMethodFull defineMessageFrom:notifying: inspectInstances inspectSubInstances mainMessageListMenu: removeMessage removeMessageFromBrowser)
('message list' addExtraShiftedItemsTo: hasMessageSelected lastMessageName messageHelpAt: messageIconAt: messageIconFor: messageIconHelpFor: messageList messageListIndex messageListIndex: messageListIndexOf: messageListMenu:shifted: reformulateList selectMessageNamed: selectedMessage selectedMessageName selectedMessageName: shiftedMessageListMenu:)
('metaclass' classCommentIndicated classDefinitionIndicated classMessagesIndicated classOrMetaClassOrganizer indicateClassMessages indicateInstanceMessages instanceMessagesIndicated metaClassIndicated metaClassIndicated: selectedClassOrMetaClass selectedClassOrMetaClassName setClassDefinition setClassOrganizer)
('system category functions' addSystemCategory alphabetizeSystemCategories browseAllClasses buildSystemCategoryBrowser buildSystemCategoryBrowserEditString: changeSystemCategories: classNotFound editSystemCategories fileOutSystemCategory findClass mainSystemCategoryMenu: printOutSystemCategory removeSystemCategory renameSystemCategory systemCatSingletonMenu: systemCategoryMenu: updateSystemCategories)
('system category list' hasSystemCategorySelected indexIsOne indexIsOne: selectCategoryForClass: selectSystemCategory: selectedEnvironment selectedSystemCategory selectedSystemCategoryName systemCatListKey:from: systemCategoryList systemCategoryListIndex systemCategoryListIndex: systemCategorySingleton)
('toolbuilder' buildAndOpenCategoryBrowser buildAndOpenCategoryBrowserLabel: buildAndOpenClassBrowserLabel: buildAndOpenFullBrowser buildAndOpenMessageCategoryBrowserLabel: buildCategoryBrowserWith: buildClassListSingletonWith: buildClassListWith: buildDefaultBrowserWith: buildMessageCategoryListWith: buildMessageListCatSingletonWith: buildMessageListWith: buildSwitchesWith: buildSystemCatListSingletonWith: buildSystemCategoryListWith: buildWith: setMultiWindowFor:)
('traits' addSpecialMenu: addTrait defineTrait:notifying: newClass newTrait)
('user interface' addModelItemsToWindowMenu: defaultWindowColor)
('*services-base' browseReference: classCategoryMenuServices: classListMenuServices: messageCategoryMenuServices: methodReference optionalButtonRow selectReference:)
('multi-window support' arrowKey:from: browseClassHierarchy isHierarchy isPackage multiWindowName multiWindowNameForState: okToClose restoreMultiWindowState: restoreToCategory:className:protocol:selector:mode:meta: saveMultiWindowState)
('pluggable menus - hooks' classListMenuHook:shifted: messageCategoryMenuHook:shifted: messageListMenuHook:shifted: systemCategoryMenuHook:shifted:)
('*SUnitTools-class list functions' testRunTests)
('*SUnitTools-system category functions' hasSystemCategoryWithTestsSelected testRunTestsCategory)
('*SUnitTools-menus' testsClassListMenu: testsSystemCategoryMenu:)
('self-updating' didCodeChangeElsewhere)
('controls' decorateButtons)
('*Etoys-Squeakland-initialize-release' browserWindowActivated)
('*Etoys-Squeakland-class functions' buildClassBrowser)
('*Etoys-Squeakland-message functions' buildMessageBrowser)
('*Etoys-Squeakland-drag and drop' overwriteDialogHierarchyChange:higher:sourceClassName:destinationClassName:methodSelector:)
('private' spawnOrNavigateTo:)
('*60Deprecated-multi-window support' classHierarchy)
('*Morphic-Menus-DockingBar-accessing' displayClass: isDisplayingClass: multiWindowIndexForClassName:)
('*Tools')
('morphic ui' representsSameBrowseeAs:)
!

