author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Wed, 27 Feb 2013 12:34:59 +0000 | |
branch | jv |
changeset 12431 | 9f0c59c742d5 |
parent 12314 | 0cbf76168690 |
child 12650 | e0f607754b9a |
permissions | -rw-r--r-- |
10015 | 1 |
" |
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
diff
changeset
|
2 |
COPYRIGHT (c) 2004 by eXept Software AG |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
diff
changeset
|
3 |
All Rights Reserved |
10036 | 4 |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
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:
10036
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:
10036
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:
10036
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:
10036
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:
10036
diff
changeset
|
10 |
hereby transferred. |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
diff
changeset
|
11 |
" |
10015 | 12 |
"{ Package: 'stx:libtool' }" |
13 |
||
14 |
"{ NameSpace: Tools }" |
|
15 |
||
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12314
diff
changeset
|
16 |
HierarchicalClassList subclass:#InheritanceClassList |
10015 | 17 |
instanceVariableNames:'' |
18 |
classVariableNames:'' |
|
19 |
poolDictionaries:'' |
|
20 |
category:'Interface-Browsers-New' |
|
21 |
! |
|
22 |
||
23 |
!InheritanceClassList class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
diff
changeset
|
27 |
COPYRIGHT (c) 2004 by eXept Software AG |
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
diff
changeset
|
28 |
All Rights Reserved |
10015 | 29 |
|
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
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:
10036
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:
10036
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:
10036
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:
10036
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:
10036
diff
changeset
|
35 |
hereby transferred. |
10015 | 36 |
" |
37 |
! |
|
38 |
||
39 |
documentation |
|
40 |
" |
|
41 |
Like a HierarchicalClassList, but shows class inheritance. |
|
42 |
For non-meta classes, this is the same as would be shown in |
|
43 |
the hierarchy list; |
|
44 |
For metaclasses, the tree is extented through the class-behavior |
|
45 |
hierarchy. |
|
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 |
!InheritanceClassList methodsFor:'change & update'! |
|
60 |
||
61 |
delayedUpdate:something with:aParameter from:changedObject |
|
62 |
|top oldSelection newSelection showMeta| |
|
63 |
||
12308 | 64 |
"/ self inSlaveModeOrInvisible ifTrue:[^ self]. |
65 |
"/ self inSlaveMode ifTrue:[^ self]. |
|
10015 | 66 |
|
67 |
changedObject == slaveMode ifTrue:[ |
|
12308 | 68 |
self inSlaveMode ifTrue:[ |
69 |
self invalidateList. |
|
70 |
] ifFalse:[ |
|
71 |
listValid ifFalse:[ |
|
72 |
self updateList |
|
73 |
]. |
|
74 |
]. |
|
75 |
^ self |
|
10015 | 76 |
]. |
77 |
||
78 |
changedObject == meta ifTrue:[ |
|
12308 | 79 |
oldSelection := self selectedClasses value ? #(). |
80 |
showMeta := meta value. |
|
10015 | 81 |
|
12308 | 82 |
newSelection := oldSelection collect:[:cls | showMeta ifTrue:[cls theMetaclass] ifFalse:[cls theNonMetaclass]]. |
83 |
newSelection := newSelection asOrderedCollection. |
|
10015 | 84 |
|
12308 | 85 |
top := self topClassHolder value. |
86 |
top notNil ifTrue:[ |
|
87 |
top := showMeta ifTrue:[top theMetaclass] ifFalse:[top theNonMetaclass]. |
|
88 |
self topClassHolder value:top. |
|
89 |
]. |
|
90 |
self invalidateList. |
|
10015 | 91 |
|
12308 | 92 |
(newSelection includes:nil) ifTrue:[self halt:'should not happen']. |
10015 | 93 |
|
12308 | 94 |
self selectedClasses value:newSelection. |
95 |
^ self. |
|
10015 | 96 |
]. |
97 |
super delayedUpdate:something with:aParameter from:changedObject |
|
98 |
||
99 |
"Modified: / 24.2.2000 / 15:29:21 / cg" |
|
100 |
! |
|
101 |
||
102 |
getSelectedClassIndicesFromClasses |
|
103 |
|classes selectedClasses selectedIndices| |
|
104 |
||
105 |
selectedClasses := self selectedClasses value. |
|
106 |
selectedClasses size == 0 ifTrue:[^ #() ]. |
|
107 |
||
108 |
classes := self classList value. |
|
109 |
selectedIndices := selectedClasses |
|
110 |
collect:[:aSelectedClass | |
|
111 |
classes identityIndexOf:aSelectedClass. |
|
112 |
]. |
|
113 |
selectedIndices := selectedIndices select:[:idx | idx ~~ 0]. |
|
114 |
selectedIndices size == 0 ifTrue:[ |
|
115 |
"/ meta value == true ifTrue:[ |
|
116 |
"/self halt. |
|
117 |
"/ ] ifFalse:[ |
|
118 |
"/self halt. |
|
119 |
"/ ] |
|
120 |
]. |
|
121 |
||
122 |
^ selectedIndices |
|
123 |
||
124 |
"Created: / 24.2.2000 / 19:48:05 / cg" |
|
125 |
"Modified: / 24.2.2000 / 23:30:22 / cg" |
|
126 |
! |
|
127 |
||
128 |
getSelectedClassesFromIndices |
|
129 |
|selected classes allSelected| |
|
130 |
||
131 |
allSelected := false. |
|
132 |
||
133 |
classes := classList value. |
|
134 |
selected := self selectedClassNameIndices value collect:[:idx | |
|
135 |
|cls| |
|
136 |
||
137 |
cls := classes at:idx. |
|
138 |
"/ cls == AllEntry ifTrue:[ |
|
139 |
"/ allSelected := true. |
|
140 |
"/ cls. |
|
141 |
"/ ] ifFalse:[ |
|
142 |
"/ cls notNil ifTrue:[ |
|
143 |
"/ meta value ifTrue:[ |
|
144 |
"/ cls := cls theMetaclass |
|
145 |
"/ ] ifFalse:[ |
|
146 |
"/ cls := cls theNonMetaclass |
|
147 |
"/ ]. |
|
148 |
"/ ]. |
|
149 |
"/ cls |
|
150 |
"/ ] |
|
151 |
]. |
|
152 |
||
153 |
"/ allSelected ifTrue:[ |
|
154 |
"/ selected := classList value select:[:cls | cls ~~ AllEntry]. |
|
155 |
"/ ]. |
|
156 |
||
157 |
selected := selected select:[:cls | cls notNil]. |
|
158 |
^selected. |
|
159 |
||
160 |
"Created: / 24.2.2000 / 19:45:04 / cg" |
|
161 |
! ! |
|
162 |
||
163 |
!InheritanceClassList methodsFor:'private'! |
|
164 |
||
165 |
defaultSlaveModeValue |
|
166 |
|mode| |
|
167 |
||
168 |
mode := self topApplication perform:#initialOrganizerMode ifNotUnderstood:nil. |
|
169 |
mode == OrganizerCanvas organizerModeClassInheritance ifTrue:[^ false]. |
|
170 |
mode isNil ifTrue:[^ false]. |
|
171 |
||
172 |
self organizerMode value == OrganizerCanvas organizerModeCategory ifTrue:[^ true]. |
|
173 |
^ false |
|
174 |
! |
|
175 |
||
176 |
listOfClasses |
|
177 |
|top classes| |
|
178 |
||
179 |
(top := self topClassHolder value) isNil ifTrue:[ |
|
180 |
^ super listOfClasses |
|
181 |
]. |
|
182 |
||
183 |
classes := top withAllSuperclasses copy reverse. |
|
184 |
"/ classes addFirst:InheritedEntry. |
|
185 |
^ classes |
|
186 |
||
187 |
"Modified: / 26.2.2000 / 00:38:48 / cg" |
|
188 |
! ! |
|
189 |
||
190 |
!InheritanceClassList class methodsFor:'documentation'! |
|
191 |
||
12123
4bde08cebd48
trunk branched into /branches/jv
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
10036
diff
changeset
|
192 |
version |
12308 | 193 |
^ '$Header: /cvs/stx/stx/libtool/Tools_InheritanceClassList.st,v 1.5 2012/11/07 14:35:53 cg Exp $' |
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
194 |
! |
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
195 |
|
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12314
diff
changeset
|
196 |
version_HG |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12314
diff
changeset
|
197 |
|
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12314
diff
changeset
|
198 |
^ '$Changeset: <not expanded> $' |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12314
diff
changeset
|
199 |
! |
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12314
diff
changeset
|
200 |
|
12128
a7ff7d66ee85
Improvements in LintHighlighter, few fixes
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12125
diff
changeset
|
201 |
version_SVN |
12314 | 202 |
^ '$Id: Tools__InheritanceClassList.st 8083 2013-01-14 11:48:37Z vranyj1 $' |
12125 | 203 |
! ! |
12431
9f0c59c742d5
Added LintRuleSettingsApplication and LintRuleEditDialog to define user-defined rule sets.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
12314
diff
changeset
|
204 |