[squeak-dev] The Trunk: Morphic-eem.1344.mcz

commits at source.squeak.org commits at source.squeak.org
Fri Jun 30 18:44:25 UTC 2017

Eliot Miranda uploaded a new version of Morphic to project The Trunk:

==================== 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') -----
  	"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 allInstVarNames includes: selectionString) ifTrue:
  				[self systemNavigation
  					browseAllAccessesTo: selectionString
  					from: (class classThatDefinesInstanceVariable: selectionString).
  	(aSymbol := self selectedSymbol) ifNil:
  		[maybeBrowseInstVar value.
  		 ^morph flash].
  	aSymbol first isUppercase
  			[anEntry := (model environment
  				valueOf: aSymbol
+ 					[ ([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']
  			[self systemNavigation browseAllImplementorsOf: aSymbol.
  			 maybeBrowseInstVar value]!

More information about the Squeak-dev mailing list