author | Claus Gittinger <cg@exept.de> |
Wed, 20 Jul 2011 18:30:28 +0200 | |
changeset 10358 | 7ffd4e4a8346 |
parent 10248 | 3237dc7fbfb8 |
child 10359 | cd93f3dff257 |
permissions | -rw-r--r-- |
5591 | 1 |
" |
2 |
COPYRIGHT (c) 2000 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 |
ApplicationModel subclass:#NavigatorModel |
|
17 |
instanceVariableNames:'' |
|
8695 | 18 |
classVariableNames:'AllEntry SuperSendEntry UncommentedEntry' |
5591 | 19 |
poolDictionaries:'' |
20 |
category:'Interface-Browsers-New' |
|
21 |
! |
|
22 |
||
23 |
!NavigatorModel class methodsFor:'documentation'! |
|
24 |
||
25 |
copyright |
|
26 |
" |
|
27 |
COPYRIGHT (c) 2000 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 |
||
39 |
!NavigatorModel class methodsFor:'initialization'! |
|
40 |
||
41 |
initialize |
|
8695 | 42 |
AllEntry := '* all *'. |
5591 | 43 |
|
44 |
"Created: / 24.2.2000 / 13:41:29 / cg" |
|
45 |
! ! |
|
46 |
||
47 |
!NavigatorModel class methodsFor:'defaults'! |
|
48 |
||
8754 | 49 |
isPseudoCategory:cat |
50 |
^ cat = self nameListEntryForChanged |
|
51 |
or:[ cat = self nameListEntryForUndocumented |
|
52 |
or:[ cat = self nameListEntryForUnloaded |
|
53 |
or:[ cat = self nameListEntryForALL ]]] |
|
54 |
! |
|
55 |
||
56 |
isPseudoProtocol:protocol |
|
57 |
^ protocol = self nameListEntryForObsolete |
|
58 |
or:[ protocol = self nameListEntryForSuperSend |
|
59 |
or:[ protocol = self nameListEntryForUncommented ]] |
|
60 |
! |
|
61 |
||
7058 | 62 |
markForBeingInChangeList |
63 |
^ ' *' |
|
64 |
||
65 |
"Created: / 29-08-2006 / 10:26:05 / cg" |
|
66 |
! |
|
67 |
||
10248 | 68 |
markForBeingManagedBySVN: package |
69 |
||
70 |
| repo branch mark | |
|
71 |
self hasSubversionSupport ifFalse:[^'']. |
|
72 |
package = PackageId noProjectID ifTrue:[^'']. |
|
73 |
||
74 |
repo := (Smalltalk at:#SVN::RepositoryManager) current |
|
75 |
repositoryForPackage: package onlyFromCache: true. |
|
76 |
repo ifNil:[^'']. |
|
77 |
mark := ' [SVN]'. |
|
78 |
branch := repo workingCopy branchOrNil. |
|
79 |
branch ifNotNil:[mark := ' [SVN: ', branch path,']']. |
|
80 |
^mark asText colorizeAllWith: Color gray |
|
81 |
||
82 |
"Created: / 06-04-2010 / 11:23:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
83 |
! |
|
84 |
||
85 |
markForBeingManagedBySVN: package branch: branch |
|
86 |
||
87 |
| mark | |
|
88 |
mark := branch |
|
89 |
ifNil: |
|
90 |
[' [SVN]'] |
|
91 |
ifNotNil: |
|
92 |
[' [SVN: ',branch,']']. |
|
93 |
||
94 |
^mark asText colorizeAllWith: Color gray. |
|
95 |
||
96 |
"Created: / 14-12-2010 / 15:56:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
97 |
! |
|
98 |
||
5591 | 99 |
nameListEntryForALL |
100 |
^ AllEntry ? '* all *' |
|
101 |
||
102 |
"Created: / 24.2.2000 / 13:39:10 / cg" |
|
103 |
"Modified: / 25.2.2000 / 21:18:30 / cg" |
|
104 |
! |
|
105 |
||
8737 | 106 |
nameListEntryForALLWithCount |
107 |
^ '* all (%1) *' |
|
108 |
! |
|
109 |
||
110 |
nameListEntryForBookmarked |
|
111 |
^ '* bookmarked (%1) *' |
|
112 |
! |
|
113 |
||
114 |
nameListEntryForChanged |
|
115 |
^ '* changed *' |
|
116 |
! |
|
117 |
||
118 |
nameListEntryForChangedWithCount |
|
119 |
^ '* changed (%1) *' |
|
120 |
! |
|
121 |
||
8732 | 122 |
nameListEntryForDocumentation |
123 |
^ '* documentation (%1) *' |
|
124 |
! |
|
125 |
||
8929 | 126 |
nameListEntryForExtensions |
127 |
^ '* extensions (%1) *' |
|
128 |
! |
|
129 |
||
10248 | 130 |
nameListEntryForFailedTests |
131 |
^ '* failed tests (%1) *' |
|
132 |
||
133 |
"Created: / 08-03-2010 / 18:26:37 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
134 |
! |
|
135 |
||
10358 | 136 |
nameListEntryForFullyCovered |
137 |
^ '* covered (%1) *' |
|
138 |
||
139 |
"Created: / 20-07-2011 / 18:20:53 / cg" |
|
140 |
! |
|
141 |
||
8866
c4678ec9944b
added: #nameListEntryForLong
Claus Gittinger <cg@exept.de>
parents:
8754
diff
changeset
|
142 |
nameListEntryForLong |
c4678ec9944b
added: #nameListEntryForLong
Claus Gittinger <cg@exept.de>
parents:
8754
diff
changeset
|
143 |
^ '* long (%1) *' |
c4678ec9944b
added: #nameListEntryForLong
Claus Gittinger <cg@exept.de>
parents:
8754
diff
changeset
|
144 |
! |
c4678ec9944b
added: #nameListEntryForLong
Claus Gittinger <cg@exept.de>
parents:
8754
diff
changeset
|
145 |
|
9087
43da2b44e13b
added: #nameListEntryForMustBeRedefinedInSubclass
Claus Gittinger <cg@exept.de>
parents:
9026
diff
changeset
|
146 |
nameListEntryForMustBeRedefinedInSubclass |
43da2b44e13b
added: #nameListEntryForMustBeRedefinedInSubclass
Claus Gittinger <cg@exept.de>
parents:
9026
diff
changeset
|
147 |
^ '* must be redefined (%1) *' |
43da2b44e13b
added: #nameListEntryForMustBeRedefinedInSubclass
Claus Gittinger <cg@exept.de>
parents:
9026
diff
changeset
|
148 |
! |
43da2b44e13b
added: #nameListEntryForMustBeRedefinedInSubclass
Claus Gittinger <cg@exept.de>
parents:
9026
diff
changeset
|
149 |
|
5591 | 150 |
nameListEntryForNILCategory |
151 |
^ '* no category *' |
|
152 |
! |
|
153 |
||
154 |
nameListEntryForNonStatic |
|
155 |
^ '* instance *' |
|
156 |
! |
|
157 |
||
8719 | 158 |
nameListEntryForObsolete |
8722 | 159 |
^ '* obsolete (%1) *' |
8719 | 160 |
! |
161 |
||
8929 | 162 |
nameListEntryForOverride |
163 |
^ '* override (%1) *' |
|
164 |
! |
|
165 |
||
10358 | 166 |
nameListEntryForPartiallyCovered |
167 |
^ '* partially covered (%1) *' |
|
168 |
||
169 |
"Created: / 20-07-2011 / 18:21:05 / cg" |
|
170 |
! |
|
171 |
||
10248 | 172 |
nameListEntryForPassedTests |
173 |
^ '* passed tests (%1) *' |
|
174 |
||
175 |
"Created: / 08-03-2010 / 18:26:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
176 |
! |
|
177 |
||
8929 | 178 |
nameListEntryForRedefined |
179 |
^ '* redefined (%1) *' |
|
180 |
! |
|
181 |
||
9026
e32283a8ff69
added: #nameListEntryForRequired
Claus Gittinger <cg@exept.de>
parents:
8929
diff
changeset
|
182 |
nameListEntryForRequired |
e32283a8ff69
added: #nameListEntryForRequired
Claus Gittinger <cg@exept.de>
parents:
8929
diff
changeset
|
183 |
^ '* required (%1) *' |
e32283a8ff69
added: #nameListEntryForRequired
Claus Gittinger <cg@exept.de>
parents:
8929
diff
changeset
|
184 |
! |
e32283a8ff69
added: #nameListEntryForRequired
Claus Gittinger <cg@exept.de>
parents:
8929
diff
changeset
|
185 |
|
5591 | 186 |
nameListEntryForStatic |
187 |
^ '* static *' |
|
8695 | 188 |
! |
189 |
||
190 |
nameListEntryForSuperSend |
|
8722 | 191 |
^ '* super (%1) *' |
8695 | 192 |
! |
193 |
||
194 |
nameListEntryForUncommented |
|
8722 | 195 |
^ '* uncommented (%1) *' |
8737 | 196 |
! |
197 |
||
10358 | 198 |
nameListEntryForUncovered |
199 |
^ '* not covered (%1) *' |
|
200 |
||
201 |
"Created: / 20-07-2011 / 18:20:44 / cg" |
|
202 |
! |
|
203 |
||
8754 | 204 |
nameListEntryForUndocumented |
205 |
^ '* undocumented *' |
|
206 |
! |
|
207 |
||
208 |
nameListEntryForUndocumentedWithCount |
|
209 |
^ '* undocumented (%1) *' |
|
210 |
! |
|
211 |
||
212 |
nameListEntryForUnloaded |
|
213 |
^ '* unloaded *' |
|
214 |
! |
|
215 |
||
216 |
nameListEntryForUnloadedWithCount |
|
217 |
^ '* unloaded (%1) *' |
|
218 |
! |
|
219 |
||
8737 | 220 |
nameListEntryForVisited |
221 |
^ '* visited (%1) *' |
|
9129
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
222 |
! |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
223 |
|
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
224 |
pseudoEntryForegroundColor |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
225 |
|bg| |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
226 |
|
9130
e46e456da73a
changed: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9129
diff
changeset
|
227 |
bg := SelectionInListView defaultBackgroundColor ? View defaultBackgroundColor. |
e46e456da73a
changed: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9129
diff
changeset
|
228 |
bg isNil ifTrue:[ bg := View defaultBackgroundColor ]. |
9129
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
229 |
(Color grey brightness - (bg brightness)) abs < 0.3 ifTrue:[ |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
230 |
(bg brightness) > 0.7 ifTrue:[ |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
231 |
^ Color grey:20. |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
232 |
]. |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
233 |
^ Color grey:80. |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
234 |
]. |
c4bd6c5e946f
added: #pseudoEntryForegroundColor
Claus Gittinger <cg@exept.de>
parents:
9087
diff
changeset
|
235 |
^ Color grey |
5591 | 236 |
! ! |
237 |
||
238 |
!NavigatorModel class methodsFor:'interface specs'! |
|
239 |
||
240 |
metaSpec |
|
241 |
"This resource specification was automatically generated |
|
242 |
by the UIPainter of ST/X." |
|
243 |
||
244 |
"Do not manually edit this!! If it is corrupted, |
|
245 |
the UIPainter may not be able to read the specification." |
|
246 |
||
247 |
" |
|
7488 | 248 |
UIPainter new openOnClass:Tools::NavigatorModel andSelector:#metaSpec |
249 |
Tools::NavigatorModel new openInterface:#metaSpec |
|
5591 | 250 |
" |
251 |
||
252 |
<resource: #canvas> |
|
253 |
||
254 |
^ |
|
7488 | 255 |
#(FullSpec |
256 |
name: metaSpec |
|
257 |
window: |
|
258 |
(WindowSpec |
|
259 |
label: 'MetaToggles' |
|
260 |
name: 'MetaToggles' |
|
261 |
min: (Point 0 0) |
|
262 |
max: (Point 1024 721) |
|
263 |
bounds: (Rectangle 0 0 300 28) |
|
264 |
) |
|
265 |
component: |
|
266 |
(SpecCollection |
|
267 |
collection: ( |
|
268 |
(RadioButtonSpec |
|
269 |
label: 'Instance' |
|
270 |
name: 'InstanceToggle' |
|
271 |
layout: (LayoutFrame 0 0.0 0 0.0 0 0.5 25 0) |
|
272 |
translateLabel: true |
|
273 |
tabable: true |
|
274 |
model: notMetaToggle |
|
275 |
isTriggerOnDown: true |
|
276 |
select: true |
|
277 |
isToggle: true |
|
278 |
) |
|
279 |
(RadioButtonSpec |
|
280 |
label: 'Class' |
|
281 |
name: 'ClassToggle' |
|
282 |
layout: (LayoutFrame 0 0.5 0 0 0 1.0 25 0) |
|
283 |
translateLabel: true |
|
284 |
labelChannel: metaToggleLabelHolder |
|
285 |
tabable: false |
|
286 |
model: metaToggle |
|
287 |
isTriggerOnDown: true |
|
288 |
select: true |
|
289 |
isToggle: true |
|
290 |
) |
|
291 |
) |
|
5591 | 292 |
|
7488 | 293 |
) |
5591 | 294 |
) |
295 |
! ! |
|
296 |
||
297 |
!NavigatorModel class methodsFor:'misc'! |
|
298 |
||
299 |
classResources |
|
300 |
^ NewSystemBrowser classResources |
|
301 |
! ! |
|
302 |
||
10248 | 303 |
!NavigatorModel class methodsFor:'queries'! |
304 |
||
305 |
hasSubversionSupport |
|
306 |
||
307 |
^NewSystemBrowser hasSubversionSupport |
|
308 |
||
309 |
"Created: / 06-04-2010 / 11:09:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
310 |
! ! |
|
311 |
||
5591 | 312 |
!NavigatorModel methodsFor:'misc'! |
313 |
||
314 |
resources |
|
8722 | 315 |
"answer the resources of my masterApp, if there is one" |
316 |
||
5591 | 317 |
|m| |
318 |
||
319 |
(m := self masterApplication) notNil ifTrue:[ |
|
8722 | 320 |
^ m resources |
5591 | 321 |
]. |
322 |
^ super resources |
|
323 |
! ! |
|
324 |
||
10248 | 325 |
!NavigatorModel methodsFor:'queries'! |
326 |
||
327 |
hasSubversionSupport |
|
328 |
^ self class hasSubversionSupport |
|
329 |
! ! |
|
330 |
||
5591 | 331 |
!NavigatorModel class methodsFor:'documentation'! |
332 |
||
10248 | 333 |
version_CVS |
10358 | 334 |
^ '$Header: /cvs/stx/stx/libtool/Tools_NavigatorModel.st,v 1.18 2011-07-20 16:30:28 cg Exp $' |
8866
c4678ec9944b
added: #nameListEntryForLong
Claus Gittinger <cg@exept.de>
parents:
8754
diff
changeset
|
335 |
! |
c4678ec9944b
added: #nameListEntryForLong
Claus Gittinger <cg@exept.de>
parents:
8754
diff
changeset
|
336 |
|
10248 | 337 |
version_SVN |
338 |
^ '§Id: Tools__NavigatorModel.st 7802 2011-07-05 18:33:36Z vranyj1 §' |
|
5591 | 339 |
! ! |
340 |
||
341 |
NavigatorModel initialize! |