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 |
"
|
5592
|
12 |
"{ Package: 'stx:libtool' }"
|
5591
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
|
16 |
MethodCategoryList subclass:#FullMethodCategoryList
|
|
17 |
instanceVariableNames:''
|
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Interface-Browsers-New'
|
|
21 |
!
|
|
22 |
|
|
23 |
!FullMethodCategoryList class methodsFor:'documentation'!
|
|
24 |
|
6179
|
25 |
copyright
|
|
26 |
"
|
|
27 |
COPYRIGHT (c) 2004 by eXept Software AG
|
|
28 |
All Rights Reserved
|
|
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 |
!
|
|
38 |
|
5591
|
39 |
documentation
|
|
40 |
"
|
|
41 |
embeddable application displaying the classes as listed by
|
|
42 |
the inputGenerator.
|
|
43 |
Provides an outputGenerator, which enumerates the classes and
|
|
44 |
their protocols (method-categories) in the selected classes.
|
|
45 |
|
|
46 |
[author:]
|
|
47 |
Claus Gittinger (cg@exept.de)
|
|
48 |
"
|
|
49 |
|
|
50 |
|
|
51 |
! !
|
|
52 |
|
|
53 |
!FullMethodCategoryList methodsFor:'generators'!
|
|
54 |
|
|
55 |
makeGenerator
|
|
56 |
"return a generator which enumerates the methods from the selected protocol;
|
|
57 |
that generator generates 4-element elements (includes the class and protocol),
|
|
58 |
in order to make the consumers only depend on one input
|
|
59 |
(i.e. to pass multiple-class and multiple-protocol info
|
|
60 |
without a need for another classHolder/protocolHolder in the methodList)."
|
|
61 |
|
|
62 |
^ Iterator on:[:whatToDo |
|
8758
|
63 |
|protocols all packages theProtocol|
|
5591
|
64 |
|
8758
|
65 |
protocols := self selectedProtocols value ? #().
|
5591
|
66 |
|
8758
|
67 |
all := protocols includes:(self class nameListEntryForALL).
|
|
68 |
packages := packageFilter value value.
|
5591
|
69 |
|
8758
|
70 |
protocols size > 0 ifTrue:[
|
|
71 |
protocols size == 1 ifTrue:[
|
|
72 |
theProtocol := protocols first.
|
|
73 |
Smalltalk allClassesDo:[:eachClass |
|
|
74 |
eachClass instAndClassSelectorsAndMethodsDo:[:sel :eachMethod |
|
|
75 |
|cat|
|
5591
|
76 |
|
8758
|
77 |
cat := eachMethod category.
|
|
78 |
(all
|
|
79 |
or:[theProtocol = cat]) ifTrue:[
|
|
80 |
(packages isNil
|
|
81 |
or:[packages includes:eachMethod package])
|
|
82 |
ifTrue:[
|
|
83 |
whatToDo value:eachClass value:cat value:sel value:eachMethod.
|
|
84 |
].
|
|
85 |
].
|
|
86 |
].
|
|
87 |
]
|
|
88 |
] ifFalse:[
|
|
89 |
Smalltalk allClassesDo:[:eachClass |
|
|
90 |
eachClass instAndClassSelectorsAndMethodsDo:[:sel :eachMethod |
|
|
91 |
|cat|
|
5591
|
92 |
|
8758
|
93 |
cat := eachMethod category.
|
|
94 |
(all
|
|
95 |
or:[protocols includes:cat]) ifTrue:[
|
|
96 |
(packages isNil
|
|
97 |
or:[packages includes:eachMethod package])
|
|
98 |
ifTrue:[
|
|
99 |
whatToDo value:eachClass value:cat value:sel value:eachMethod.
|
|
100 |
].
|
|
101 |
].
|
|
102 |
].
|
|
103 |
]
|
|
104 |
]
|
|
105 |
]
|
|
106 |
]
|
5591
|
107 |
! !
|
|
108 |
|
|
109 |
!FullMethodCategoryList methodsFor:'private'!
|
|
110 |
|
|
111 |
listOfMethodCategories
|
|
112 |
|categories|
|
|
113 |
|
|
114 |
categories := Set new.
|
|
115 |
|
6669
|
116 |
categories addAll:MethodCategoryCache new allMethodCategories.
|
|
117 |
|
5591
|
118 |
categories := categories asOrderedCollection sort.
|
|
119 |
categories addFirst:(self class nameListEntryForALL).
|
|
120 |
^ categories
|
|
121 |
! !
|
|
122 |
|
|
123 |
!FullMethodCategoryList class methodsFor:'documentation'!
|
|
124 |
|
|
125 |
version
|
8758
|
126 |
^ '$Header: /cvs/stx/stx/libtool/Tools_FullMethodCategoryList.st,v 1.5 2009-09-22 11:25:53 cg Exp $'
|
5591
|
127 |
! !
|