--- a/NewInspectorListView.st Wed Oct 14 08:13:10 2009 +0200
+++ b/NewInspectorListView.st Wed Oct 14 13:43:27 2009 +0200
@@ -1,6 +1,6 @@
"
COPYRIGHT (c) 1997 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -12,7 +12,7 @@
-"{ NameSpace: NewInspector }"
+"{ NameSpace: Tools }"
SelectionInListView subclass:#NewInspectorListView
instanceVariableNames:'actionHolder inspectorList includesSelf'
@@ -26,7 +26,7 @@
copyright
"
COPYRIGHT (c) 1997 by eXept Software AG
- All Rights Reserved
+ All Rights Reserved
This software is furnished under a license and may be used
only in accordance with the terms of that license and with the
@@ -41,24 +41,24 @@
examples
"
- open a list view on an instance
- [exBegin]
- |top slv a|
+ open a list view on an instance
+ [exBegin]
+ |top slv a|
- a := OrderedCollection new.
- a add:1.
+ a := OrderedCollection new.
+ a add:1.
- top := StandardSystemView new
- label:'select';
- extent:200@200.
+ top := StandardSystemView new
+ label:'select';
+ extent:200@200.
- slv := ScrollableView for:self in:top.
- slv origin:0.0@0.0 corner:1.0@1.0.
- slv := slv scrolledView.
- slv inspect:top.
- slv action:[:el|Transcript showCR:(el printString)].
- top open
- [exEnd]
+ slv := ScrollableView for:self in:top.
+ slv origin:0.0@0.0 corner:1.0@1.0.
+ slv := slv scrolledView.
+ slv inspect:top.
+ slv action:[:el|Transcript showCR:(el printString)].
+ top open
+ [exEnd]
"
! !
@@ -76,7 +76,7 @@
"set the lists contents from another list
"
aList notNil ifTrue:[inspectorList := aList list]
- ifFalse:[inspectorList := NewInspectorList new].
+ ifFalse:[inspectorList := NewInspectorList new].
inspectorList includesSelf:includesSelf.
super list:(inspectorList instanceNames).
@@ -104,10 +104,10 @@
drawVisibleLineSelected:visLineNr with:fg and:bg
"redraw a single line as selected.
"
- |nr|
+ |nr|
(nr := self visibleLineToListLine:visLineNr) notNil ifTrue:[
- ^ self drawVisibleLine:visLineNr with:fg and:bg.
+ ^ self drawVisibleLine:visLineNr with:fg and:bg.
].
^ super drawVisibleLine:visLineNr with:fg and:bg
@@ -121,7 +121,7 @@
nr := self visibleLineToListLine:visLineNr.
(inspectorList instanceTypeAt:nr) == #directory ifTrue:[
- self drawRightArrowInVisibleLine:visLineNr
+ self drawRightArrowInVisibleLine:visLineNr
]
@@ -133,7 +133,7 @@
super redrawFromVisibleLine:startVisLineNr to:endVisLineNr.
startVisLineNr to:endVisLineNr do:[:visLineNr|
- self redrawArrowVisibleLine:visLineNr
+ self redrawArrowVisibleLine:visLineNr
]
!
@@ -152,7 +152,7 @@
nr := self visibleLineToListLine:visLineNr.
(inspectorList instanceTypeAt:nr) == #directory ifTrue:[
- ^ true
+ ^ true
].
^ super visibleLineNeedsSpecialCare:visLineNr
@@ -190,8 +190,8 @@
inspectorList := NewInspectorList new.
actionBlock := [:dummy|
- self setSelection:selection.
- actionHolder value:(self selectedInstanceVar)
+ self setSelection:selection.
+ actionHolder value:(self selectedInstanceVar)
].
! !
@@ -201,7 +201,7 @@
"forward a message to the inspectorList
"
(inspectorList respondsTo:(aMessage selector)) ifTrue:[
- ^ aMessage sendTo:inspectorList
+ ^ aMessage sendTo:inspectorList
].
^ super doesNotUnderstand:aMessage
@@ -216,12 +216,12 @@
we have to remove the highlight frame by hand here"
(shown and:[hilightLevel ~~ 0]) ifTrue:[
- selection == firstLineShown ifTrue:[
- self paint:bgColor.
- self fillRectangleX:margin y:margin
- width:(width - (margin * 2))
- height:(hilightLevel abs).
- ].
+ selection == firstLineShown ifTrue:[
+ self paint:bgColor.
+ self fillRectangleX:margin y:margin
+ width:(width - (margin * 2))
+ height:(hilightLevel abs).
+ ].
].
listAttributes := nil.
super list:aCollection expandTabs:false.
@@ -242,7 +242,7 @@
oldSize := inspectorList size.
inspectorList setSelection:aNumberOrNil.
oldSize == inspectorList size ifTrue:[super setSelection:(inspectorList selection)]
- ifFalse:[super list:(inspectorList instanceNames)].
+ ifFalse:[super list:(inspectorList instanceNames)].
! !
!NewInspectorListView methodsFor:'user interaction'!
@@ -257,7 +257,7 @@
res := inspectorList accept:aText notifying:aView.
res ~~ #Error ifTrue:[
- super list:(inspectorList instanceNames)
+ super list:(inspectorList instanceNames)
].
^ res
!
@@ -272,7 +272,7 @@
res := inspectorList doIt:aCode notifying:aView.
res ~~ #Error ifTrue:[
- super list:(inspectorList instanceNames)
+ super list:(inspectorList instanceNames)
].
^ res
@@ -282,7 +282,7 @@
"inspect a new instance; update contents
"
(inspectorList inspectedObject) == anObject ifTrue:[
- ^ self update
+ ^ self update
].
inspectorList := NewInspectorList for:anObject.
inspectorList includesSelf:includesSelf.