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