Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.805.mcz ==================== Summary ==================== Name: Tools-mt.805 Author: mt Time: 11 April 2018, 9:16:12.591927 am UUID: 8d0a4073-2ee8-6941-bb8c-7926dd445e6e Ancestors: Tools-mt.804 Fixes regression in the labels for senders/implementors browsers. =============== Diff against Tools-mt.804 =============== Item was changed: CodeHolder subclass: #MessageSet instanceVariableNames: 'growable messageList autoSelectString messageListIndex editSelection' + classVariableNames: 'UseUnifiedMessageLabels' - classVariableNames: '' poolDictionaries: '' category: 'Tools-Browser'! !MessageSet commentStamp: '<historical>' prior: 0! I represent a query path of the retrieval result of making a query about methods in the system. The result is a set of methods, denoted by a message selector and the class in which the method was found. As a StringHolder, the string I represent is the source code of the currently selected method. I am typically viewed in a Message Set Browser consisting of a MessageListView and a BrowserCodeView.! Item was added: + ----- Method: MessageSet class>>useUnifiedMessageLabels (in category 'preferences') ----- + useUnifiedMessageLabels + <preference: 'Use unified message labels' + categoryList: #(Tools tools) + description: 'In all message set browsers such as senders and implementors, show a unified, textual representation of all method references (or messages).' + type: #Boolean> + ^ UseUnifiedMessageLabels ifNil: [true]! Item was added: + ----- Method: MessageSet class>>useUnifiedMessageLabels: (in category 'preferences') ----- + useUnifiedMessageLabels: aBoolean + + UseUnifiedMessageLabels := aBoolean.! 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." messageList := OrderedCollection new. + anArray do: [:each | - 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 isUniClass + ifTrue: [cls typicalInstanceName, ' ', each selector] + ifFalse: [cls name , ' ' , each selector , ' {' , + ((cls organization categoryOfElement: each selector) ifNil: ['']) , '}' , + ' {', cls category, '}'])]]. + - ifFalse: - [MessageSet - parse: each - toClassAndSelector: [ :class :sel | | s | - class ifNotNil: - [class isUniClass - ifTrue: - [s := class typicalInstanceName, ' ', sel] - ifFalse: - [s := class name , ' ' , sel , ' {' , - ((class organization categoryOfElement: sel) ifNil: ['']) , '}' , - ' {', class category, '}']. - messageList addLast: ( - MethodReference new - setClass: class - methodSymbol: sel - stringVersion: s)]]]]. messageListIndex := messageList isEmpty ifTrue: [0] ifFalse: [1]. contents := ''! |
Free forum by Nabble | Edit this page |