class: InspectorView
changed:
#commonLabelFor:
#labelFor:
code simplification
--- a/InspectorView.st Sun Jun 15 14:03:08 2014 +0200
+++ b/InspectorView.st Sun Jun 15 14:03:36 2014 +0200
@@ -223,16 +223,16 @@
|lbl id|
- lbl := ''.
- (anObject isImmediate
- or:[anObject isBoolean]) ifFalse:[
- lbl := '<%2> '
+ (anObject isImmediate or:[anObject isBoolean]) ifTrue:[
+ ^ self labelNameFor:anObject.
].
- lbl := lbl , '%1%3'.
+ lbl := '<%1> %2'.
IdDictionary isNil ifTrue:[
IdDictionary := WeakIdentityDictionary new.
].
+
+ "/ get or assign a new id
[
id := IdDictionary
at:anObject
@@ -247,8 +247,8 @@
^ self classResources
string:lbl
+ with:id
with:(self labelNameFor:anObject)
- with:id
"Created: / 15-07-2011 / 16:21:44 / cg"
!
@@ -3694,16 +3694,17 @@
labelFor:anObject
"return the windowLabel to use in my topView, when inspecting anObject."
- |lbl|
-
- (self class == InspectorView
+ |myClass lbl|
+
+ myClass := self class.
+ (myClass == InspectorView
and:[anObject inspectorClass ~~ InspectorView]) ifTrue:[
lbl := 'BasicInspector on: '
] ifFalse:[
lbl := 'Inspector on: '
].
- ^ (self class classResources string:lbl)
- , (self class commonLabelFor:anObject)
+ ^ (myClass classResources string:lbl)
+ , (myClass commonLabelFor:anObject)
"Modified: / 15-07-2011 / 16:22:05 / cg"
!
@@ -3962,10 +3963,10 @@
!InspectorView class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.333 2014-05-23 08:28:19 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.334 2014-06-15 12:03:36 cg Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.333 2014-05-23 08:28:19 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.334 2014-06-15 12:03:36 cg Exp $'
! !