[squeak-dev] The Trunk: Morphic-ul.530.mcz

commits at source.squeak.org commits at source.squeak.org
Tue Apr 26 23:14:28 UTC 2011


Levente Uzonyi uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-ul.530.mcz

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

Name: Morphic-ul.530
Author: ul
Time: 27 April 2011, 1:13:07.939 am
UUID: b0a03730-6c09-3145-a7a8-f8b21779ae62
Ancestors: Morphic-ul.529

TextEditor >> #referencesToIt shows references to all kind of variables and globals.

=============== Diff against Morphic-ul.529 ===============

Item was changed:
  ----- Method: TextEditor>>referencesToIt (in category 'menu messages') -----
  referencesToIt
+ 	"Open a MessageSet with the references to the selected global or variable name."
- 	"Open a references browser on the selected symbol"
  
+ 	| selection environment binding |
+ 	self selectWord.
- 	| symbol environment binding |
- 	self selectLine.
- 	symbol := self selectedSymbol ifNil: [ ^morph flash ].
  	environment := (model respondsTo: #selectedClassOrMetaClass)
  		ifTrue: [ model selectedClassOrMetaClass ifNil: [ Smalltalk globals ] ]
  		ifFalse: [ Smalltalk globals ].
+ 	selection := self selectedSymbol ifNil: [ self selection asString ].
+ 	(environment isBehavior and: [ 
+ 		(environment instVarIndexFor: selection ifAbsent: [ 0 ]) ~= 0 ]) ifTrue: [ 
+ 			^self systemNavigation browseAllAccessesTo: selection from: environment ].
+ 	selection isSymbol ifFalse: [ ^morph flash ].
+ 	binding := (environment bindingOf: selection) ifNil: [ ^morph flash ].
- 	binding := (environment bindingOf: symbol) ifNil: [ ^morph flash ].
  	self systemNavigation browseAllCallsOn: binding!




More information about the Squeak-dev mailing list