equal
deleted
inserted
replaced
221 see if two objects are identical (and is very useful, indeed). |
221 see if two objects are identical (and is very useful, indeed). |
222 WARNING: used by both Inspector and Inspector2 !!!!!!" |
222 WARNING: used by both Inspector and Inspector2 !!!!!!" |
223 |
223 |
224 |lbl id| |
224 |lbl id| |
225 |
225 |
226 lbl := ''. |
226 (anObject isImmediate or:[anObject isBoolean]) ifTrue:[ |
227 (anObject isImmediate |
227 ^ self labelNameFor:anObject. |
228 or:[anObject isBoolean]) ifFalse:[ |
228 ]. |
229 lbl := '<%2> ' |
229 lbl := '<%1> %2'. |
230 ]. |
|
231 lbl := lbl , '%1%3'. |
|
232 |
230 |
233 IdDictionary isNil ifTrue:[ |
231 IdDictionary isNil ifTrue:[ |
234 IdDictionary := WeakIdentityDictionary new. |
232 IdDictionary := WeakIdentityDictionary new. |
235 ]. |
233 ]. |
|
234 |
|
235 "/ get or assign a new id |
236 [ |
236 [ |
237 id := IdDictionary |
237 id := IdDictionary |
238 at:anObject |
238 at:anObject |
239 ifAbsentPut:[ |
239 ifAbsentPut:[ |
240 |nextID| |
240 |nextID| |
245 ]. |
245 ]. |
246 ] valueUninterruptably. |
246 ] valueUninterruptably. |
247 |
247 |
248 ^ self classResources |
248 ^ self classResources |
249 string:lbl |
249 string:lbl |
|
250 with:id |
250 with:(self labelNameFor:anObject) |
251 with:(self labelNameFor:anObject) |
251 with:id |
|
252 |
252 |
253 "Created: / 15-07-2011 / 16:21:44 / cg" |
253 "Created: / 15-07-2011 / 16:21:44 / cg" |
254 ! |
254 ! |
255 |
255 |
256 labelNameFor:anObject |
256 labelNameFor:anObject |
3692 ! |
3692 ! |
3693 |
3693 |
3694 labelFor:anObject |
3694 labelFor:anObject |
3695 "return the windowLabel to use in my topView, when inspecting anObject." |
3695 "return the windowLabel to use in my topView, when inspecting anObject." |
3696 |
3696 |
3697 |lbl| |
3697 |myClass lbl| |
3698 |
3698 |
3699 (self class == InspectorView |
3699 myClass := self class. |
|
3700 (myClass == InspectorView |
3700 and:[anObject inspectorClass ~~ InspectorView]) ifTrue:[ |
3701 and:[anObject inspectorClass ~~ InspectorView]) ifTrue:[ |
3701 lbl := 'BasicInspector on: ' |
3702 lbl := 'BasicInspector on: ' |
3702 ] ifFalse:[ |
3703 ] ifFalse:[ |
3703 lbl := 'Inspector on: ' |
3704 lbl := 'Inspector on: ' |
3704 ]. |
3705 ]. |
3705 ^ (self class classResources string:lbl) |
3706 ^ (myClass classResources string:lbl) |
3706 , (self class commonLabelFor:anObject) |
3707 , (myClass commonLabelFor:anObject) |
3707 |
3708 |
3708 "Modified: / 15-07-2011 / 16:22:05 / cg" |
3709 "Modified: / 15-07-2011 / 16:22:05 / cg" |
3709 ! |
3710 ! |
3710 |
3711 |
3711 labelNameFor:anObject |
3712 labelNameFor:anObject |
3960 ! ! |
3961 ! ! |
3961 |
3962 |
3962 !InspectorView class methodsFor:'documentation'! |
3963 !InspectorView class methodsFor:'documentation'! |
3963 |
3964 |
3964 version |
3965 version |
3965 ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.333 2014-05-23 08:28:19 stefan Exp $' |
3966 ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.334 2014-06-15 12:03:36 cg Exp $' |
3966 ! |
3967 ! |
3967 |
3968 |
3968 version_CVS |
3969 version_CVS |
3969 ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.333 2014-05-23 08:28:19 stefan Exp $' |
3970 ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.334 2014-06-15 12:03:36 cg Exp $' |
3970 ! ! |
3971 ! ! |
3971 |
3972 |