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