6179
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2004 by eXept Software AG
|
|
3 |
All Rights Reserved
|
|
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 |
"
|
|
12 |
|
5592
|
13 |
"{ Package: 'stx:libtool' }"
|
5591
|
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 |
|
6179
|
26 |
copyright
|
|
27 |
"
|
|
28 |
COPYRIGHT (c) 2004 by eXept Software AG
|
|
29 |
All Rights Reserved
|
|
30 |
|
|
31 |
This software is furnished under a license and may be used
|
|
32 |
only in accordance with the terms of that license and with the
|
|
33 |
inclusion of the above copyright notice. This software may not
|
|
34 |
be provided or otherwise made available to, or used by, any
|
|
35 |
other person. No title to or ownership of the software is
|
|
36 |
hereby transferred.
|
|
37 |
"
|
|
38 |
!
|
|
39 |
|
5591
|
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 |
|
|
120 |
version
|
6179
|
121 |
^ '$Header: /cvs/stx/stx/libtool/Tools_ImplementingClassList.st,v 1.3 2005-02-02 11:02:27 cg Exp $'
|
5591
|
122 |
! !
|