[Pkg] The Trunk: Morphic-eem.1340.mcz
commits at source.squeak.org
commits at source.squeak.org
Thu Jun 1 20:22:14 UTC 2017
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1340.mcz
==================== Summary ====================
Name: Morphic-eem.1340
Author: eem
Time: 1 June 2017, 1:21:49.04056 pm
UUID: 6117ed97-d114-454b-a38c-b35edc306c14
Ancestors: Morphic-eem.1339
Fix browseIt so that accesses to a selected inst var are browsed, not just senders of the accessor. Needs alternateBrowseIt preference disabled.
=============== Diff against Morphic-eem.1339 ===============
Item was changed:
----- Method: TextEditor>>browseIt (in category 'menu messages') -----
browseIt
"Launch a browser for the current selection, if appropriate"
+ | aSymbol anEntry brow maybeBrowseInstVar |
- | aSymbol anEntry brow |
Preferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].
self lineSelectAndEmptyCheck: [^ self].
- (aSymbol := self selectedSymbol) isNil ifTrue: [^ morph flash].
+ 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:
[ self systemNavigation browseAllImplementorsOf: aSymbol.
^ nil]).
anEntry ifNil: [^ morph flash].
+ (anEntry isBehavior and: [anEntry name == aSymbol]) ifFalse: "When is this ever false?"
+ [anEntry := anEntry class].
- (anEntry isKindOf: Class)
- ifFalse: [anEntry := anEntry class].
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]!
- [self systemNavigation browseAllImplementorsOf: aSymbol]!
More information about the Packages
mailing list