8 be provided or otherwise made available to, or used by, any |
10 be provided or otherwise made available to, or used by, any |
9 other person. No title to or ownership of the software is |
11 other person. No title to or ownership of the software is |
10 hereby transferred. |
12 hereby transferred. |
11 " |
13 " |
12 "{ Package: 'stx:libtool' }" |
14 "{ Package: 'stx:libtool' }" |
|
15 |
|
16 "{ NameSpace: Smalltalk }" |
13 |
17 |
14 InspectorView subclass:#ContextInspectorView |
18 InspectorView subclass:#ContextInspectorView |
15 instanceVariableNames:'inspectedContext names showingTemporaries argsOnly contextSize |
19 instanceVariableNames:'inspectedContext names showingTemporaries argsOnly contextSize |
16 workspaceVariableNamesInDoIts' |
20 workspaceVariableNamesInDoIts' |
17 classVariableNames:'' |
21 classVariableNames:'' |
552 ! |
556 ! |
553 |
557 |
554 stringWithAllNames:names andValues:values |
558 stringWithAllNames:names andValues:values |
555 "helper for '-all local vars' and '-all workspace vars'" |
559 "helper for '-all local vars' and '-all workspace vars'" |
556 |
560 |
557 |s maxLen varString| |
561 |outStream maxLen varString| |
558 |
562 |
559 s := '' writeStream. |
563 outStream := CharacterWriteStream new. |
560 maxLen := (names collect:[:eachName | eachName size]) max. |
564 maxLen := (names collect:[:eachName | eachName size]) max. |
561 |
565 |
562 names with:values do:[:eachName :eachValue | |
566 names with:values do:[:eachName :eachValue | |
563 s nextPutAll:((eachName , ' ') paddedTo:maxLen+1 with:$.). |
567 outStream nextPutAll:((eachName , ' ') paddedTo:maxLen+1 with:$.). |
564 s nextPutAll:' : '. |
568 outStream nextPutAll:' : '. |
565 |
569 |
566 [ |
570 [ |
567 |s| |
571 |s| |
568 |
572 |
569 s := WriteStream on:(String new:10). |
573 s := CharacterWriteStream new. |
570 s writeLimit:100000. |
574 s writeLimit:100000. |
571 eachValue displayOn:s. |
575 eachValue displayOn:s. |
572 varString := s contents. |
576 varString := s contents. |
573 "/ varString := (self valueAtIndex:varIdx) displayString. |
|
574 ] on:Error do:[:ex | |
577 ] on:Error do:[:ex | |
575 varString := ('*** Error in displayString (%1)***' bindWith:ex description) |
578 varString := ('*** Error in displayString (%1)***' bindWith:ex description) |
576 ]. |
579 ]. |
577 varString := varString ? ''. |
|
578 |
580 |
579 (varString includes:Character cr) ifTrue:[ |
581 (varString includes:Character cr) ifTrue:[ |
580 varString := varString copyTo:(varString indexOf:Character cr)-1. |
582 varString := varString copyTo:(varString indexOf:Character cr)-1. |
581 varString := varString , '...'. |
583 varString := varString , '...'. |
582 ]. |
584 ]. |
583 s nextPutAll:varString. |
585 outStream nextPutAll:varString. |
584 s cr. |
586 outStream cr. |
585 ]. |
587 ]. |
586 ^ s contents |
588 ^ outStream contents |
587 ! |
589 ! |
588 |
590 |
589 stringWithAllWorkspaceValues |
591 stringWithAllWorkspaceValues |
590 "when clicked on '-all workspace vars'" |
592 "when clicked on '-all workspace vars'" |
591 |
593 |