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