The Trunk: Tools-cmm.808.mcz

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

The Trunk: Tools-cmm.808.mcz

commits-2
Chris Muller uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-cmm.808.mcz

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

Name: Tools-cmm.808
Author: cmm
Time: 28 April 2018, 3:27:07.649576 pm
UUID: 941a22f6-3add-4476-951b-65c2ad89ba4b
Ancestors: Tools-cmm.807

Fix UndefinedObject DNU #isUniClass when opening a MessageSet containing invalid MethodReferences.

=============== Diff against Tools-cmm.807 ===============

Item was changed:
  ----- Method: MessageSet>>initializeMessageList: (in category 'private') -----
  initializeMessageList: anArray
  "Initialize my messageList from the given list of MethodReference or string objects.  NB: special handling for uniclasses.
+ Do /not/ replace the elements of anArray if they are already MethodReferences, so as to allow users to construct richer systems, such as differencers between existing and edited versions of code."
- Do /not/ replace the elements of anArray if they are already MethodReferences, so as to allow users to construct richer
- systems, such as differencers between existing and edited versions of code."
-
  messageList := OrderedCollection new.
  anArray do: [:each |
  each isMethodReference
  ifTrue: [messageList addLast: each]
  ifFalse: [MessageSet parse: each toClassAndSelector: [ :class :sel |
  class ifNotNil: [
  messageList addLast: (
  MethodReference new
  class: class  
  selector: sel)] ]]].
-
  "Unify labels if wanted."
  self class useUnifiedMessageLabels ifTrue: [
  messageList do: [:each | | cls |
  cls := each actualClass.
+ each stringVersion:
+ (cls
+ ifNil: [each asString]
+ ifNotNil:
+ [cls isUniClass
+ ifTrue: [cls typicalInstanceName, ' ', each selector]
+ ifFalse: [cls name , ' ' , each selector , ' {' ,
+ ((cls organization categoryOfElement: each selector) ifNil: ['']) , '}' ,
+ ' {', cls category, '}']])]].
- each stringVersion: (cls isUniClass
- ifTrue: [cls typicalInstanceName, ' ', each selector]
- ifFalse: [cls name , ' ' , each selector , ' {' ,
- ((cls organization categoryOfElement: each selector) ifNil: ['']) , '}' ,
- ' {', cls category, '}'])]].
-
  messageListIndex := messageList isEmpty ifTrue: [0] ifFalse: [1].
  contents := ''!