The Trunk: Morphic-eem.1344.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-eem.1344.mcz

commits-2
Eliot Miranda uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-eem.1344.mcz

==================== Summary ====================

Name: Morphic-eem.1344
Author: eem
Time: 30 June 2017, 11:43:57.311016 am
UUID: 67654d61-5234-4c97-9379-1aa00811c8f6
Ancestors: Morphic-mt.1343

Make browseIt (Apple/Alt-b) work for class and pool variables.

=============== Diff against Morphic-mt.1343 ===============

Item was changed:
  ----- Method: TextEditor>>browseIt (in category 'menu messages') -----
  browseIt
  "Launch a browser for the current selection, if appropriate"
 
  | aSymbol anEntry brow maybeBrowseInstVar |
 
  Preferences alternativeBrowseIt ifTrue: [^ self browseClassFromIt].
 
  self lineSelectAndEmptyCheck: [^ self].
 
  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.
- [ self systemNavigation browseAllImplementorsOf: aSymbol.
  ^ nil]).
  anEntry ifNil: [^ morph flash].
  (anEntry isBehavior and: [anEntry name == aSymbol]) ifFalse: "When is this ever false?"
  [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]!