Marcel Taeumel uploaded a new version of Tools to project The Trunk:
http://source.squeak.org/trunk/Tools-mt.797.mcz ==================== Summary ==================== Name: Tools-mt.797 Author: mt Time: 6 February 2018, 10:19:41.408461 am UUID: b081756b-13a0-4184-9731-17dae1b415db Ancestors: Tools-eem.796 Make use of existing #inspectorClass in tool set. Deprecate unused ExternalStructureInspector. =============== Diff against Tools-eem.796 =============== Item was removed: - Inspector subclass: #ExternalStructureInspector - instanceVariableNames: '' - classVariableNames: '' - poolDictionaries: '' - category: 'Tools-Inspector'! Item was removed: - ----- Method: ExternalStructureInspector>>fieldList (in category 'accessing') ----- - fieldList - ^ (Array with: 'self: ', object defaultLabelForInspector with: 'all inst vars'), self recordFieldList! Item was removed: - ----- Method: ExternalStructureInspector>>recordFieldList (in category 'accessing') ----- - recordFieldList - | fields | - fields := object class fields. - (fields first isKindOf: Array) ifFalse: [fields := Array with: fields]. - ^fields collect: [ :field | field first ] thenSelect: [:name | name notNil]! Item was removed: - ----- Method: ExternalStructureInspector>>replaceSelectionValue: (in category 'selecting') ----- - replaceSelectionValue: anObject - "Add colon to fieldname to get setter selector, and send it to object with the argument. - Refer to the comment in Inspector|replaceSelectionValue:." - - selectionIndex = 1 - ifTrue: [^object] - ifFalse: [^object perform: ((self fieldList at: selectionIndex), ':') asSymbol with: anObject]! Item was removed: - ----- Method: ExternalStructureInspector>>selection (in category 'selecting') ----- - selection - "Refer to the comment in Inspector|selection." - selectionIndex = 0 ifTrue:[^object printString]. - selectionIndex = 1 ifTrue: [^object]. - selectionIndex = 2 ifTrue:[^object longPrintString]. - selectionIndex > 2 - ifTrue: [^object perform: (self fieldList at: selectionIndex)]! Item was changed: ----- Method: StandardToolSet class>>inspect: (in category 'inspecting') ----- inspect: anObject "Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides." + ^ anObject inspectorClass openOn: anObject! - ^(self inspectorClassOf: anObject) openOn: anObject! Item was changed: ----- Method: StandardToolSet class>>inspect:label: (in category 'inspecting') ----- inspect: anObject label: aString "Open an inspector on the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides." + ^ anObject inspectorClass openOn: anObject withEvalPane: true withLabel: aString! - ^(self inspectorClassOf: anObject) openOn: anObject withEvalPane: true withLabel: aString! Item was removed: - ----- Method: StandardToolSet class>>inspectorClassOf: (in category 'inspecting') ----- - inspectorClassOf: anObject - "Answer the inspector class for the given object. The tool set must know which inspector type to use for which object - the object cannot possibly know what kind of inspectors the toolset provides." - | map | - map := Dictionary new. - #( - (CompiledCode CompiledMethodInspector) - (CompositeEvent OrderedCollectionInspector) - (Dictionary DictionaryInspector) - (ExternalStructure ExternalStructureInspector) - (FloatArray OrderedCollectionInspector) - (OrderedCollection OrderedCollectionInspector) - (Set SetInspector) - (WeakSet WeakSetInspector) - ) do:[:spec| - map at: spec first put: spec last. - ]. - anObject class withAllSuperclassesDo:[:cls| - map at: cls name ifPresent:[:inspectorName| ^Smalltalk classNamed: inspectorName]. - ]. - ^Inspector! |
Free forum by Nabble | Edit this page |