diff -r 2a03321215c0 -r 9439c754727b InspectorView.st --- a/InspectorView.st Tue May 28 16:00:41 2019 +0200 +++ b/InspectorView.st Tue May 28 16:26:31 2019 +0200 @@ -3129,10 +3129,38 @@ "Modified: / 31-01-2018 / 09:18:17 / stefan" ! +displayStringForPseudoSlot:slotNameString + "return the displayString for one of the '-xxx' slots or nil." + + (slotNameString startsWith:$-) ifTrue:[ + (slotNameString startsWith:'-all inst vars') ifTrue:[ + ^ self stringWithAllInstVarValues + ]. + (slotNameString startsWith:'-all class vars') ifTrue:[ + ^ self stringWithAllClassVarValues + ]. + (slotNameString startsWith:'-all indexed vars') ifTrue:[ + ^ self stringWithAllIndexedVarValues + ]. + (slotNameString startsWith:'-all messages') ifTrue:[ + ^ self stringWithMessages:#all + ]. + (slotNameString startsWith:'-local messages') ifTrue:[ + ^ self stringWithMessages:#local + ]. + (slotNameString startsWith:'-inherited messages') ifTrue:[ + ^ self stringWithMessages:#inherited + ]. + ]. + ^ nil + + "Created: / 28-05-2019 / 16:06:45 / Claus Gittinger" +! + displayStringForValue:someValue "return the value's displayString to be pasted into the workspace." - |idx sel extraAttributes| + |idx sel extraAttributes valueString| someValue == NoLongerPresentDummyObject ifTrue:[ "/ this is returned by collection-inspectors, @@ -3152,23 +3180,8 @@ ]. (sel startsWith:$-) ifTrue:[ - (sel startsWith:'-all inst vars') ifTrue:[ - ^ self stringWithAllInstVarValues - ]. - (sel startsWith:'-all class vars') ifTrue:[ - ^ self stringWithAllClassVarValues - ]. - (sel startsWith:'-all indexed vars') ifTrue:[ - ^ self stringWithAllIndexedVarValues - ]. - (sel startsWith:'-all messages') ifTrue:[ - ^ self stringWithMessages:#all - ]. - (sel startsWith:'-local messages') ifTrue:[ - ^ self stringWithMessages:#local - ]. - (sel startsWith:'-inherited messages') ifTrue:[ - ^ self stringWithMessages:#inherited + (valueString := self displayStringForPseudoSlot:sel) notNil ifTrue:[ + ^ valueString ]. ]. ]. @@ -3176,6 +3189,7 @@ ^ self basicDisplayStringForValue:someValue "Modified: / 22-02-2017 / 17:35:52 / cg" + "Modified: / 28-05-2019 / 16:07:35 / Claus Gittinger" ! iconForValue:arg @@ -3907,21 +3921,21 @@ list := OrderedCollection new. self hasSelfEntry ifTrue:[ nameOfSelf := object isJavaObject ifTrue:['this'] ifFalse:['self']. - list add:'-' , nameOfSelf allItalic. + list add:('-',nameOfSelf allItalic). ]. - list add:'-' , 'class' allItalic. + list add:('-','class' allItalic). hideMessages ifFalse:[ - list add:'-' , 'local messages' allItalic. - "/ list add:'-' , 'inherited messages' allItalic. - list add:'-' , 'all messages' allItalic. + list add:('-','local messages' allItalic). + "/ list add:('-','inherited messages' allItalic). + list add:('-','all messages' allItalic). ]. hideHashes ifFalse:[ - list add:'-' , 'hash' allItalic. - list add:'-' , 'identityHash' allItalic. + list add:('-','hash' allItalic). + list add:('-','identityHash' allItalic). ]. withIndexed ifTrue:[ - list add:'-' , 'basicSize' allItalic, (self valueStringInListEntryForValue:object basicSize). + list add:('-','basicSize' allItalic),(self valueStringInListEntryForValue:object basicSize). ]. object isProtoObject ifFalse:[ @@ -3930,33 +3944,34 @@ Error handle:[:ex | ] do:[ "/ Iterator has trouble - list add:'-' , 'size' allItalic , (self valueStringInListEntryForValue:object size). + list add:('-','size' allItalic),(self valueStringInListEntryForValue:object size). ]. ] ]. cls hasImmediateInstances ifFalse:[ object dependents notEmptyOrNil ifTrue:[ - list add:'-' , 'dependents' allItalic, (self valueStringInListEntryForValue:object dependents size). + list add:('-','dependents' allItalic),(self valueStringInListEntryForValue:object dependents size). ]. ]. object isClass ifTrue:[ - list add:'-' , 'all class vars' allItalic. + list add:('-','all class vars' allItalic). ]. ]. cls instSize ~~ 0 ifTrue:[ - list add:'-' , 'all inst vars' allItalic. + list add:('-','all inst vars' allItalic). ]. (withIndexed and:[self showAllIndexedVarsInFieldList]) ifTrue:[ - list add:'-' , 'all indexed vars' allItalic. + list add:('-','all indexed vars' allItalic). ]. ^ list "Modified: / 13-06-2012 / 12:10:16 / cg" "Modified: / 05-11-2013 / 17:57:00 / Jan Vrany " "Modified: / 24-01-2019 / 12:47:56 / Claus Gittinger" + "Modified (comment): / 28-05-2019 / 16:11:16 / Claus Gittinger" ! setAcceptAction