author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Sun, 29 Jan 2012 15:33:37 +0000 | |
branch | jv |
changeset 12125 | 0c49a3b13e43 |
parent 12123 | 4bde08cebd48 |
child 12128 | a7ff7d66ee85 |
permissions | -rw-r--r-- |
10003 | 1 |
" |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
2 |
COPYRIGHT (c) 2004 by eXept Software AG |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
3 |
All Rights Reserved |
10040 | 4 |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
5 |
This software is furnished under a license and may be used |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
6 |
only in accordance with the terms of that license and with the |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
7 |
inclusion of the above copyright notice. This software may not |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
8 |
be provided or otherwise made available to, or used by, any |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
9 |
other person. No title to or ownership of the software is |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
10 |
hereby transferred. |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
11 |
" |
10040 | 12 |
|
10003 | 13 |
"{ Package: 'stx:libtool' }" |
14 |
||
15 |
"{ NameSpace: Tools }" |
|
16 |
||
17 |
MethodList subclass:#ImplementingClassList |
|
18 |
instanceVariableNames:'' |
|
19 |
classVariableNames:'' |
|
20 |
poolDictionaries:'' |
|
21 |
category:'Interface-Browsers-New' |
|
22 |
! |
|
23 |
||
24 |
!ImplementingClassList class methodsFor:'documentation'! |
|
25 |
||
26 |
copyright |
|
27 |
" |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
28 |
COPYRIGHT (c) 2004 by eXept Software AG |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
29 |
All Rights Reserved |
10003 | 30 |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
31 |
This software is furnished under a license and may be used |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
32 |
only in accordance with the terms of that license and with the |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
33 |
inclusion of the above copyright notice. This software may not |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
34 |
be provided or otherwise made available to, or used by, any |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
35 |
other person. No title to or ownership of the software is |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
36 |
hereby transferred. |
10003 | 37 |
" |
38 |
! |
|
39 |
||
40 |
documentation |
|
41 |
" |
|
42 |
Like a ClassList, but shows classes hierarchical. |
|
43 |
||
44 |
If topClassHolders value is non-nil, only that classes hierarchy |
|
45 |
is shown. |
|
46 |
||
47 |
embeddable application displaying the classes as listed by |
|
48 |
the inputGenerator. |
|
49 |
Provides an outputGenerator, which enumerates the classes and |
|
50 |
their protocols (method-categories) in the selected classes. |
|
51 |
||
52 |
[author:] |
|
53 |
Claus Gittinger (cg@exept.de) |
|
54 |
" |
|
55 |
||
56 |
||
57 |
! ! |
|
58 |
||
59 |
!ImplementingClassList methodsFor:'private'! |
|
60 |
||
61 |
listOfMethodNames |
|
62 |
|methods entries newNameList |
|
63 |
allCategories classUses allSelectors generator |
|
64 |
"theMethod"| |
|
65 |
||
66 |
generator := inGeneratorHolder value. |
|
67 |
generator isNil ifTrue:[^ #() ]. |
|
68 |
||
69 |
classUses := Bag identityNew. |
|
70 |
allSelectors := IdentitySet new. |
|
71 |
allCategories := Set new. |
|
72 |
entries := OrderedCollection new. |
|
73 |
||
74 |
"/ generator generates nil-selector entries |
|
75 |
"/ to pass multiple-class and multiple-protocol info |
|
76 |
generator do:[:cls :cat :sel :mthd | |
|
77 |
sel notNil ifTrue:[ |
|
78 |
entries add:(Array with:cls with:sel with:mthd). |
|
79 |
classUses add:cls. |
|
80 |
allSelectors add:sel. |
|
81 |
allCategories add:mthd category. |
|
82 |
] |
|
83 |
]. |
|
84 |
||
85 |
entries sort:[:a :b | |clsNmA clsNmB| |
|
86 |
clsNmA := (a at:1) name. |
|
87 |
clsNmB := (b at:1) name. |
|
88 |
clsNmA < clsNmB |
|
89 |
]. |
|
90 |
||
91 |
newNameList := entries collect:[:entry | |
|
92 |
|class nm| |
|
93 |
||
94 |
class := (entry at:1). |
|
95 |
nm := class name. |
|
96 |
((allSelectors size > 1) |
|
97 |
or:[(classUses occurrencesOf:class) > 1]) ifTrue:[ |
|
98 |
nm := nm , ' ' , (entry at:2) |
|
99 |
]. |
|
100 |
allCategories size > 1 ifTrue:[ |
|
101 |
nm := nm , ' {' , (entry at:3) category , '}' |
|
102 |
]. |
|
103 |
"/ class name , ' ' , (entry at:2) |
|
104 |
nm |
|
105 |
]. |
|
106 |
methods := entries collect:[:entry | (entry at:3)]. |
|
107 |
methodList := methods. |
|
108 |
"/ methods size == 1 ifTrue:[ |
|
109 |
"/ theMethod := methods first. |
|
110 |
"/ self methodLabelHolder value:(theMethod mclass name , ' ' , theMethod selector). |
|
111 |
"/ ]. |
|
112 |
^ newNameList. |
|
113 |
||
114 |
"Created: / 5.2.2000 / 22:43:40 / cg" |
|
115 |
"Modified: / 1.3.2000 / 21:00:26 / cg" |
|
116 |
! ! |
|
117 |
||
118 |
!ImplementingClassList class methodsFor:'documentation'! |
|
119 |
||
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10040
diff
changeset
|
120 |
version |
12125 | 121 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ImplementingClassList.st,v 1.3 2005/02/02 11:02:27 cg Exp $' |
122 |
! ! |