author | Claus Gittinger <cg@exept.de> |
Wed, 11 May 2016 10:47:51 +0200 | |
changeset 16548 | b8f9c3d05c67 |
parent 15533 | 705cf3d2d10a |
child 16572 | ab23beb4bba6 |
child 16654 | 769d7d0f32b4 |
permissions | -rw-r--r-- |
30 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
3 |
All Rights Reserved |
30 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
2997
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
12 |
"{ Package: 'stx:libtool' }" |
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
13 |
|
15533 | 14 |
"{ NameSpace: Smalltalk }" |
15 |
||
30 | 16 |
InspectorView subclass:#ClassInspectorView |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
17 |
instanceVariableNames:'' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
18 |
classVariableNames:'' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
19 |
poolDictionaries:'' |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
20 |
category:'Interface-Inspector' |
30 | 21 |
! |
22 |
||
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
23 |
!ClassInspectorView class methodsFor:'documentation'! |
30 | 24 |
|
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
28 |
All Rights Reserved |
30 | 29 |
|
30 |
This software is furnished under a license and may be used |
|
31 |
only in accordance with the terms of that license and with the |
|
32 |
inclusion of the above copyright notice. This software may not |
|
33 |
be provided or otherwise made available to, or used by, any |
|
34 |
other person. No title to or ownership of the software is |
|
35 |
hereby transferred. |
|
36 |
" |
|
37 |
||
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
38 |
|
2997
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
39 |
! |
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
40 |
|
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
41 |
documentation |
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
42 |
" |
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
43 |
modified Inspector for Classes; in addition to instance variables, |
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
44 |
also shows ClassVariables in its left SelectionList. |
3200 | 45 |
|
46 |
Array inspect |
|
47 |
View inspect |
|
2997
928594257211
Move documentation method to class protocol.
Stefan Vogel <sv@exept.de>
parents:
2271
diff
changeset
|
48 |
" |
30 | 49 |
! ! |
50 |
||
51 |
!ClassInspectorView methodsFor:'accessing'! |
|
52 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
53 |
fieldList |
30 | 54 |
"return a list of names to show in the selectionList" |
55 |
||
56 |
|aList| |
|
57 |
||
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
58 |
aList := super fieldList. |
30 | 59 |
|
60 |
"/ |
|
16548 | 61 |
"/ add class variables (always sorted) |
30 | 62 |
"/ |
15533 | 63 |
inspectedObject theNonMetaclass withAllSuperclasses reverseDo:[:aClass | |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
64 |
|varNames| |
30 | 65 |
|
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
66 |
varNames := aClass classVarNames. |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
67 |
varNames notEmpty ifTrue:[ |
16548 | 68 |
varNames sort. |
12933 | 69 |
aList add:('--- classvariables from ' , aClass name allBold, ' ---'). |
2271
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
70 |
varNames do:[:classVarName | |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
71 |
aList add:classVarName |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
72 |
] |
0cf238543cb1
fixed and improved fieldNameList generation & use.
Claus Gittinger <cg@exept.de>
parents:
2236
diff
changeset
|
73 |
] |
30 | 74 |
]. |
75 |
^ aList |
|
12447 | 76 |
! |
77 |
||
78 |
valueAtLine:lineNr |
|
79 |
"return a list of names to show in the selectionList" |
|
80 |
||
81 |
|list idx0| |
|
82 |
||
83 |
list := super fieldList. |
|
84 |
lineNr <= list size ifTrue:[ ^ super valueAtLine:lineNr ]. |
|
85 |
||
86 |
"/ |
|
87 |
"/ a class variable |
|
88 |
"/ |
|
89 |
idx0 := list size + 1. |
|
15533 | 90 |
inspectedObject class withAllSuperclasses reverseDo:[:aClass | |
12447 | 91 |
|varNames varName| |
92 |
||
93 |
varNames := aClass classVarNames. |
|
94 |
varNames notEmpty ifTrue:[ |
|
95 |
(lineNr between:idx0+1 and:(idx0 + 1 + varNames size - 1)) ifTrue:[ |
|
96 |
varName := varNames at:lineNr-idx0. |
|
97 |
^ aClass classVarAt:varName. |
|
98 |
]. |
|
99 |
idx0 := idx0 + varNames size + 1. |
|
100 |
] |
|
101 |
]. |
|
102 |
^ nil |
|
30 | 103 |
! ! |
104 |
||
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
105 |
!ClassInspectorView class methodsFor:'documentation'! |
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
106 |
|
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
107 |
version |
16548 | 108 |
^ '$Header$' |
2236
257f587ad7dc
migrate instvars 'inspectedObject' to 'object'
Claus Gittinger <cg@exept.de>
parents:
165
diff
changeset
|
109 |
! ! |
12447 | 110 |