tim Rowledge uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-tpr.1353.mcz==================== Summary ====================
Name: Morphic-tpr.1353
Author: tpr
Time: 21 October 2017, 6:07:05.387865 pm
UUID: aee97523-13a7-4829-8da8-95cd50fd8d15
Ancestors: Morphic-dtl.1352
Small cleanup for #browseIt
=============== Diff against Morphic-dtl.1352 ===============
Item was changed:
----- Method: TextEditor>>browseIt (in category 'menu messages') -----
browseIt
"Launch a browser for the current selection, if appropriate"
+ | aSymbol anEntry maybeBrowseInstVar |
- | aSymbol anEntry brow maybeBrowseInstVar |
Preferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].
self lineSelectAndEmptyCheck: [^ self].
+ maybeBrowseInstVar := [ | selectionString |
- maybeBrowseInstVar :=
- [| selectionString |
selectionString := self selection asString.
([model selectedClass] on: Error do: [:ex|]) ifNotNil:
[:class|
(class allInstVarNames includes: selectionString) ifTrue:
[self systemNavigation
browseAllAccessesTo: selectionString
from: (class classThatDefinesInstanceVariable: selectionString).
^nil]]].
(aSymbol := self selectedSymbol) ifNil:
[maybeBrowseInstVar value.
^morph flash].
aSymbol first isUppercase
ifTrue:
[anEntry := (model environment
valueOf: aSymbol
ifAbsent:
[ ([model selectedClass] on: Error do: [:ex|]) ifNotNil:
[:class|
(class bindingOf: aSymbol) ifNotNil: "e.g. a class var"
[:binding|
self systemNavigation browseAllCallsOn: binding.
^ nil]].
self systemNavigation browseAllImplementorsOf: aSymbol.
^ nil]).
anEntry ifNil: [^ morph flash].
(anEntry isBehavior and: [anEntry name == aSymbol]) ifFalse: "When is this ever false?"
[anEntry := anEntry class].
+ self systemNavigation browseClass: anEntry]
- brow := SystemBrowser default new.
- brow setClass: anEntry selector: nil.
- brow class
- openBrowserView: (brow openEditString: nil)
- label: 'System Browser']
ifFalse:
[self systemNavigation browseAllImplementorsOf: aSymbol.
maybeBrowseInstVar value]!