InspectorView.st
changeset 11565 7ad4468defb7
parent 11551 5d6cd56f9dcf
child 11576 e5361052ab2f
equal deleted inserted replaced
11564:67a8e0885c2c 11565:7ad4468defb7
  2592 
  2592 
  2593 pseudoFieldNames
  2593 pseudoFieldNames
  2594     "return a list of names to show in the selectionList.
  2594     "return a list of names to show in the selectionList.
  2595      Leave hasMore as true, if a '...' entry should be added."
  2595      Leave hasMore as true, if a '...' entry should be added."
  2596 
  2596 
       
  2597     ^ self pseudoFieldNamesWithIndexed: object class isVariable
       
  2598 
       
  2599     "Modified: / 06-06-2012 / 11:56:56 / cg"
       
  2600 !
       
  2601 
       
  2602 pseudoFieldNamesWithIndexed:withIndexed
       
  2603     "return a list of names to show in the selectionList.
       
  2604      Leave hasMore as true, if a '...' entry should be added."
       
  2605 
  2597     |list cls|
  2606     |list cls|
  2598 
  2607 
  2599     cls := object class.
  2608     cls := object class.
  2600 
  2609 
  2601     list := OrderedCollection new.
  2610     list := OrderedCollection new.
  2604     "/ list add:'-' , 'inherited messages' allItalic.
  2613     "/ list add:'-' , 'inherited messages' allItalic.
  2605     list add:'-' , 'all messages' allItalic.
  2614     list add:'-' , 'all messages' allItalic.
  2606     list add:'-' , 'hash' allItalic.
  2615     list add:'-' , 'hash' allItalic.
  2607     list add:'-' , 'identityHash' allItalic.
  2616     list add:'-' , 'identityHash' allItalic.
  2608 
  2617 
       
  2618     withIndexed ifTrue:[
       
  2619         list add:'-' , 'basicSize' allItalic.
       
  2620     ].
       
  2621     object isCollection ifTrue:[
       
  2622         (cls whichClassImplements:#size) == (cls whichClassImplements:#basicSize) ifFalse:[
       
  2623             list add:'-' , 'size' allItalic.
       
  2624         ]
       
  2625     ].
       
  2626 
  2609     cls hasImmediateInstances ifFalse:[
  2627     cls hasImmediateInstances ifFalse:[
  2610         object dependents notEmptyOrNil ifTrue:[
  2628         object dependents notEmptyOrNil ifTrue:[
  2611             list add:'-' , 'dependents' allItalic.
  2629             list add:'-' , 'dependents' allItalic.
  2612         ].
  2630         ].
  2613     ].
  2631     ].
  2614     cls instSize > 0 ifTrue:[
  2632     cls instSize > 0 ifTrue:[
  2615         list add:'-' , 'all inst vars' allItalic.
  2633         list add:'-' , 'all inst vars' allItalic.
  2616     ].
  2634     ].
  2617     ((cls isVariable) and:[self showAllIndexedVarsInFieldList]) ifTrue:[
       
  2618         list add:'-' , 'all indexed vars' allItalic.
       
  2619     ].
       
  2620     ^ list
       
  2621 !
       
  2622 
       
  2623 pseudoFieldNamesWithIndexed:withIndexed
       
  2624     "return a list of names to show in the selectionList.
       
  2625      Leave hasMore as true, if a '...' entry should be added."
       
  2626 
       
  2627     |list cls|
       
  2628 
       
  2629     cls := object class.
       
  2630 
       
  2631     list := OrderedCollection new.
       
  2632     list add:'-' , 'self' allItalic.
       
  2633     list add:'-' , 'local messages' allItalic.
       
  2634     "/ list add:'-' , 'inherited messages' allItalic.
       
  2635     list add:'-' , 'all messages' allItalic.
       
  2636     list add:'-' , 'hash' allItalic.
       
  2637     list add:'-' , 'identityHash' allItalic.
       
  2638 
       
  2639     cls hasImmediateInstances ifFalse:[
       
  2640         object dependents notEmptyOrNil ifTrue:[
       
  2641             list add:'-' , 'dependents' allItalic.
       
  2642         ].
       
  2643     ].
       
  2644     cls instSize > 0 ifTrue:[
       
  2645         list add:'-' , 'all inst vars' allItalic.
       
  2646     ].
       
  2647     (withIndexed and:[self showAllIndexedVarsInFieldList]) ifTrue:[
  2635     (withIndexed and:[self showAllIndexedVarsInFieldList]) ifTrue:[
  2648         list add:'-' , 'all indexed vars' allItalic.
  2636         list add:'-' , 'all indexed vars' allItalic.
  2649     ].
  2637     ].
  2650     ^ list
  2638     ^ list
       
  2639 
       
  2640     "Modified: / 06-06-2012 / 11:59:10 / cg"
  2651 !
  2641 !
  2652 
  2642 
  2653 setAcceptAction
  2643 setAcceptAction
  2654     "set the codeViews accept action"
  2644     "set the codeViews accept action"
  2655 
  2645 
  2670             acceptAction := nil.
  2660             acceptAction := nil.
  2671         ].
  2661         ].
  2672         (sel startsWith:'-hash') ifTrue:[
  2662         (sel startsWith:'-hash') ifTrue:[
  2673             acceptAction := nil.
  2663             acceptAction := nil.
  2674         ].
  2664         ].
       
  2665         (sel startsWith:'-basicSize') ifTrue:[
       
  2666             acceptAction := nil.
       
  2667         ].
       
  2668         (sel startsWith:'-size') ifTrue:[
       
  2669             acceptAction := nil.
       
  2670         ].
  2675         (sel startsWith:'-identityHash') ifTrue:[
  2671         (sel startsWith:'-identityHash') ifTrue:[
  2676             acceptAction := nil.
  2672             acceptAction := nil.
  2677         ].
  2673         ].
  2678         (sel startsWith:'-dependents') ifTrue:[
  2674         (sel startsWith:'-dependents') ifTrue:[
  2679             acceptAction := nil.
  2675             acceptAction := nil.
  2683         ].
  2679         ].
  2684     ].
  2680     ].
  2685 
  2681 
  2686     workspace acceptAction:acceptAction.
  2682     workspace acceptAction:acceptAction.
  2687 
  2683 
  2688     "Modified: / 16-05-2012 / 17:54:16 / cg"
  2684     "Modified: / 06-06-2012 / 11:57:27 / cg"
  2689 !
  2685 !
  2690 
  2686 
  2691 setDoItAction
  2687 setDoItAction
  2692     "set the codeViews doit action"
  2688     "set the codeViews doit action"
  2693 
  2689 
  2848     ].
  2844     ].
  2849 
  2845 
  2850     (line startsWith:'-self') ifTrue:[
  2846     (line startsWith:'-self') ifTrue:[
  2851         ^ object
  2847         ^ object
  2852     ].
  2848     ].
       
  2849     (line startsWith:'-basicSize') ifTrue:[
       
  2850         ^ object basicSize
       
  2851     ].
  2853     (line startsWith:'-size') ifTrue:[
  2852     (line startsWith:'-size') ifTrue:[
  2854         ^ object size
  2853         ^ object size
  2855     ].
  2854     ].
  2856     (line startsWith:'-hash') ifTrue:[
  2855     (line startsWith:'-hash') ifTrue:[
  2857         ^ object hash
  2856         ^ object hash
  2876     ].
  2875     ].
  2877 
  2876 
  2878     self error:'unknown special line'.
  2877     self error:'unknown special line'.
  2879 
  2878 
  2880     "Created: / 31-10-2001 / 09:17:45 / cg"
  2879     "Created: / 31-10-2001 / 09:17:45 / cg"
  2881     "Modified: / 13-03-2012 / 08:25:52 / cg"
  2880     "Modified: / 06-06-2012 / 11:57:54 / cg"
  2882 ! !
  2881 ! !
  2883 
  2882 
  2884 !InspectorView methodsFor:'queries'!
  2883 !InspectorView methodsFor:'queries'!
  2885 
  2884 
  2886 canInspect:anObject
  2885 canInspect:anObject
  3192 ! !
  3191 ! !
  3193 
  3192 
  3194 !InspectorView class methodsFor:'documentation'!
  3193 !InspectorView class methodsFor:'documentation'!
  3195 
  3194 
  3196 version
  3195 version
  3197     ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.257 2012-06-04 16:17:33 cg Exp $'
  3196     ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.258 2012-06-06 10:02:32 cg Exp $'
  3198 !
  3197 !
  3199 
  3198 
  3200 version_CVS
  3199 version_CVS
  3201     ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.257 2012-06-04 16:17:33 cg Exp $'
  3200     ^ '$Header: /cvs/stx/stx/libtool/InspectorView.st,v 1.258 2012-06-06 10:02:32 cg Exp $'
  3202 ! !
  3201 ! !