[Pkg] The Trunk: Tools-eem.407.mcz

commits at source.squeak.org commits at source.squeak.org
Sun May 20 00:27:49 UTC 2012


Eliot Miranda uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-eem.407.mcz

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

Name: Tools-eem.407
Author: eem
Time: 19 May 2012, 5:27:05.352 pm
UUID: cb36645e-dead-4af8-99e9-7ee7efb82a96
Ancestors: Tools-yo.406

Make MessageSet hip to ClassReference entries.

=============== Diff against Tools-yo.406 ===============

Item was changed:
  ----- Method: MessageSet class>>parse:toClassAndSelector: (in category 'utilities') -----
  parse: methodRef toClassAndSelector: csBlock
  	"Decode strings of the form <className> [class] <selectorName>."
  
  	| tuple cl |
  
  
  	self flag: #mref.	"compatibility with pre-MethodReference lists"
  
  	methodRef ifNil: [^ csBlock value: nil value: nil].
+ 	methodRef isString ifFalse:
+ 		[^methodRef setClassAndSelectorIn: csBlock].
+ 	methodRef isEmpty ifTrue:
+ 		[^csBlock value: nil value: nil].
- 	(methodRef isKindOf: MethodReference) ifTrue: [
- 		^methodRef setClassAndSelectorIn: csBlock
- 	].
- 	methodRef isEmpty ifTrue: [^ csBlock value: nil value: nil].
  	tuple := methodRef asString findTokens: ' .'.
  	cl := Smalltalk at: tuple first asSymbol ifAbsent: [^ csBlock value: nil value: nil].
+ 	^(tuple size = 2 or: [tuple size > 2 and: [(tuple at: 2) ~= 'class']])
+ 		ifTrue: [csBlock value: cl value: (tuple at: 2) asSymbol]
+ 		ifFalse: [csBlock value: cl class value: (tuple at: 3) asSymbol]!
- 	(tuple size = 2 or: [tuple size > 2 and: [(tuple at: 2) ~= 'class']])
- 		ifTrue: [^ csBlock value: cl value: (tuple at: 2) asSymbol]
- 		ifFalse: [^ csBlock value: cl class value: (tuple at: 3) asSymbol]!

Item was changed:
+ ----- Method: MessageSet>>aboutToStyle: (in category 'code pane') -----
+ aboutToStyle: aPluggableShoutMorphOrView
+ 	"This is a notification that aPluggableShoutMorphOrView is about to re-style its text.
+ 	Set the classOrMetaClass in aPluggableShoutMorphOrView, so that identifiers
- ----- Method: MessageSet>>aboutToStyle: (in category 'contents') -----
- aboutToStyle: aStyler
- 	"This is a notification that aStyler is about to re-style its text.
- 	Set the classOrMetaClass in aStyler, so that identifiers
  	will be resolved correctly.
  	Answer true to allow styling to proceed, or false to veto the styling"
+ 
+ 	| selectedMessageName showingMethod |
+ 	self showingSource ifFalse: [^false].
+ 	selectedMessageName := self selectedMessageName.
+ 	showingMethod := (#(Comment Definition Hierarchy) includes: selectedMessageName) not.
+ 	"Hack!!  setting classOrMetaClass: to nil allows doit or class definition colouring."
+ 	aPluggableShoutMorphOrView classOrMetaClass: (showingMethod ifTrue: [self selectedClassOrMetaClass]).
+ 	^(#(Comment Hierarchy) includes: selectedMessageName) not!
- 	
- 	self isModeStyleable ifFalse: [^false].
- 	aStyler classOrMetaClass: self selectedClassOrMetaClass.
- 	^true!



More information about the Packages mailing list