author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Fri, 30 Nov 2012 17:23:39 +0000 | |
branch | jv |
changeset 12308 | 5d9291c0fc27 |
parent 12296 | 6921627a8c27 |
child 12314 | 0cbf76168690 |
permissions | -rw-r--r-- |
10006 | 1 |
" |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10038
diff
changeset
|
2 |
COPYRIGHT (c) 2004 by eXept Software AG |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10038
diff
changeset
|
3 |
All Rights Reserved |
10006 | 4 |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10038
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:
10038
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:
10038
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:
10038
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:
10038
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:
10038
diff
changeset
|
10 |
hereby transferred. |
10006 | 11 |
" |
12 |
"{ Package: 'stx:libtool' }" |
|
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 |
||
25 |
copyright |
|
26 |
" |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10038
diff
changeset
|
27 |
COPYRIGHT (c) 2004 by eXept Software AG |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10038
diff
changeset
|
28 |
All Rights Reserved |
10006 | 29 |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10038
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:
10038
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:
10038
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:
10038
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:
10038
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:
10038
diff
changeset
|
35 |
hereby transferred. |
10006 | 36 |
" |
37 |
! |
|
38 |
||
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 | |
|
63 |
|protocols all packages theProtocol| |
|
64 |
||
65 |
protocols := self selectedProtocols value ? #(). |
|
66 |
||
67 |
all := protocols includes:(self class nameListEntryForALL). |
|
68 |
packages := packageFilter value value. |
|
69 |
||
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| |
|
76 |
||
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| |
|
92 |
||
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 |
] |
|
107 |
! ! |
|
108 |
||
109 |
!FullMethodCategoryList methodsFor:'private'! |
|
110 |
||
111 |
listOfMethodCategories |
|
112 |
|categories| |
|
113 |
||
114 |
categories := Set new. |
|
115 |
||
116 |
categories addAll:MethodCategoryCache new allMethodCategories. |
|
117 |
||
118 |
categories := categories asOrderedCollection sort. |
|
119 |
categories addFirst:(self class nameListEntryForALL). |
|
120 |
^ categories |
|
121 |
! ! |
|
122 |
||
123 |
!FullMethodCategoryList class methodsFor:'documentation'! |
|
124 |
||
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10038
diff
changeset
|
125 |
version |
12308 | 126 |
^ '$Id: Tools__FullMethodCategoryList.st 8074 2012-11-30 17:23:39Z vranyj1 $' |
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
127 |
! |
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
128 |
|
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
129 |
version_SVN |
12308 | 130 |
^ '$Id: Tools__FullMethodCategoryList.st 8074 2012-11-30 17:23:39Z vranyj1 $' |
12125 | 131 |
! ! |