9892
|
1 |
"
|
|
2 |
COPYRIGHT (c) 2002 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 |
"
|
|
12 |
"{ Package: 'stx:libtool' }"
|
|
13 |
|
|
14 |
"{ NameSpace: Tools }"
|
|
15 |
|
9907
|
16 |
ApplicationModel subclass:#TagsBrowser
|
|
17 |
instanceVariableNames:'aspects tagView tagList action tagsMenu menus'
|
9892
|
18 |
classVariableNames:''
|
|
19 |
poolDictionaries:''
|
|
20 |
category:'Interface-Tools-File-Tags'
|
|
21 |
!
|
|
22 |
|
|
23 |
SelectionInListModelView subclass:#TagView
|
|
24 |
instanceVariableNames:'application process fileName tagLineNr filter'
|
|
25 |
classVariableNames:'TypeInset'
|
|
26 |
poolDictionaries:''
|
|
27 |
privateIn:TagsBrowser
|
|
28 |
!
|
|
29 |
|
|
30 |
!TagsBrowser class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
copyright
|
|
33 |
"
|
|
34 |
COPYRIGHT (c) 2002 by eXept Software AG
|
|
35 |
All Rights Reserved
|
|
36 |
|
|
37 |
This software is furnished under a license and may be used
|
|
38 |
only in accordance with the terms of that license and with the
|
|
39 |
inclusion of the above copyright notice. This software may not
|
|
40 |
be provided or otherwise made available to, or used by, any
|
|
41 |
other person. No title to or ownership of the software is
|
|
42 |
hereby transferred.
|
|
43 |
|
|
44 |
|
|
45 |
"
|
|
46 |
! !
|
|
47 |
|
|
48 |
!TagsBrowser class methodsFor:'interface specs'!
|
|
49 |
|
|
50 |
windowSpec
|
|
51 |
"This resource specification was automatically generated
|
|
52 |
by the UIPainter of ST/X."
|
|
53 |
|
|
54 |
"Do not manually edit this!! If it is corrupted,
|
|
55 |
the UIPainter may not be able to read the specification."
|
|
56 |
|
|
57 |
"
|
|
58 |
UIPainter new openOnClass:CBrowser::TagsBrowser andSelector:#windowSpec
|
|
59 |
CBrowser::TagsBrowser new openInterface:#windowSpec
|
|
60 |
CBrowser::TagsBrowser open
|
|
61 |
"
|
|
62 |
|
|
63 |
<resource: #canvas>
|
|
64 |
|
|
65 |
^
|
|
66 |
#(#FullSpec
|
|
67 |
#name: #windowSpec
|
|
68 |
#window:
|
|
69 |
#(#WindowSpec
|
|
70 |
#label: 'TagsBrowser'
|
|
71 |
#name: 'TagsBrowser'
|
|
72 |
#min: #(#Point 10 10)
|
|
73 |
#max: #(#Point 1024 768)
|
|
74 |
#bounds: #(#Rectangle 12 22 312 359)
|
|
75 |
)
|
|
76 |
#component:
|
|
77 |
#(#SpecCollection
|
|
78 |
#collection: #(
|
|
79 |
#(#ArbitraryComponentSpec
|
|
80 |
#name: 'Browser'
|
|
81 |
#layout: #(#LayoutFrame 0 0.0 0 0.0 0 1.0 0 1.0)
|
|
82 |
#menu: #middleButtonMenu
|
|
83 |
#hasHorizontalScrollBar: true
|
|
84 |
#hasVerticalScrollBar: true
|
|
85 |
#miniScrollerHorizontal: true
|
|
86 |
#miniScrollerVertical: true
|
|
87 |
#hasBorder: false
|
|
88 |
#component: #tagView
|
|
89 |
)
|
|
90 |
)
|
|
91 |
|
|
92 |
)
|
|
93 |
)
|
|
94 |
! !
|
|
95 |
|
|
96 |
!TagsBrowser class methodsFor:'menu specs'!
|
|
97 |
|
|
98 |
assemblerMenuSlice
|
|
99 |
"This resource specification was automatically generated
|
|
100 |
by the MenuEditor of ST/X."
|
|
101 |
|
|
102 |
"Do not manually edit this!! If it is corrupted,
|
|
103 |
the MenuEditor may not be able to read the specification."
|
|
104 |
|
|
105 |
"
|
|
106 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
107 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
108 |
"
|
|
109 |
|
|
110 |
<resource: #menu>
|
|
111 |
|
|
112 |
^
|
|
113 |
#(#Menu
|
|
114 |
#(
|
|
115 |
#(#MenuItem
|
|
116 |
#label: '-'
|
|
117 |
#isVisible: #editedFileHasAssemblerSuffix
|
|
118 |
)
|
|
119 |
#(#MenuItem
|
|
120 |
#label: 'Hide local labels'
|
|
121 |
#translateLabel: true
|
|
122 |
#isVisible: #editedFileHasAssemblerSuffix
|
|
123 |
#enabled: #tagTypesPresentHolder
|
|
124 |
#indication: #hideLocalLabels:
|
|
125 |
)
|
|
126 |
#(#MenuItem
|
|
127 |
#label: 'Hide data labels'
|
|
128 |
#translateLabel: true
|
|
129 |
#isVisible: #editedFileHasAssemblerSuffix
|
|
130 |
#enabled: #tagTypesPresentHolder
|
|
131 |
#indication: #hideDataLabels:
|
|
132 |
)
|
|
133 |
#(#MenuItem
|
|
134 |
#label: 'Hide text labels'
|
|
135 |
#translateLabel: true
|
|
136 |
#isVisible: #editedFileHasAssemblerSuffix
|
|
137 |
#enabled: #tagTypesPresentHolder
|
|
138 |
#indication: #hideTextLabels:
|
|
139 |
)
|
|
140 |
)
|
|
141 |
nil
|
|
142 |
nil
|
|
143 |
)
|
|
144 |
|
|
145 |
"Created: / 07-06-2010 / 12:01:52 / cg"
|
|
146 |
!
|
|
147 |
|
|
148 |
cMenuSlice
|
|
149 |
"This resource specification was automatically generated
|
|
150 |
by the MenuEditor of ST/X."
|
|
151 |
|
|
152 |
"Do not manually edit this!! If it is corrupted,
|
|
153 |
the MenuEditor may not be able to read the specification."
|
|
154 |
|
|
155 |
"
|
|
156 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#cMenuSlice
|
|
157 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser cMenuSlice)) startUp
|
|
158 |
"
|
|
159 |
|
|
160 |
<resource: #menu>
|
|
161 |
|
|
162 |
^
|
|
163 |
#(Menu
|
|
164 |
(
|
|
165 |
(MenuItem
|
|
166 |
label: '-'
|
|
167 |
isVisible: editedFileHasCSuffix
|
|
168 |
)
|
|
169 |
(MenuItem
|
|
170 |
enabled: tagTypesPresentHolder
|
|
171 |
label: 'Classes, Functions && Variables only'
|
|
172 |
translateLabel: true
|
|
173 |
isVisible: editedFileHasCSuffix
|
|
174 |
indication: classesFunctionsAndVariablesOnly:
|
|
175 |
)
|
|
176 |
(MenuItem
|
|
177 |
enabled: tagTypesPresentHolder
|
|
178 |
label: 'Classes only'
|
|
179 |
translateLabel: true
|
|
180 |
isVisible: editedFileHasCSuffix
|
|
181 |
indication: classesOnly:
|
|
182 |
)
|
|
183 |
(MenuItem
|
|
184 |
enabled: tagTypesPresentHolder
|
|
185 |
label: 'Functions only'
|
|
186 |
translateLabel: true
|
|
187 |
isVisible: editedFileHasCSuffix
|
|
188 |
indication: functionsOnly:
|
|
189 |
)
|
|
190 |
(MenuItem
|
|
191 |
enabled: tagTypesPresentHolder
|
|
192 |
label: 'Variables only'
|
|
193 |
translateLabel: true
|
|
194 |
isVisible: editedFileHasCSuffix
|
|
195 |
indication: variablesOnly:
|
|
196 |
)
|
|
197 |
(MenuItem
|
|
198 |
enabled: tagTypesPresentHolder
|
|
199 |
label: 'Types only'
|
|
200 |
translateLabel: true
|
|
201 |
isVisible: editedFileHasCSuffix
|
|
202 |
indication: typesOnly:
|
|
203 |
)
|
|
204 |
(MenuItem
|
|
205 |
enabled: tagTypesPresentHolder
|
|
206 |
label: 'Structs only'
|
|
207 |
translateLabel: true
|
|
208 |
isVisible: editedFileHasCSuffix
|
|
209 |
indication: structsOnly:
|
|
210 |
)
|
|
211 |
(MenuItem
|
|
212 |
enabled: tagTypesPresentHolder
|
|
213 |
label: 'Defines only'
|
|
214 |
translateLabel: true
|
|
215 |
isVisible: editedFileHasCSuffix
|
|
216 |
indication: definesOnly:
|
|
217 |
)
|
|
218 |
(MenuItem
|
|
219 |
label: '-'
|
|
220 |
isVisible: editedFileHasCSuffix
|
|
221 |
)
|
|
222 |
(MenuItem
|
|
223 |
enabled: tagTypesPresentHolder
|
|
224 |
label: 'Hide classes'
|
|
225 |
translateLabel: true
|
|
226 |
isVisible: editedFileHasCSuffix
|
|
227 |
indication: hideClasses:
|
|
228 |
)
|
|
229 |
(MenuItem
|
|
230 |
enabled: tagTypesPresentHolder
|
|
231 |
label: 'Hide functions'
|
|
232 |
translateLabel: true
|
|
233 |
isVisible: editedFileHasCSuffix
|
|
234 |
indication: hideFunctions:
|
|
235 |
)
|
|
236 |
(MenuItem
|
|
237 |
enabled: tagTypesPresentHolder
|
|
238 |
label: 'Hide variables'
|
|
239 |
translateLabel: true
|
|
240 |
isVisible: editedFileHasCSuffix
|
|
241 |
indication: hideVariables:
|
|
242 |
)
|
|
243 |
(MenuItem
|
|
244 |
enabled: tagTypesPresentHolder
|
|
245 |
label: 'Hide typedefs'
|
|
246 |
translateLabel: true
|
|
247 |
isVisible: editedFileHasCSuffix
|
|
248 |
indication: hideTypedefs:
|
|
249 |
)
|
|
250 |
(MenuItem
|
|
251 |
enabled: tagTypesPresentHolder
|
|
252 |
label: 'Hide structures'
|
|
253 |
translateLabel: true
|
|
254 |
isVisible: editedFileHasCSuffix
|
|
255 |
indication: hideStructures:
|
|
256 |
)
|
|
257 |
(MenuItem
|
|
258 |
enabled: tagTypesPresentHolder
|
|
259 |
label: 'Hide struct members'
|
|
260 |
translateLabel: true
|
|
261 |
isVisible: editedFileHasCSuffix
|
|
262 |
indication: hideStructMembers:
|
|
263 |
)
|
|
264 |
(MenuItem
|
|
265 |
enabled: tagTypesPresentHolder
|
|
266 |
label: 'Hide defines'
|
|
267 |
translateLabel: true
|
|
268 |
isVisible: editedFileHasCSuffix
|
|
269 |
indication: hideDefines:
|
|
270 |
)
|
|
271 |
(MenuItem
|
|
272 |
label: '-'
|
|
273 |
isVisible: editedFileHasCSuffix
|
|
274 |
)
|
|
275 |
(MenuItem
|
|
276 |
enabled: tagTypesPresentHolder
|
|
277 |
label: 'Hide static'
|
|
278 |
translateLabel: true
|
|
279 |
isVisible: editedFileHasCSuffix
|
|
280 |
indication: hideStatic:
|
|
281 |
)
|
|
282 |
)
|
|
283 |
nil
|
|
284 |
nil
|
|
285 |
)
|
|
286 |
!
|
|
287 |
|
|
288 |
javaMenuSlice
|
|
289 |
"This resource specification was automatically generated
|
|
290 |
by the MenuEditor of ST/X."
|
|
291 |
|
|
292 |
"Do not manually edit this!! If it is corrupted,
|
|
293 |
the MenuEditor may not be able to read the specification."
|
|
294 |
|
|
295 |
"
|
|
296 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
297 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
298 |
"
|
|
299 |
|
|
300 |
<resource: #menu>
|
|
301 |
|
|
302 |
^
|
|
303 |
#(#Menu
|
|
304 |
#(
|
|
305 |
#(#MenuItem
|
|
306 |
#label: '-'
|
|
307 |
#isVisible: #editedFileHasJavaSuffix
|
|
308 |
)
|
|
309 |
#(#MenuItem
|
|
310 |
#label: 'Classes only'
|
|
311 |
#translateLabel: true
|
|
312 |
#isVisible: #editedFileHasJavaSuffix
|
|
313 |
#enabled: #tagTypesPresentHolder
|
|
314 |
#indication: #javaClassesOnly:
|
|
315 |
)
|
|
316 |
#(#MenuItem
|
|
317 |
#label: 'Methods only'
|
|
318 |
#translateLabel: true
|
|
319 |
#isVisible: #editedFileHasJavaSuffix
|
|
320 |
#enabled: #tagTypesPresentHolder
|
|
321 |
#indication: #javaMethodsOnly:
|
|
322 |
)
|
|
323 |
#(#MenuItem
|
|
324 |
#label: 'Classes && Methods only'
|
|
325 |
#translateLabel: true
|
|
326 |
#isVisible: #editedFileHasJavaSuffix
|
|
327 |
#enabled: #tagTypesPresentHolder
|
|
328 |
#indication: #javaClassesAndMethodsOnly:
|
|
329 |
)
|
|
330 |
#(#MenuItem
|
|
331 |
#label: '-'
|
|
332 |
#isVisible: #editedFileHasJavaSuffix
|
|
333 |
)
|
|
334 |
#(#MenuItem
|
|
335 |
#label: 'Hide packages'
|
|
336 |
#translateLabel: true
|
|
337 |
#isVisible: #editedFileHasJavaSuffix
|
|
338 |
#enabled: #tagTypesPresentHolder
|
|
339 |
#indication: #hideJavaPackages:
|
|
340 |
)
|
|
341 |
#(#MenuItem
|
|
342 |
#label: 'Hide classes'
|
|
343 |
#translateLabel: true
|
|
344 |
#isVisible: #editedFileHasJavaSuffix
|
|
345 |
#enabled: #tagTypesPresentHolder
|
|
346 |
#indication: #hideJavaClasses:
|
|
347 |
)
|
|
348 |
#(#MenuItem
|
|
349 |
#label: 'Hide methods'
|
|
350 |
#translateLabel: true
|
|
351 |
#isVisible: #editedFileHasJavaSuffix
|
|
352 |
#enabled: #tagTypesPresentHolder
|
|
353 |
#indication: #hideJavaMethods:
|
|
354 |
)
|
|
355 |
#(#MenuItem
|
|
356 |
#label: 'Hide fields'
|
|
357 |
#translateLabel: true
|
|
358 |
#isVisible: #editedFileHasJavaSuffix
|
|
359 |
#enabled: #tagTypesPresentHolder
|
|
360 |
#indication: #hideJavaFields:
|
|
361 |
)
|
|
362 |
)
|
|
363 |
nil
|
|
364 |
nil
|
|
365 |
)
|
|
366 |
|
|
367 |
"Created: / 07-06-2010 / 12:00:49 / cg"
|
|
368 |
!
|
|
369 |
|
|
370 |
javaScriptMenuSlice
|
|
371 |
"This resource specification was automatically generated
|
|
372 |
by the MenuEditor of ST/X."
|
|
373 |
|
|
374 |
"Do not manually edit this!! If it is corrupted,
|
|
375 |
the MenuEditor may not be able to read the specification."
|
|
376 |
|
|
377 |
"
|
|
378 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
379 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
380 |
"
|
|
381 |
|
|
382 |
<resource: #menu>
|
|
383 |
|
|
384 |
^
|
|
385 |
#(#Menu
|
|
386 |
#(
|
|
387 |
#(#MenuItem
|
|
388 |
#label: '-'
|
|
389 |
#isVisible: #editedFileHasJavaScriptSuffix
|
|
390 |
)
|
|
391 |
#(#MenuItem
|
|
392 |
#label: 'Functions only'
|
|
393 |
#translateLabel: true
|
|
394 |
#isVisible: #editedFileHasJavaScriptSuffix
|
|
395 |
#enabled: #tagTypesPresentHolder
|
|
396 |
#indication: #functionsOnly:
|
|
397 |
)
|
|
398 |
#(#MenuItem
|
|
399 |
#label: 'Variables only'
|
|
400 |
#translateLabel: true
|
|
401 |
#isVisible: #editedFileHasJavaScriptSuffix
|
|
402 |
#enabled: #tagTypesPresentHolder
|
|
403 |
#indication: #variablesOnly:
|
|
404 |
)
|
|
405 |
"/ #(#MenuItem
|
|
406 |
"/ #label: '-'
|
|
407 |
"/ #isVisible: #editedFileHasJavaScriptSuffix
|
|
408 |
"/ )
|
|
409 |
"/ #(#MenuItem
|
|
410 |
"/ #label: 'Hide Functions'
|
|
411 |
"/ #translateLabel: true
|
|
412 |
"/ #isVisible: #editedFileHasJavaScriptSuffix
|
|
413 |
"/ #enabled: #tagTypesPresentHolder
|
|
414 |
"/ #indication: #hideFunctions:
|
|
415 |
"/ )
|
|
416 |
"/ #(#MenuItem
|
|
417 |
"/ #label: 'Hide Variables'
|
|
418 |
"/ #translateLabel: true
|
|
419 |
"/ #isVisible: #editedFileHasJavaScriptSuffix
|
|
420 |
"/ #enabled: #tagTypesPresentHolder
|
|
421 |
"/ #indication: #hideVariables:
|
|
422 |
"/ )
|
|
423 |
)
|
|
424 |
nil
|
|
425 |
nil
|
|
426 |
)
|
|
427 |
|
|
428 |
"Created: / 28-06-2010 / 13:08:56 / cg"
|
|
429 |
!
|
|
430 |
|
|
431 |
lispMenuSlice
|
|
432 |
"This resource specification was automatically generated
|
|
433 |
by the MenuEditor of ST/X."
|
|
434 |
|
|
435 |
"Do not manually edit this!! If it is corrupted,
|
|
436 |
the MenuEditor may not be able to read the specification."
|
|
437 |
|
|
438 |
"
|
|
439 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#lispMenuSlice
|
|
440 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser lispMenuSlice)) startUp
|
|
441 |
"
|
|
442 |
|
|
443 |
<resource: #menu>
|
|
444 |
|
|
445 |
^
|
|
446 |
#(Menu
|
|
447 |
(
|
|
448 |
(MenuItem
|
|
449 |
label: '-'
|
|
450 |
isVisible: editedFileHasLispSuffix
|
|
451 |
)
|
|
452 |
(MenuItem
|
|
453 |
enabled: tagTypesPresentHolder
|
|
454 |
label: 'Classes only'
|
|
455 |
translateLabel: true
|
|
456 |
isVisible: editedFileHasLispSuffix
|
|
457 |
indication: classesOnly:
|
|
458 |
)
|
|
459 |
(MenuItem
|
|
460 |
enabled: tagTypesPresentHolder
|
|
461 |
label: 'Methods only'
|
|
462 |
translateLabel: true
|
|
463 |
isVisible: editedFileHasLispSuffix
|
|
464 |
indication: methodsOnly:
|
|
465 |
)
|
|
466 |
(MenuItem
|
|
467 |
enabled: tagTypesPresentHolder
|
|
468 |
label: 'Functions only'
|
|
469 |
translateLabel: true
|
|
470 |
isVisible: editedFileHasLispSuffix
|
|
471 |
indication: functionsOnly:
|
|
472 |
)
|
|
473 |
(MenuItem
|
|
474 |
enabled: tagTypesPresentHolder
|
|
475 |
label: 'Variables only'
|
|
476 |
translateLabel: true
|
|
477 |
isVisible: editedFileHasLispSuffix
|
|
478 |
indication: variablesOnly:
|
|
479 |
)
|
|
480 |
(MenuItem
|
|
481 |
enabled: tagTypesPresentHolder
|
|
482 |
label: 'Macros only'
|
|
483 |
translateLabel: true
|
|
484 |
isVisible: editedFileHasLispSuffix
|
|
485 |
indication: macrosOnly:
|
|
486 |
)
|
|
487 |
(MenuItem
|
|
488 |
label: '-'
|
|
489 |
isVisible: editedFileHasLispSuffix
|
|
490 |
)
|
|
491 |
(MenuItem
|
|
492 |
enabled: tagTypesPresentHolder
|
|
493 |
label: 'Hide classes'
|
|
494 |
translateLabel: true
|
|
495 |
isVisible: editedFileHasLispSuffix
|
|
496 |
indication: hideClasses:
|
|
497 |
)
|
|
498 |
(MenuItem
|
|
499 |
enabled: tagTypesPresentHolder
|
|
500 |
label: 'Hide methods'
|
|
501 |
translateLabel: true
|
|
502 |
isVisible: editedFileHasLispSuffix
|
|
503 |
indication: hideLispMethods:
|
|
504 |
)
|
|
505 |
(MenuItem
|
|
506 |
enabled: tagTypesPresentHolder
|
|
507 |
label: 'Hide functions'
|
|
508 |
translateLabel: true
|
|
509 |
isVisible: editedFileHasLispSuffix
|
|
510 |
indication: hideFunctions:
|
|
511 |
)
|
|
512 |
(MenuItem
|
|
513 |
enabled: tagTypesPresentHolder
|
|
514 |
label: 'Hide variables'
|
|
515 |
translateLabel: true
|
|
516 |
isVisible: editedFileHasLispSuffix
|
|
517 |
indication: hideVariables:
|
|
518 |
)
|
|
519 |
(MenuItem
|
|
520 |
enabled: tagTypesPresentHolder
|
|
521 |
label: 'Hide macros'
|
|
522 |
translateLabel: true
|
|
523 |
isVisible: editedFileHasLispSuffix
|
|
524 |
indication: hideLispMacros:
|
|
525 |
)
|
|
526 |
(MenuItem
|
|
527 |
enabled: tagTypesPresentHolder
|
|
528 |
label: 'Hide constants'
|
|
529 |
translateLabel: true
|
|
530 |
isVisible: editedFileHasLispSuffix
|
|
531 |
indication: hideLispConstants:
|
|
532 |
)
|
|
533 |
(MenuItem
|
|
534 |
enabled: tagTypesPresentHolder
|
|
535 |
label: 'Hide evaluations'
|
|
536 |
translateLabel: true
|
|
537 |
isVisible: editedFileHasLispSuffix
|
|
538 |
indication: hideLispEvaluations:
|
|
539 |
)
|
|
540 |
(MenuItem
|
|
541 |
enabled: tagTypesPresentHolder
|
|
542 |
label: 'Hide structs'
|
|
543 |
translateLabel: true
|
|
544 |
isVisible: editedFileHasLispSuffix
|
|
545 |
indication: hideStructures:
|
|
546 |
)
|
|
547 |
)
|
|
548 |
nil
|
|
549 |
nil
|
|
550 |
)
|
|
551 |
!
|
|
552 |
|
|
553 |
makefileMenuSlice
|
|
554 |
"This resource specification was automatically generated
|
|
555 |
by the MenuEditor of ST/X."
|
|
556 |
|
|
557 |
"Do not manually edit this!! If it is corrupted,
|
|
558 |
the MenuEditor may not be able to read the specification."
|
|
559 |
|
|
560 |
"
|
|
561 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
562 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
563 |
"
|
|
564 |
|
|
565 |
<resource: #menu>
|
|
566 |
|
|
567 |
^
|
|
568 |
#(#Menu
|
|
569 |
#(
|
|
570 |
#(#MenuItem
|
|
571 |
#label: '-'
|
|
572 |
#isVisible: #editedFileIsMakefile
|
|
573 |
)
|
|
574 |
#(#MenuItem
|
|
575 |
#label: 'Targets only'
|
|
576 |
#translateLabel: true
|
|
577 |
#isVisible: #editedFileIsMakefile
|
|
578 |
#enabled: #tagTypesPresentHolder
|
|
579 |
#indication: #targetsOnly:
|
|
580 |
)
|
|
581 |
)
|
|
582 |
nil
|
|
583 |
nil
|
|
584 |
)
|
|
585 |
|
|
586 |
"Created: / 07-06-2010 / 12:03:19 / cg"
|
|
587 |
!
|
|
588 |
|
|
589 |
middleButtonMenu
|
|
590 |
"This resource specification was automatically generated
|
|
591 |
by the MenuEditor of ST/X."
|
|
592 |
|
|
593 |
"Do not manually edit this!! If it is corrupted,
|
|
594 |
the MenuEditor may not be able to read the specification."
|
|
595 |
|
|
596 |
"
|
|
597 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
598 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
599 |
"
|
|
600 |
|
|
601 |
<resource: #menu>
|
|
602 |
|
|
603 |
^
|
|
604 |
#(Menu
|
|
605 |
(
|
|
606 |
(MenuItem
|
|
607 |
enabled: tagTypesPresentHolder
|
|
608 |
label: 'Group by Type'
|
|
609 |
translateLabel: true
|
|
610 |
indication: groupedByType:
|
|
611 |
)
|
|
612 |
(MenuItem
|
|
613 |
label: '-'
|
|
614 |
)
|
|
615 |
(MenuItem
|
|
616 |
label: 'Sort by Name'
|
|
617 |
translateLabel: true
|
|
618 |
indication: sortedByName:
|
|
619 |
)
|
|
620 |
(MenuItem
|
|
621 |
label: 'Sort by Name ignoring case'
|
|
622 |
translateLabel: true
|
|
623 |
indication: sortedByNameIgnoringCase:
|
|
624 |
)
|
|
625 |
(MenuItem
|
|
626 |
label: 'Sort by Name (ignore leading underscores)'
|
|
627 |
translateLabel: true
|
|
628 |
indication: sortedByNameIgnoringLeadingUnderscores:
|
|
629 |
)
|
|
630 |
(MenuItem
|
|
631 |
label: 'Sort by Name (ignore leading underscores and case)'
|
|
632 |
translateLabel: true
|
|
633 |
indication: sortedByNameIgnoringLeadingUnderscoresAndCase:
|
|
634 |
)
|
|
635 |
(MenuItem
|
|
636 |
label: 'Sort by LineNumber'
|
|
637 |
translateLabel: true
|
|
638 |
indication: sortedByLineNumber:
|
|
639 |
)
|
|
640 |
(MenuItem
|
|
641 |
label: 'C Menu Slice'
|
|
642 |
translateLabel: true
|
|
643 |
submenuChannel: cMenuSlice
|
|
644 |
isMenuSlice: true
|
|
645 |
)
|
|
646 |
(MenuItem
|
|
647 |
label: 'Java Menu Slice'
|
|
648 |
translateLabel: true
|
|
649 |
submenuChannel: javaMenuSlice
|
|
650 |
isMenuSlice: true
|
|
651 |
)
|
|
652 |
(MenuItem
|
|
653 |
label: 'JavaScript Menu Slice'
|
|
654 |
translateLabel: true
|
|
655 |
submenuChannel: javaScriptMenuSlice
|
|
656 |
isMenuSlice: true
|
|
657 |
)
|
|
658 |
(MenuItem
|
|
659 |
label: 'TCL Menu Slice'
|
|
660 |
translateLabel: true
|
|
661 |
submenuChannel: tclMenuSlice
|
|
662 |
isMenuSlice: true
|
|
663 |
)
|
|
664 |
(MenuItem
|
|
665 |
label: 'Assembler Menu Slice'
|
|
666 |
translateLabel: true
|
|
667 |
submenuChannel: assemblerMenuSlice
|
|
668 |
isMenuSlice: true
|
|
669 |
)
|
|
670 |
(MenuItem
|
|
671 |
label: 'Lisp Menu Slice'
|
|
672 |
translateLabel: true
|
|
673 |
submenuChannel: lispMenuSlice
|
|
674 |
isMenuSlice: true
|
|
675 |
)
|
|
676 |
(MenuItem
|
|
677 |
label: 'Python Menu Slice'
|
|
678 |
translateLabel: true
|
|
679 |
submenuChannel: pythonMenuSlice
|
|
680 |
isMenuSlice: true
|
|
681 |
)
|
|
682 |
(MenuItem
|
|
683 |
label: 'OZ Menu Slice'
|
|
684 |
translateLabel: true
|
|
685 |
submenuChannel: ozMenuSlice
|
|
686 |
isMenuSlice: true
|
|
687 |
)
|
|
688 |
(MenuItem
|
|
689 |
label: 'Makefile Menu Slice'
|
|
690 |
translateLabel: true
|
|
691 |
submenuChannel: makefileMenuSlice
|
|
692 |
isMenuSlice: true
|
|
693 |
)
|
|
694 |
(MenuItem
|
|
695 |
label: '-'
|
|
696 |
)
|
|
697 |
(MenuItem
|
|
698 |
label: 'Update'
|
|
699 |
itemValue: updateTagList
|
|
700 |
translateLabel: true
|
|
701 |
)
|
|
702 |
)
|
|
703 |
nil
|
|
704 |
nil
|
|
705 |
)
|
|
706 |
|
|
707 |
"Modified: / 05-05-2011 / 14:38:52 / cg"
|
|
708 |
!
|
|
709 |
|
|
710 |
ozMenuSlice
|
|
711 |
"This resource specification was automatically generated
|
|
712 |
by the MenuEditor of ST/X."
|
|
713 |
|
|
714 |
"Do not manually edit this!! If it is corrupted,
|
|
715 |
the MenuEditor may not be able to read the specification."
|
|
716 |
|
|
717 |
"
|
|
718 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
719 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
720 |
"
|
|
721 |
|
|
722 |
<resource: #menu>
|
|
723 |
|
|
724 |
^
|
|
725 |
#(#Menu
|
|
726 |
#(
|
|
727 |
#(#MenuItem
|
|
728 |
#label: '-'
|
|
729 |
#isVisible: #editedFileHasOzSuffix
|
|
730 |
)
|
|
731 |
#(#MenuItem
|
|
732 |
#label: 'Hide classes'
|
|
733 |
#translateLabel: true
|
|
734 |
#isVisible: #editedFileHasOzSuffix
|
|
735 |
#enabled: #tagTypesPresentHolder
|
|
736 |
#indication: #hideOzClasses:
|
|
737 |
)
|
|
738 |
#(#MenuItem
|
|
739 |
#label: 'Hide methods'
|
|
740 |
#translateLabel: true
|
|
741 |
#isVisible: #editedFileHasOzSuffix
|
|
742 |
#enabled: #tagTypesPresentHolder
|
|
743 |
#indication: #hideOzMethods:
|
|
744 |
)
|
|
745 |
#(#MenuItem
|
|
746 |
#label: 'Hide functions'
|
|
747 |
#translateLabel: true
|
|
748 |
#isVisible: #editedFileHasOzSuffix
|
|
749 |
#enabled: #tagTypesPresentHolder
|
|
750 |
#indication: #hideOzFunctions:
|
|
751 |
)
|
|
752 |
)
|
|
753 |
nil
|
|
754 |
nil
|
|
755 |
)
|
|
756 |
|
|
757 |
"Created: / 07-06-2010 / 12:02:49 / cg"
|
|
758 |
!
|
|
759 |
|
|
760 |
pythonMenuSlice
|
|
761 |
"This resource specification was automatically generated
|
|
762 |
by the MenuEditor of ST/X."
|
|
763 |
|
|
764 |
"Do not manually edit this!! If it is corrupted,
|
|
765 |
the MenuEditor may not be able to read the specification."
|
|
766 |
|
|
767 |
"
|
|
768 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
769 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
770 |
"
|
|
771 |
|
|
772 |
<resource: #menu>
|
|
773 |
|
|
774 |
^
|
|
775 |
#(#Menu
|
|
776 |
#(
|
|
777 |
#(#MenuItem
|
|
778 |
#label: '-'
|
|
779 |
#isVisible: #editedFileHasPythonSuffix
|
|
780 |
)
|
|
781 |
#(#MenuItem
|
|
782 |
#label: 'Classes only'
|
|
783 |
#translateLabel: true
|
|
784 |
#isVisible: #editedFileHasPythonSuffix
|
|
785 |
#enabled: #tagTypesPresentHolder
|
|
786 |
#indication: #pythonClassesOnly:
|
|
787 |
)
|
|
788 |
#(#MenuItem
|
|
789 |
#label: 'Methods only'
|
|
790 |
#translateLabel: true
|
|
791 |
#isVisible: #editedFileHasPythonSuffix
|
|
792 |
#enabled: #tagTypesPresentHolder
|
|
793 |
#indication: #pythonMethodsOnly:
|
|
794 |
)
|
|
795 |
#(#MenuItem
|
|
796 |
#label: 'Functions only'
|
|
797 |
#translateLabel: true
|
|
798 |
#isVisible: #editedFileHasPythonSuffix
|
|
799 |
#enabled: #tagTypesPresentHolder
|
|
800 |
#indication: #pythonFunctionsOnly:
|
|
801 |
)
|
|
802 |
#(#MenuItem
|
|
803 |
#label: '-'
|
|
804 |
#isVisible: #editedFileHasPythonSuffix
|
|
805 |
)
|
|
806 |
#(#MenuItem
|
|
807 |
#label: 'Hide classes'
|
|
808 |
#translateLabel: true
|
|
809 |
#isVisible: #editedFileHasPythonSuffix
|
|
810 |
#enabled: #tagTypesPresentHolder
|
|
811 |
#indication: #hidePythonClasses:
|
|
812 |
)
|
|
813 |
#(#MenuItem
|
|
814 |
#label: 'Hide methods'
|
|
815 |
#translateLabel: true
|
|
816 |
#isVisible: #editedFileHasPythonSuffix
|
|
817 |
#enabled: #tagTypesPresentHolder
|
|
818 |
#indication: #hidePythonMethods:
|
|
819 |
)
|
|
820 |
#(#MenuItem
|
|
821 |
#label: 'Hide functions'
|
|
822 |
#translateLabel: true
|
|
823 |
#isVisible: #editedFileHasPythonSuffix
|
|
824 |
#enabled: #tagTypesPresentHolder
|
|
825 |
#indication: #hidePythonFunctions:
|
|
826 |
)
|
|
827 |
)
|
|
828 |
nil
|
|
829 |
nil
|
|
830 |
)
|
|
831 |
|
|
832 |
"Created: / 07-06-2010 / 12:02:12 / cg"
|
|
833 |
!
|
|
834 |
|
|
835 |
tclMenuSlice
|
|
836 |
"This resource specification was automatically generated
|
|
837 |
by the MenuEditor of ST/X."
|
|
838 |
|
|
839 |
"Do not manually edit this!! If it is corrupted,
|
|
840 |
the MenuEditor may not be able to read the specification."
|
|
841 |
|
|
842 |
"
|
|
843 |
MenuEditor new openOnClass:CBrowser::TagsBrowser andSelector:#middleButtonMenu
|
|
844 |
(Menu new fromLiteralArrayEncoding:(CBrowser::TagsBrowser middleButtonMenu)) startUp
|
|
845 |
"
|
|
846 |
|
|
847 |
<resource: #menu>
|
|
848 |
|
|
849 |
^
|
|
850 |
#(#Menu
|
|
851 |
#(
|
|
852 |
#(#MenuItem
|
|
853 |
#label: '-'
|
|
854 |
#isVisible: #editedFileHasTCLSuffix
|
|
855 |
)
|
|
856 |
#(#MenuItem
|
|
857 |
#label: 'Hide variables'
|
|
858 |
#translateLabel: true
|
|
859 |
#isVisible: #editedFileHasTCLSuffix
|
|
860 |
#enabled: #tagTypesPresentHolder
|
|
861 |
#indication: #hideVariables:
|
|
862 |
)
|
|
863 |
)
|
|
864 |
nil
|
|
865 |
nil
|
|
866 |
)
|
|
867 |
|
|
868 |
"Created: / 07-06-2010 / 12:01:24 / cg"
|
|
869 |
! !
|
|
870 |
|
|
871 |
!TagsBrowser methodsFor:'accessing'!
|
|
872 |
|
9907
|
873 |
applications
|
|
874 |
^ aspects at:#applications
|
|
875 |
|
|
876 |
"Created: / 06-05-2011 / 13:53:26 / cg"
|
|
877 |
!
|
|
878 |
|
|
879 |
aspectFor:something ifAbsent:aBlock
|
|
880 |
"returns the model for an aspect
|
|
881 |
"
|
|
882 |
|value|
|
|
883 |
|
|
884 |
(value := aspects at:something ifAbsent:nil) isNil ifTrue:[
|
|
885 |
(value := aBlock value) notNil ifTrue:[
|
|
886 |
aspects at:something put:value
|
|
887 |
].
|
|
888 |
].
|
|
889 |
^ value
|
|
890 |
|
|
891 |
"Created: / 06-05-2011 / 13:52:50 / cg"
|
|
892 |
!
|
|
893 |
|
|
894 |
editedFile
|
|
895 |
^ self editedFileHolder value
|
|
896 |
|
|
897 |
"Created: / 06-05-2011 / 13:56:20 / cg"
|
|
898 |
!
|
|
899 |
|
|
900 |
editedFileHolder
|
|
901 |
"gets the holder, which keeps the current edited file
|
|
902 |
"
|
|
903 |
^ self aspectFor:#editedFileHolder ifAbsent:[nil asValue]
|
|
904 |
|
|
905 |
"Created: / 06-05-2011 / 13:52:39 / cg"
|
|
906 |
!
|
|
907 |
|
9892
|
908 |
filter:aString
|
|
909 |
tagView filter:aString.
|
9907
|
910 |
!
|
|
911 |
|
|
912 |
masterApplication:anApplication
|
|
913 |
|
|
914 |
masterApplication notNil ifTrue:[ self error:'oops already have a master' mayProceed:true ].
|
|
915 |
|
|
916 |
masterApplication isNil ifTrue:[
|
|
917 |
self createBuilder.
|
|
918 |
|
|
919 |
anApplication notNil ifTrue:[
|
|
920 |
super masterApplication:anApplication.
|
|
921 |
aspects := anApplication aspects
|
|
922 |
] ifFalse:[
|
|
923 |
aspects isNil ifTrue:[
|
|
924 |
aspects := IdentityDictionary new.
|
|
925 |
aspects at:#applications put:(IdentityDictionary new).
|
|
926 |
]
|
|
927 |
].
|
|
928 |
|
|
929 |
self editedFileHolder addDependent:self.
|
|
930 |
self projectHolder addDependent:self.
|
|
931 |
"/ self buildRemoteForAll addDependent:self.
|
|
932 |
"/ self tagsRemoteHolder addDependent:self.
|
|
933 |
self applications at:(self class) put:self.
|
|
934 |
]
|
|
935 |
|
|
936 |
"Created: / 06-05-2011 / 13:52:08 / cg"
|
|
937 |
!
|
|
938 |
|
|
939 |
projectHolder
|
|
940 |
"gets the holder, which keeps the current project directory
|
|
941 |
"
|
|
942 |
|
|
943 |
^ self aspectFor:#projectHolder ifAbsent:[nil asValue]
|
|
944 |
|
|
945 |
"Created: / 06-05-2011 / 13:53:03 / cg"
|
9892
|
946 |
! !
|
|
947 |
|
|
948 |
!TagsBrowser methodsFor:'accessing filters'!
|
|
949 |
|
|
950 |
classesFunctionsAndVariablesOnly
|
|
951 |
^ tagList classesFunctionsAndVariablesOnly
|
|
952 |
!
|
|
953 |
|
|
954 |
classesFunctionsAndVariablesOnly:aBool
|
|
955 |
aBool ifTrue:[
|
|
956 |
tagList hideClasses:false.
|
|
957 |
tagList hideFunctions:false.
|
|
958 |
tagList hideVariables:false.
|
|
959 |
].
|
|
960 |
tagList classesFunctionsAndVariablesOnly:aBool.
|
|
961 |
self updateTagList
|
|
962 |
|
|
963 |
"Modified: / 05-05-2011 / 15:33:13 / cg"
|
|
964 |
!
|
|
965 |
|
|
966 |
classesOnly
|
|
967 |
^ tagList classesOnly
|
|
968 |
!
|
|
969 |
|
|
970 |
classesOnly:aBool
|
|
971 |
aBool ifTrue:[
|
|
972 |
tagList hideClasses:false.
|
|
973 |
].
|
|
974 |
tagList classesOnly:aBool.
|
|
975 |
self updateTagList
|
|
976 |
|
|
977 |
"Modified: / 05-05-2011 / 15:33:07 / cg"
|
|
978 |
!
|
|
979 |
|
|
980 |
definesOnly
|
|
981 |
^ tagList definesOnly
|
|
982 |
!
|
|
983 |
|
|
984 |
definesOnly:aBool
|
|
985 |
aBool ifTrue:[
|
|
986 |
tagList hideDefines:false.
|
|
987 |
].
|
|
988 |
tagList definesOnly:aBool.
|
|
989 |
self updateTagList
|
|
990 |
!
|
|
991 |
|
|
992 |
functionsAndVariablesOnly
|
|
993 |
^ tagList functionsAndVariablesOnly
|
|
994 |
!
|
|
995 |
|
|
996 |
functionsAndVariablesOnly:aBool
|
|
997 |
aBool ifTrue:[
|
|
998 |
tagList hideFunctions:false.
|
|
999 |
tagList hideVariables:false.
|
|
1000 |
].
|
|
1001 |
tagList functionsAndVariablesOnly:aBool.
|
|
1002 |
self updateTagList
|
|
1003 |
!
|
|
1004 |
|
|
1005 |
functionsOnly
|
|
1006 |
^ tagList functionsOnly
|
|
1007 |
!
|
|
1008 |
|
|
1009 |
functionsOnly:aBool
|
|
1010 |
aBool ifTrue:[
|
|
1011 |
tagList hideFunctions:false.
|
|
1012 |
].
|
|
1013 |
tagList functionsOnly:aBool.
|
|
1014 |
self updateTagList
|
|
1015 |
!
|
|
1016 |
|
|
1017 |
hideClasses
|
|
1018 |
^ tagList hideClasses
|
|
1019 |
!
|
|
1020 |
|
|
1021 |
hideClasses:aBool
|
|
1022 |
tagList hideClasses:aBool.
|
|
1023 |
self updateTagList
|
|
1024 |
!
|
|
1025 |
|
|
1026 |
hideDataLabels
|
|
1027 |
^ tagList hideDataLabels
|
|
1028 |
!
|
|
1029 |
|
|
1030 |
hideDataLabels:aBool
|
|
1031 |
tagList hideDataLabels:aBool.
|
|
1032 |
self updateTagList
|
|
1033 |
!
|
|
1034 |
|
|
1035 |
hideDefines
|
|
1036 |
^ tagList hideDefines
|
|
1037 |
!
|
|
1038 |
|
|
1039 |
hideDefines:aBool
|
|
1040 |
tagList hideDefines:aBool.
|
|
1041 |
self updateTagList
|
|
1042 |
!
|
|
1043 |
|
|
1044 |
hideFunctionProtoTypes
|
|
1045 |
^ tagList hideFunctionProtoTypes
|
|
1046 |
!
|
|
1047 |
|
|
1048 |
hideFunctionProtoTypes:aBool
|
|
1049 |
tagList hideFunctionProtoTypes:aBool.
|
|
1050 |
self updateTagList
|
|
1051 |
!
|
|
1052 |
|
|
1053 |
hideFunctions
|
|
1054 |
^ tagList hideFunctions
|
|
1055 |
!
|
|
1056 |
|
|
1057 |
hideFunctions:aBool
|
|
1058 |
tagList hideFunctions:aBool.
|
|
1059 |
self updateTagList
|
|
1060 |
!
|
|
1061 |
|
|
1062 |
hideJavaClasses
|
|
1063 |
^ tagList hideJavaClasses
|
|
1064 |
!
|
|
1065 |
|
|
1066 |
hideJavaClasses:aBool
|
|
1067 |
tagList hideJavaClasses:aBool.
|
|
1068 |
self updateTagList
|
|
1069 |
!
|
|
1070 |
|
|
1071 |
hideJavaFields
|
|
1072 |
^ tagList hideJavaFields
|
|
1073 |
!
|
|
1074 |
|
|
1075 |
hideJavaFields:aBool
|
|
1076 |
tagList hideJavaFields:aBool.
|
|
1077 |
self updateTagList
|
|
1078 |
!
|
|
1079 |
|
|
1080 |
hideJavaInterfaces
|
|
1081 |
^ tagList hideJavaInterfaces
|
|
1082 |
!
|
|
1083 |
|
|
1084 |
hideJavaInterfaces:aBool
|
|
1085 |
tagList hideJavaInterfaces:aBool.
|
|
1086 |
self updateTagList
|
|
1087 |
!
|
|
1088 |
|
|
1089 |
hideJavaMethods
|
|
1090 |
^ tagList hideJavaMethods
|
|
1091 |
!
|
|
1092 |
|
|
1093 |
hideJavaMethods:aBool
|
|
1094 |
tagList hideJavaMethods:aBool.
|
|
1095 |
self updateTagList
|
|
1096 |
!
|
|
1097 |
|
|
1098 |
hideJavaPackages
|
|
1099 |
^ tagList hideJavaPackages
|
|
1100 |
!
|
|
1101 |
|
|
1102 |
hideJavaPackages:aBool
|
|
1103 |
tagList hideJavaPackages:aBool.
|
|
1104 |
self updateTagList
|
|
1105 |
!
|
|
1106 |
|
|
1107 |
hideLispConstants
|
|
1108 |
^ tagList hideLispConstants
|
|
1109 |
!
|
|
1110 |
|
|
1111 |
hideLispConstants:aBool
|
|
1112 |
tagList hideLispConstants:aBool.
|
|
1113 |
self updateTagList
|
|
1114 |
!
|
|
1115 |
|
|
1116 |
hideLispEvaluations
|
|
1117 |
^ tagList hideLispEvaluations
|
|
1118 |
!
|
|
1119 |
|
|
1120 |
hideLispEvaluations:aBool
|
|
1121 |
tagList hideLispEvaluations:aBool.
|
|
1122 |
self updateTagList
|
|
1123 |
!
|
|
1124 |
|
|
1125 |
hideLispMacros
|
|
1126 |
^ tagList hideLispMacros
|
|
1127 |
!
|
|
1128 |
|
|
1129 |
hideLispMacros:aBool
|
|
1130 |
tagList hideLispMacros:aBool.
|
|
1131 |
self updateTagList
|
|
1132 |
!
|
|
1133 |
|
|
1134 |
hideLispMethods
|
|
1135 |
^ tagList hideLispMethods
|
|
1136 |
!
|
|
1137 |
|
|
1138 |
hideLispMethods:aBool
|
|
1139 |
tagList hideLispMethods:aBool.
|
|
1140 |
self updateTagList
|
|
1141 |
!
|
|
1142 |
|
|
1143 |
hideLocalLabels
|
|
1144 |
^ tagList hideLocalLabels
|
|
1145 |
!
|
|
1146 |
|
|
1147 |
hideLocalLabels:aBool
|
|
1148 |
tagList hideLocalLabels:aBool.
|
|
1149 |
self updateTagList
|
|
1150 |
!
|
|
1151 |
|
|
1152 |
hideOzClasses
|
|
1153 |
^ tagList hideOzClasses
|
|
1154 |
!
|
|
1155 |
|
|
1156 |
hideOzClasses:aBool
|
|
1157 |
tagList hideOzClasses:aBool.
|
|
1158 |
self updateTagList
|
|
1159 |
!
|
|
1160 |
|
|
1161 |
hideOzFunctions
|
|
1162 |
^ tagList hideOzFunctions
|
|
1163 |
!
|
|
1164 |
|
|
1165 |
hideOzFunctions:aBool
|
|
1166 |
tagList hideOzFunctions:aBool.
|
|
1167 |
self updateTagList
|
|
1168 |
!
|
|
1169 |
|
|
1170 |
hideOzMethods
|
|
1171 |
^ tagList hideOzMethods
|
|
1172 |
!
|
|
1173 |
|
|
1174 |
hideOzMethods:aBool
|
|
1175 |
tagList hideOzMethods:aBool.
|
|
1176 |
self updateTagList
|
|
1177 |
!
|
|
1178 |
|
|
1179 |
hidePythonClasses
|
|
1180 |
^ tagList hidePythonClasses
|
|
1181 |
!
|
|
1182 |
|
|
1183 |
hidePythonClasses:aBool
|
|
1184 |
tagList hidePythonClasses:aBool.
|
|
1185 |
self updateTagList
|
|
1186 |
!
|
|
1187 |
|
|
1188 |
hidePythonFunctions
|
|
1189 |
^ tagList hidePythonFunctions
|
|
1190 |
!
|
|
1191 |
|
|
1192 |
hidePythonFunctions:aBool
|
|
1193 |
tagList hidePythonFunctions:aBool.
|
|
1194 |
self updateTagList
|
|
1195 |
!
|
|
1196 |
|
|
1197 |
hidePythonMethods
|
|
1198 |
^ tagList hidePythonMethods
|
|
1199 |
!
|
|
1200 |
|
|
1201 |
hidePythonMethods:aBool
|
|
1202 |
tagList hidePythonMethods:aBool.
|
|
1203 |
self updateTagList
|
|
1204 |
!
|
|
1205 |
|
|
1206 |
hideStatic
|
|
1207 |
^ tagList hideStatic
|
|
1208 |
!
|
|
1209 |
|
|
1210 |
hideStatic:aBool
|
|
1211 |
tagList hideStatic:aBool.
|
|
1212 |
self updateTagList
|
|
1213 |
!
|
|
1214 |
|
|
1215 |
hideStructMembers
|
|
1216 |
^ tagList hideStructMembers
|
|
1217 |
!
|
|
1218 |
|
|
1219 |
hideStructMembers:aBool
|
|
1220 |
tagList hideStructMembers:aBool.
|
|
1221 |
self updateTagList
|
|
1222 |
!
|
|
1223 |
|
|
1224 |
hideStructures
|
|
1225 |
^ tagList hideStructures
|
|
1226 |
!
|
|
1227 |
|
|
1228 |
hideStructures:aBool
|
|
1229 |
tagList hideStructures:aBool.
|
|
1230 |
self updateTagList
|
|
1231 |
!
|
|
1232 |
|
|
1233 |
hideTextLabels
|
|
1234 |
^ tagList hideTextLabels
|
|
1235 |
!
|
|
1236 |
|
|
1237 |
hideTextLabels:aBool
|
|
1238 |
tagList hideTextLabels:aBool.
|
|
1239 |
self updateTagList
|
|
1240 |
!
|
|
1241 |
|
|
1242 |
hideTypedefs
|
|
1243 |
^ tagList hideTypedefs
|
|
1244 |
!
|
|
1245 |
|
|
1246 |
hideTypedefs:aBool
|
|
1247 |
tagList hideTypedefs:aBool.
|
|
1248 |
self updateTagList
|
|
1249 |
!
|
|
1250 |
|
|
1251 |
hideVariables
|
|
1252 |
^ tagList hideVariables
|
|
1253 |
!
|
|
1254 |
|
|
1255 |
hideVariables:aBool
|
|
1256 |
tagList hideVariables:aBool.
|
|
1257 |
self updateTagList
|
|
1258 |
!
|
|
1259 |
|
|
1260 |
javaClassesAndMethodsOnly
|
|
1261 |
^ tagList javaClassesAndMethodsOnly
|
|
1262 |
!
|
|
1263 |
|
|
1264 |
javaClassesAndMethodsOnly:aBool
|
|
1265 |
aBool ifTrue:[
|
|
1266 |
tagList hideJavaClasses:false.
|
|
1267 |
tagList hideJavaMethods:false.
|
|
1268 |
].
|
|
1269 |
tagList javaClassesAndMethodsOnly:aBool.
|
|
1270 |
self updateTagList
|
|
1271 |
!
|
|
1272 |
|
|
1273 |
javaClassesOnly
|
|
1274 |
^ tagList javaClassesOnly
|
|
1275 |
!
|
|
1276 |
|
|
1277 |
javaClassesOnly:aBool
|
|
1278 |
aBool ifTrue:[
|
|
1279 |
tagList hideJavaClasses:false.
|
|
1280 |
].
|
|
1281 |
tagList javaClassesOnly:aBool.
|
|
1282 |
self updateTagList
|
|
1283 |
!
|
|
1284 |
|
|
1285 |
javaMethodsOnly
|
|
1286 |
^ tagList javaMethodsOnly
|
|
1287 |
!
|
|
1288 |
|
|
1289 |
javaMethodsOnly:aBool
|
|
1290 |
aBool ifTrue:[
|
|
1291 |
tagList hideJavaMethods:false.
|
|
1292 |
].
|
|
1293 |
tagList javaMethodsOnly:aBool.
|
|
1294 |
self updateTagList
|
|
1295 |
!
|
|
1296 |
|
|
1297 |
macrosOnly
|
|
1298 |
^ tagList macrosOnly
|
|
1299 |
|
|
1300 |
"Created: / 07-06-2010 / 12:08:42 / cg"
|
|
1301 |
!
|
|
1302 |
|
|
1303 |
macrosOnly:aBool
|
|
1304 |
aBool ifTrue:[
|
|
1305 |
tagList hideLispMacros:false.
|
|
1306 |
].
|
|
1307 |
tagList macrosOnly:aBool.
|
|
1308 |
self updateTagList
|
|
1309 |
|
|
1310 |
"Created: / 07-06-2010 / 12:09:08 / cg"
|
|
1311 |
!
|
|
1312 |
|
|
1313 |
methodsOnly
|
|
1314 |
^ tagList methodsOnly
|
|
1315 |
|
|
1316 |
"Created: / 07-06-2010 / 12:11:55 / cg"
|
|
1317 |
!
|
|
1318 |
|
|
1319 |
methodsOnly:aBool
|
|
1320 |
aBool ifTrue:[
|
|
1321 |
tagList hideLispMethods:false.
|
|
1322 |
].
|
|
1323 |
tagList methodsOnly:aBool.
|
|
1324 |
self updateTagList
|
|
1325 |
|
|
1326 |
"Created: / 07-06-2010 / 12:12:03 / cg"
|
|
1327 |
!
|
|
1328 |
|
|
1329 |
pythonClassesOnly
|
|
1330 |
^ tagList pythonClassesOnly
|
|
1331 |
!
|
|
1332 |
|
|
1333 |
pythonClassesOnly:aBool
|
|
1334 |
aBool ifTrue:[
|
|
1335 |
tagList hidePythonClasses:false.
|
|
1336 |
].
|
|
1337 |
tagList pythonClassesOnly:aBool.
|
|
1338 |
self updateTagList
|
|
1339 |
!
|
|
1340 |
|
|
1341 |
pythonFunctionsOnly
|
|
1342 |
^ tagList pythonFunctionsOnly
|
|
1343 |
!
|
|
1344 |
|
|
1345 |
pythonFunctionsOnly:aBool
|
|
1346 |
aBool ifTrue:[
|
|
1347 |
tagList hidePythonFunctions:false.
|
|
1348 |
].
|
|
1349 |
tagList pythonFunctionsOnly:aBool.
|
|
1350 |
self updateTagList
|
|
1351 |
!
|
|
1352 |
|
|
1353 |
pythonMethodsOnly
|
|
1354 |
^ tagList pythonMethodsOnly
|
|
1355 |
!
|
|
1356 |
|
|
1357 |
pythonMethodsOnly:aBool
|
|
1358 |
aBool ifTrue:[
|
|
1359 |
tagList hidePythonMethods:false.
|
|
1360 |
].
|
|
1361 |
tagList pythonMethodsOnly:aBool.
|
|
1362 |
self updateTagList
|
|
1363 |
!
|
|
1364 |
|
|
1365 |
structsOnly
|
|
1366 |
^ tagList structsOnly
|
|
1367 |
|
|
1368 |
"Created: / 25-06-2010 / 10:54:46 / cg"
|
|
1369 |
!
|
|
1370 |
|
|
1371 |
structsOnly:aBool
|
|
1372 |
tagList structsOnly:aBool.
|
|
1373 |
self updateTagList
|
|
1374 |
|
|
1375 |
"Created: / 25-06-2010 / 10:54:52 / cg"
|
|
1376 |
!
|
|
1377 |
|
|
1378 |
tagTypesPresent
|
|
1379 |
^ tagList tagTypesPresent
|
|
1380 |
!
|
|
1381 |
|
|
1382 |
tagTypesPresentHolder
|
|
1383 |
^ [ self tagTypesPresent ]
|
|
1384 |
!
|
|
1385 |
|
|
1386 |
targetsOnly
|
|
1387 |
^ tagList targetsOnly
|
|
1388 |
!
|
|
1389 |
|
|
1390 |
targetsOnly:aBool
|
|
1391 |
tagList targetsOnly:aBool.
|
|
1392 |
self updateTagList
|
|
1393 |
!
|
|
1394 |
|
|
1395 |
typesOnly
|
|
1396 |
^ tagList typesOnly
|
|
1397 |
!
|
|
1398 |
|
|
1399 |
typesOnly:aBool
|
|
1400 |
aBool ifTrue:[
|
|
1401 |
tagList hideTypedefs:false.
|
|
1402 |
].
|
|
1403 |
tagList typesOnly:aBool.
|
|
1404 |
self updateTagList
|
|
1405 |
!
|
|
1406 |
|
|
1407 |
variablesOnly
|
|
1408 |
^ tagList variablesOnly
|
|
1409 |
!
|
|
1410 |
|
|
1411 |
variablesOnly:aBool
|
|
1412 |
aBool ifTrue:[
|
|
1413 |
tagList hideVariables:false.
|
|
1414 |
].
|
|
1415 |
tagList variablesOnly:aBool.
|
|
1416 |
self updateTagList
|
|
1417 |
|
|
1418 |
"Modified: / 05-05-2011 / 15:33:18 / cg"
|
|
1419 |
! !
|
|
1420 |
|
|
1421 |
!TagsBrowser methodsFor:'accessing presentation aspects'!
|
|
1422 |
|
|
1423 |
action:aOneArgTheTag
|
|
1424 |
"set the action, which is called with the selected tag
|
|
1425 |
"
|
|
1426 |
action := aOneArgTheTag.
|
|
1427 |
!
|
|
1428 |
|
|
1429 |
groupedByType
|
|
1430 |
^ tagList groupedByType
|
|
1431 |
|
|
1432 |
"Created: / 05-05-2011 / 14:51:29 / cg"
|
|
1433 |
!
|
|
1434 |
|
|
1435 |
groupedByType:aBool
|
|
1436 |
tagList groupedByType:aBool
|
|
1437 |
|
|
1438 |
"Created: / 05-05-2011 / 14:51:33 / cg"
|
|
1439 |
!
|
|
1440 |
|
|
1441 |
sorted
|
|
1442 |
^ tagList sorted
|
|
1443 |
!
|
|
1444 |
|
|
1445 |
sorted:aBool
|
|
1446 |
tagList sorted:aBool
|
|
1447 |
!
|
|
1448 |
|
|
1449 |
sortedByLineNumber
|
|
1450 |
^ tagList sortedByLineNumber
|
|
1451 |
!
|
|
1452 |
|
|
1453 |
sortedByLineNumber:aBool
|
|
1454 |
tagList sortedByLineNumber:aBool
|
|
1455 |
!
|
|
1456 |
|
|
1457 |
sortedByName
|
|
1458 |
^ tagList sortedByName
|
|
1459 |
!
|
|
1460 |
|
|
1461 |
sortedByName:aBool
|
|
1462 |
tagList sortedByName:aBool
|
|
1463 |
!
|
|
1464 |
|
|
1465 |
sortedByNameIgnoringCase
|
|
1466 |
^ tagList sortedByNameIgnoringCase
|
|
1467 |
!
|
|
1468 |
|
|
1469 |
sortedByNameIgnoringCase:aBool
|
|
1470 |
tagList sortedByNameIgnoringCase:aBool
|
|
1471 |
!
|
|
1472 |
|
|
1473 |
sortedByNameIgnoringLeadingUnderscores
|
|
1474 |
^ tagList sortedByNameIgnoringLeadingUnderscores
|
|
1475 |
!
|
|
1476 |
|
|
1477 |
sortedByNameIgnoringLeadingUnderscores:aBool
|
|
1478 |
tagList sortedByNameIgnoringLeadingUnderscores:aBool
|
|
1479 |
!
|
|
1480 |
|
|
1481 |
sortedByNameIgnoringLeadingUnderscoresAndCase
|
|
1482 |
^ tagList sortedByNameIgnoringLeadingUnderscoresAndCase
|
|
1483 |
!
|
|
1484 |
|
|
1485 |
sortedByNameIgnoringLeadingUnderscoresAndCase:aBool
|
|
1486 |
tagList sortedByNameIgnoringLeadingUnderscoresAndCase:aBool
|
|
1487 |
!
|
|
1488 |
|
|
1489 |
sortedByType
|
|
1490 |
^ tagList sortedByType
|
|
1491 |
!
|
|
1492 |
|
|
1493 |
sortedByType:aBool
|
|
1494 |
tagList sortedByType:aBool
|
|
1495 |
! !
|
|
1496 |
|
|
1497 |
!TagsBrowser methodsFor:'aspects'!
|
|
1498 |
|
|
1499 |
editedFileHasAssemblerSuffix
|
|
1500 |
^builder booleanValueAspectFor: #editedFileHasAssemblerSuffix
|
|
1501 |
|
|
1502 |
|
|
1503 |
!
|
|
1504 |
|
|
1505 |
editedFileHasCSuffix
|
|
1506 |
^builder booleanValueAspectFor: #editedFileHasCSuffix
|
|
1507 |
|
|
1508 |
|
|
1509 |
!
|
|
1510 |
|
|
1511 |
editedFileHasEiffelSuffix
|
|
1512 |
^builder booleanValueAspectFor: #editedFileHasEiffelSuffix
|
|
1513 |
|
|
1514 |
|
|
1515 |
!
|
|
1516 |
|
|
1517 |
editedFileHasFortranSuffix
|
|
1518 |
^builder booleanValueAspectFor: #editedFileHasFortranSuffix
|
|
1519 |
|
|
1520 |
|
|
1521 |
!
|
|
1522 |
|
|
1523 |
editedFileHasJavaScriptSuffix
|
|
1524 |
^builder booleanValueAspectFor: #editedFileHasJavaScriptSuffix
|
|
1525 |
|
|
1526 |
"Created: / 28-06-2010 / 13:09:15 / cg"
|
|
1527 |
!
|
|
1528 |
|
|
1529 |
editedFileHasJavaSuffix
|
|
1530 |
^builder booleanValueAspectFor: #editedFileHasJavaSuffix
|
|
1531 |
|
|
1532 |
|
|
1533 |
!
|
|
1534 |
|
|
1535 |
editedFileHasLispSuffix
|
|
1536 |
^builder booleanValueAspectFor: #editedFileHasLispSuffix
|
|
1537 |
|
|
1538 |
|
|
1539 |
!
|
|
1540 |
|
|
1541 |
editedFileHasOzSuffix
|
|
1542 |
^builder booleanValueAspectFor: #editedFileHasOzSuffix
|
|
1543 |
!
|
|
1544 |
|
|
1545 |
editedFileHasPythonSuffix
|
|
1546 |
^builder booleanValueAspectFor: #editedFileHasPythonSuffix
|
|
1547 |
|
|
1548 |
|
|
1549 |
!
|
|
1550 |
|
|
1551 |
editedFileHasRubySuffix
|
|
1552 |
^builder booleanValueAspectFor: #editedFileHasRubySuffix
|
|
1553 |
!
|
|
1554 |
|
|
1555 |
editedFileHasSmalltalkSuffix
|
|
1556 |
^builder booleanValueAspectFor: #editedFileHasSmalltalkSuffix
|
|
1557 |
|
|
1558 |
|
|
1559 |
!
|
|
1560 |
|
|
1561 |
editedFileHasTCLSuffix
|
|
1562 |
^builder booleanValueAspectFor: #editedFileHasTCLSuffix
|
|
1563 |
|
|
1564 |
|
|
1565 |
!
|
|
1566 |
|
|
1567 |
editedFileIsMakefile
|
|
1568 |
^builder booleanValueAspectFor: #editedFileIsMakefile
|
|
1569 |
!
|
|
1570 |
|
|
1571 |
remoteCtagsModel
|
|
1572 |
|
|
1573 |
|holder|
|
|
1574 |
|
|
1575 |
(holder := builder bindingAt:#remoteCtagsModel) isNil ifTrue:[
|
|
1576 |
holder := false asValue.
|
|
1577 |
builder aspectAt:#remoteCtagsModel put:holder.
|
|
1578 |
].
|
|
1579 |
^ holder.
|
|
1580 |
!
|
|
1581 |
|
|
1582 |
tagList
|
|
1583 |
"returns the tagList
|
|
1584 |
"
|
|
1585 |
^ tagList
|
|
1586 |
!
|
|
1587 |
|
|
1588 |
tagView
|
|
1589 |
"returns the widget which shows the tags
|
|
1590 |
"
|
|
1591 |
^ tagView
|
|
1592 |
! !
|
|
1593 |
|
|
1594 |
!TagsBrowser methodsFor:'change & update'!
|
|
1595 |
|
|
1596 |
editedFileChanged
|
|
1597 |
"called when the current editing file has changed.
|
|
1598 |
Update the valueHolders which keep track of the edited files type (i.e. language)
|
|
1599 |
"
|
|
1600 |
|
|
1601 |
self updateFileTypeHolders.
|
|
1602 |
self updateTagList.
|
|
1603 |
!
|
|
1604 |
|
|
1605 |
update:something with:aparameter from:changedObject
|
|
1606 |
changedObject == self editedFileHolder ifTrue:[
|
|
1607 |
tagList removeAll.
|
|
1608 |
].
|
|
1609 |
super update:something with:aparameter from:changedObject
|
|
1610 |
!
|
|
1611 |
|
|
1612 |
updateFileTypeHolders
|
|
1613 |
"called when the current editing file has changed.
|
|
1614 |
Update the valueHolders which keep track of the edited files type (i.e. language)
|
|
1615 |
"
|
|
1616 |
|
|
1617 |
|edFile suffix mime|
|
|
1618 |
|
|
1619 |
(edFile := self editedFile) notNil ifTrue:[
|
|
1620 |
suffix := edFile suffix.
|
|
1621 |
].
|
|
1622 |
|
|
1623 |
mime := TagList tagMimeTypeForFile:edFile.
|
|
1624 |
|
|
1625 |
"/ valueHolder mime(s)
|
|
1626 |
#(
|
|
1627 |
(editedFileHasJavaSuffix 'text/java' )
|
|
1628 |
(editedFileHasJavaScriptSuffix ('text/javaScript' 'text/javascript' 'application/x-javascript') )
|
|
1629 |
(editedFileHasCSuffix 'text/c')
|
|
1630 |
(editedFileHasEiffelSuffix 'text/eiffel')
|
|
1631 |
(editedFileHasFortranSuffix 'text/fortran')
|
|
1632 |
(editedFileHasPythonSuffix 'text/python')
|
|
1633 |
(editedFileHasOzSuffix 'text/oz')
|
|
1634 |
(editedFileHasLispSuffix ('text/lisp' 'text/lisp-arc' 'text/scheme') )
|
|
1635 |
(editedFileHasSmalltalkSuffix 'text/smalltalk')
|
|
1636 |
(editedFileHasTCLSuffix 'text/tcl')
|
|
1637 |
(editedFileHasAssemblerSuffix 'text/asm')
|
|
1638 |
(editedFileIsMakefile 'text/make')
|
|
1639 |
(editedFileHasRubySuffix 'text/ruby')
|
|
1640 |
) pairsDo:[:holderName :mimeTypeOrTypes |
|
|
1641 |
|holder|
|
|
1642 |
|
|
1643 |
holder := self perform:holderName.
|
|
1644 |
mimeTypeOrTypes isString ifTrue:[
|
|
1645 |
holder value:(mime = mimeTypeOrTypes)
|
|
1646 |
] ifFalse:[
|
|
1647 |
holder value:(mimeTypeOrTypes includes:mime)
|
|
1648 |
].
|
|
1649 |
].
|
|
1650 |
|
|
1651 |
"Modified: / 28-06-2010 / 17:11:05 / cg"
|
|
1652 |
! !
|
|
1653 |
|
|
1654 |
!TagsBrowser methodsFor:'menu actions'!
|
|
1655 |
|
|
1656 |
middleButtonMenu
|
|
1657 |
^ [
|
|
1658 |
|menu suffix file item|
|
|
1659 |
|
|
1660 |
menus isNil ifTrue:[
|
|
1661 |
menus := IdentityDictionary new.
|
|
1662 |
].
|
|
1663 |
|
|
1664 |
menu := nil.
|
|
1665 |
|
|
1666 |
(file := self editedFile) notNil ifTrue:[
|
|
1667 |
(tagList supportsFile:file) ifTrue:[
|
|
1668 |
menu := menus at:#exists ifAbsentPut:[
|
|
1669 |
menu := self class middleButtonMenu decodeAsLiteralArray.
|
|
1670 |
menu receiver:self.
|
|
1671 |
menu findGuiResourcesIn:self.
|
|
1672 |
menu
|
|
1673 |
].
|
|
1674 |
menu := MenuPanel menu:menu receiver:self.
|
|
1675 |
] ifFalse:[
|
|
1676 |
suffix := file suffix.
|
|
1677 |
|
|
1678 |
suffix size ~~ 0 ifTrue:[
|
|
1679 |
menu := menus at:#new ifAbsentPut:[
|
|
1680 |
menu := Menu new.
|
|
1681 |
item := MenuItem label:('assign ', (Text string:suffix emphasis:#underline), ' to:').
|
|
1682 |
item enabled:false.
|
|
1683 |
menu addItem:item.
|
|
1684 |
menu addItem:(MenuItem label:'-').
|
|
1685 |
|
|
1686 |
tagList class tagsSuffixes keysAndValuesDo:[:aKey :aValue|
|
|
1687 |
item := MenuItem label:(' - ', aKey )
|
|
1688 |
value:[ |list|
|
|
1689 |
list := aValue asOrderedCollection.
|
|
1690 |
list add:(suffix asLowercase).
|
|
1691 |
tagList class tagsSuffixes at:aKey put:list.
|
|
1692 |
self editedFileChanged.
|
|
1693 |
].
|
|
1694 |
menu addItem:item.
|
|
1695 |
].
|
|
1696 |
menu
|
|
1697 |
].
|
|
1698 |
|
|
1699 |
]
|
|
1700 |
].
|
|
1701 |
].
|
|
1702 |
menu
|
|
1703 |
]
|
|
1704 |
!
|
|
1705 |
|
|
1706 |
updateTagList
|
|
1707 |
"reload tags
|
|
1708 |
"
|
|
1709 |
|file target|
|
|
1710 |
|
|
1711 |
( (self tagsVisibilityHolder value == true)
|
|
1712 |
and:[(file := self editedFile) notNil
|
|
1713 |
and:[tagList supportsFile:file]]
|
|
1714 |
) ifTrue:[
|
|
1715 |
(target := self buildTarget) notNil ifTrue:[
|
|
1716 |
(target isRemote and:[self tagsRemoteHolder value]) ifFalse:[
|
|
1717 |
target := nil
|
|
1718 |
]
|
|
1719 |
].
|
|
1720 |
tagView generateTagsFor:file onTarget:target
|
|
1721 |
] ifFalse:[
|
|
1722 |
tagView stopGeneratingTags
|
|
1723 |
].
|
|
1724 |
! !
|
|
1725 |
|
|
1726 |
!TagsBrowser methodsFor:'misc'!
|
|
1727 |
|
|
1728 |
updateForLine:lineNr
|
|
1729 |
"/ highlight the tag for a particular line ...
|
|
1730 |
|
|
1731 |
|bestTag|
|
|
1732 |
|
|
1733 |
bestTag := tagList bestTagForLine:lineNr.
|
|
1734 |
bestTag notNil ifTrue:[
|
|
1735 |
tagView setSelection:(tagList identityIndexOf:bestTag).
|
|
1736 |
] ifFalse:[
|
|
1737 |
"/ remember line in case the tag-list is being generated
|
|
1738 |
tagView tagLineNr:lineNr
|
|
1739 |
].
|
|
1740 |
! !
|
|
1741 |
|
|
1742 |
!TagsBrowser methodsFor:'startup & release'!
|
|
1743 |
|
|
1744 |
cloneWith:anApplication
|
|
1745 |
|browser|
|
|
1746 |
|
|
1747 |
(browser := anApplication tagsBrowser) notNil ifTrue:[
|
|
1748 |
self tagsVisibilityHolder value:(browser tagsVisibilityHolder value)
|
|
1749 |
]
|
|
1750 |
!
|
|
1751 |
|
|
1752 |
initialize
|
|
1753 |
super initialize.
|
|
1754 |
|
|
1755 |
tagList := TagList new.
|
|
1756 |
tagView := TagView new.
|
|
1757 |
|
|
1758 |
tagView application:self.
|
|
1759 |
tagView list:tagList.
|
|
1760 |
|
|
1761 |
tagView action:[:i| |tag|
|
|
1762 |
action notNil ifTrue:[
|
|
1763 |
tag := tagList at:i ifAbsent:nil.
|
|
1764 |
tag notNil ifTrue:[ action value:tag ].
|
|
1765 |
]
|
|
1766 |
].
|
|
1767 |
! !
|
|
1768 |
|
|
1769 |
!TagsBrowser::TagView methodsFor:'accessing'!
|
|
1770 |
|
|
1771 |
application
|
|
1772 |
"returns my application, the TagsBrowser
|
|
1773 |
"
|
|
1774 |
^ application
|
|
1775 |
!
|
|
1776 |
|
|
1777 |
application:theTagsBrowser
|
|
1778 |
"set my application, the TagsBrowser
|
|
1779 |
"
|
|
1780 |
application := theTagsBrowser.
|
|
1781 |
!
|
|
1782 |
|
|
1783 |
filter:aString
|
|
1784 |
filter := aString.
|
|
1785 |
list filter:aString.
|
|
1786 |
!
|
|
1787 |
|
|
1788 |
tagLineNr:lineNr
|
|
1789 |
"remember line nr for which a tag should be highlighted.
|
|
1790 |
(will set my selection late, when the taglist is available"
|
|
1791 |
|
|
1792 |
tagLineNr := lineNr
|
|
1793 |
! !
|
|
1794 |
|
|
1795 |
!TagsBrowser::TagView methodsFor:'drawing'!
|
|
1796 |
|
|
1797 |
drawLabelAt:anIndex x:x y:y h:h
|
|
1798 |
"draw the label at position x/y without clearing the background
|
|
1799 |
"
|
|
1800 |
|item label type
|
|
1801 |
y0 "{ Class: SmallInteger }"
|
|
1802 |
|
|
|
1803 |
item := list at:anIndex ifAbsent:nil.
|
|
1804 |
item isNil ifTrue:[^ self].
|
|
1805 |
|
|
1806 |
self paint:fgColor on:bgColor.
|
|
1807 |
|
|
1808 |
label := item printString.
|
|
1809 |
y0 := y - ((font height) + 1 - h // 2) + font ascent.
|
|
1810 |
type := item typeIdentifierInList.
|
|
1811 |
|
|
1812 |
type notNil ifTrue:[
|
|
1813 |
type := Text string:type emphasis:#bold.
|
|
1814 |
type displayOn:self x:x y:y0.
|
|
1815 |
].
|
|
1816 |
(self isInSelection:anIndex) ifTrue:[
|
|
1817 |
self paint:hilightFgColor on:hilightBgColor
|
|
1818 |
].
|
|
1819 |
label displayOn:self x:(x + TypeInset) y:y0
|
|
1820 |
!
|
|
1821 |
|
|
1822 |
drawSelectionFrameAt:lnNr x:x w:w
|
|
1823 |
"draw the background and foreground of the selection frame
|
|
1824 |
at a lineNr.
|
|
1825 |
"
|
|
1826 |
|item
|
|
1827 |
x0 "{ Class:SmallInteger }"
|
|
1828 |
x1 "{ Class: SmallInteger }"
|
|
1829 |
y0 "{ Class:SmallInteger }"
|
|
1830 |
y1 "{ Class:SmallInteger }"
|
|
1831 |
hL "{ Class:SmallInteger }"
|
|
1832 |
wL "{ Class:SmallInteger }"
|
|
1833 |
|
|
|
1834 |
(item := list at:lnNr ifAbsent:nil) isNil ifTrue:[
|
|
1835 |
"/ list might change during drawing; item no longer visible
|
|
1836 |
^ self
|
|
1837 |
].
|
|
1838 |
|
|
1839 |
"/ CLEAR THE BACKGROUND
|
|
1840 |
|
|
1841 |
y0 := self yVisibleOfLine:lnNr.
|
|
1842 |
y1 := self yVisibleOfLine:(lnNr + 1).
|
|
1843 |
hL := y1 - y0.
|
|
1844 |
|
|
1845 |
x0 := textStartLeft - viewOrigin x + TypeInset - 4.
|
|
1846 |
x1 := (self widthOfContents - viewOrigin x) max:(width - margin).
|
|
1847 |
wL := x1 - x0.
|
|
1848 |
|
|
1849 |
wL > 0 ifFalse:[^ self].
|
|
1850 |
|
|
1851 |
self paint:hilightBgColor.
|
|
1852 |
self fillRectangleX:x0 y:y0 width:wL height:hL.
|
|
1853 |
|
|
1854 |
"/ DRAW THE FRAME
|
|
1855 |
|
|
1856 |
hilightFrameColor notNil ifTrue:[
|
|
1857 |
hilightLevel == 0 ifTrue:[
|
|
1858 |
self paint:hilightFrameColor.
|
|
1859 |
self displayRectangleX:x0 y:y0 width:wL height:hL.
|
|
1860 |
^ self.
|
|
1861 |
]
|
|
1862 |
] ifFalse:[
|
|
1863 |
hilightStyle == #motif ifTrue:[
|
|
1864 |
self paint:bgColor.
|
|
1865 |
y1 := y0 + 1.
|
|
1866 |
self displayRectangleX:x0 + 1 y:y1 width:wL - 2 height:hL - 2.
|
|
1867 |
]
|
|
1868 |
].
|
|
1869 |
|
|
1870 |
hilightLevel ~~ 0 ifTrue:[
|
|
1871 |
"/ draw edge
|
|
1872 |
self drawEdgesForX:x0 y:y0 width:wL height:hL level:hilightLevel.
|
|
1873 |
]
|
|
1874 |
! !
|
|
1875 |
|
|
1876 |
!TagsBrowser::TagView methodsFor:'generating tags'!
|
|
1877 |
|
|
1878 |
generateTagsFor:aFile onTarget:aTarget
|
|
1879 |
"generate tags for a file (optionally on a remote target)
|
|
1880 |
"
|
|
1881 |
|tagFile|
|
|
1882 |
|
|
1883 |
Tag autoload.
|
|
1884 |
|
|
1885 |
self stopGeneratingTags.
|
|
1886 |
|
|
1887 |
aFile isNil ifTrue:[
|
|
1888 |
^ self
|
|
1889 |
].
|
|
1890 |
fileName := aFile asFilename.
|
|
1891 |
|
|
1892 |
(tagFile := application changes backupFor:fileName) isNil ifTrue:[
|
|
1893 |
tagFile := fileName.
|
|
1894 |
].
|
|
1895 |
|
|
1896 |
process := [
|
|
1897 |
[
|
|
1898 |
Error handle:[:ex|
|
|
1899 |
Transcript show:'TagGenerator error cought:'; showCR:ex errorString.
|
|
1900 |
ex suspendedContext fullPrintAllOn:Transcript.
|
|
1901 |
(Dialog
|
|
1902 |
confirm:(resources stringWithCRs:'Error encountered while generating tags:\\ %1\\Debug ?' with:ex description)
|
|
1903 |
yesLabel:'Debug'
|
|
1904 |
) ifTrue:[
|
|
1905 |
ex reject
|
|
1906 |
].
|
|
1907 |
] do:[
|
|
1908 |
|bestTag|
|
|
1909 |
|
|
1910 |
self enabled:false.
|
|
1911 |
list add:nil.
|
|
1912 |
list add:(Tag label:('Generating Tags ...' allBold) pattern:nil).
|
|
1913 |
list filter:filter.
|
|
1914 |
|
|
1915 |
list
|
|
1916 |
fromFile:tagFile
|
|
1917 |
in:(application tempDirectory)
|
|
1918 |
onTarget:aTarget.
|
|
1919 |
|
|
1920 |
tagLineNr notNil ifTrue:[
|
|
1921 |
bestTag := list bestTagForLine:tagLineNr.
|
|
1922 |
bestTag notNil ifTrue:[
|
|
1923 |
self setSelection:(list identityIndexOf:bestTag).
|
|
1924 |
].
|
|
1925 |
tagLineNr := nil
|
|
1926 |
].
|
|
1927 |
]
|
|
1928 |
] valueNowOrOnUnwindDo:[
|
|
1929 |
process := nil.
|
|
1930 |
self enabled:true.
|
|
1931 |
].
|
|
1932 |
] forkAt:4.
|
|
1933 |
|
|
1934 |
process priorityRange:(4 to:8).
|
|
1935 |
|
|
1936 |
"Modified: / 05-05-2011 / 14:56:35 / cg"
|
|
1937 |
!
|
|
1938 |
|
|
1939 |
stopGeneratingTags
|
|
1940 |
"stop the process which generates the tags
|
|
1941 |
"
|
|
1942 |
|task|
|
|
1943 |
|
|
1944 |
|
|
1945 |
(task := process) notNil ifTrue:[
|
|
1946 |
process := nil.
|
|
1947 |
|
|
1948 |
Exception handle:[:ex|
|
|
1949 |
] do:[
|
|
1950 |
task terminateWithAllSubprocessesInGroup.
|
|
1951 |
task waitUntilTerminated.
|
|
1952 |
]
|
|
1953 |
].
|
|
1954 |
fileName := nil.
|
|
1955 |
list removeAll.
|
|
1956 |
! !
|
|
1957 |
|
|
1958 |
!TagsBrowser::TagView methodsFor:'initialize & release'!
|
|
1959 |
|
|
1960 |
destroy
|
|
1961 |
self stopGeneratingTags.
|
|
1962 |
super destroy.
|
|
1963 |
!
|
|
1964 |
|
|
1965 |
initialize
|
|
1966 |
|
|
1967 |
TypeInset := 16.
|
|
1968 |
|
|
1969 |
super initialize.
|
|
1970 |
highlightMode := #line.
|
|
1971 |
! !
|
|
1972 |
|
|
1973 |
!TagsBrowser::TagView methodsFor:'protocol'!
|
|
1974 |
|
|
1975 |
heightOfLineAt:aLineNr
|
|
1976 |
"returns the total height for a line at an index( including lineSpacing ... )
|
|
1977 |
"
|
|
1978 |
^ lineSpacing + font height
|
|
1979 |
!
|
|
1980 |
|
|
1981 |
widthOfWidestLineBetween:firstLine and:lastLine
|
|
1982 |
"return the width in pixels of the widest line in a range
|
|
1983 |
"
|
|
1984 |
|width|
|
|
1985 |
|
|
1986 |
width := super widthOfWidestLineBetween:firstLine and:lastLine.
|
|
1987 |
^ width + TypeInset
|
|
1988 |
! !
|
|
1989 |
|
|
1990 |
!TagsBrowser class methodsFor:'documentation'!
|
|
1991 |
|
|
1992 |
version_CVS
|
9907
|
1993 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.2 2011-05-06 11:59:30 cg Exp $'
|
9892
|
1994 |
! !
|