author | Claus Gittinger <cg@exept.de> |
Tue, 10 Feb 2015 13:33:51 +0100 | |
changeset 15240 | 086358d71563 |
parent 15220 | 56b706f31930 |
child 15241 | ebe9d2039637 |
permissions | -rw-r--r-- |
9891 | 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 |
||
16 |
List subclass:#TagList |
|
13342 | 17 |
instanceVariableNames:'rawList filteredList filter tagsValidForFile sortCriteria groupBy |
14346 | 18 |
showOnly flags tagTypesPresent usingDefaultCTags ctagsCommand |
19 |
ctagsIsExCtags ctagsIsExCtags5x remoteTarget' |
|
9891 | 20 |
classVariableNames:'Sorted CachedTagListsPerFile DefaultSortCriteria DefaultShowOnly |
21 |
TagsSuffixes DefaultGroupBy' |
|
22 |
poolDictionaries:'' |
|
23 |
category:'Interface-Tools-File-Tags' |
|
24 |
! |
|
25 |
||
26 |
!TagList class methodsFor:'documentation'! |
|
27 |
||
28 |
copyright |
|
29 |
" |
|
30 |
COPYRIGHT (c) 2002 by eXept Software AG |
|
31 |
All Rights Reserved |
|
32 |
||
33 |
This software is furnished under a license and may be used |
|
34 |
only in accordance with the terms of that license and with the |
|
35 |
inclusion of the above copyright notice. This software may not |
|
36 |
be provided or otherwise made available to, or used by, any |
|
37 |
other person. No title to or ownership of the software is |
|
38 |
hereby transferred. |
|
39 |
||
40 |
||
41 |
" |
|
10054 | 42 |
! |
43 |
||
44 |
documentation |
|
45 |
" |
|
46 |
a list of tags as read & generated from parsing a source file. |
|
47 |
For some languages, naive parsing is supported right here; |
|
48 |
for other languages, external tools (ctags) are used. |
|
49 |
The tags are used bz the tagList or to navigate quickly to some |
|
50 |
function in the C-browser. |
|
51 |
" |
|
9891 | 52 |
! ! |
53 |
||
14482 | 54 |
!TagList class methodsFor:'accessing - suffixes'! |
9891 | 55 |
|
56 |
tagsSuffixes |
|
57 |
"flush with: |
|
58 |
TagsSuffixes := nil |
|
59 |
" |
|
60 |
TagsSuffixes notNil ifTrue:[ |
|
61 |
^ TagsSuffixes |
|
62 |
]. |
|
63 |
TagsSuffixes := IdentityDictionary new. |
|
64 |
||
65 |
TagsSuffixes at:#'text/asm' put:#( 's' 'asm' ). |
|
14482 | 66 |
TagsSuffixes at:#'text/c' put:#( 'c' 'h' 'ci' 'hi' 'sc' 'sth'). |
9891 | 67 |
TagsSuffixes at:#'text/cpp' put:#( 'cc' 'cpp' 'cxx' 'c++' 'hxx' 'hpp' 'h++'). |
68 |
TagsSuffixes at:#'text/eiffel' put:#( 'e' 'eif' ). |
|
69 |
TagsSuffixes at:#'text/fortran' put:#( 'f' 'for' 'ftn' 'f77' 'f90' ). |
|
70 |
TagsSuffixes at:#'text/html' put:#( 'htm' 'html'). |
|
14482 | 71 |
TagsSuffixes at:#'text/java' put:#( 'java' 'jav' 'j'). |
9891 | 72 |
TagsSuffixes at:#'text/javaScript' put:#( 'js' ). |
73 |
TagsSuffixes at:#'text/javascript' put:#( 'js' ). |
|
74 |
TagsSuffixes at:#'application/x-javascript' put:#( 'js' ). |
|
11766 | 75 |
TagsSuffixes at:#'text/dart' put:#( 'dart' ). |
76 |
TagsSuffixes at:#'application/x-dart' put:#( 'dart' ). |
|
9891 | 77 |
TagsSuffixes at:#'text/make' put:#( 'makefile' 'make.proto' 'makefile.*' '*.mak' '*.bpr'). |
78 |
TagsSuffixes at:#'text/prolog' put:#( 'pl' ). |
|
79 |
TagsSuffixes at:#'text/python' put:#( 'py' ). |
|
80 |
TagsSuffixes at:#'text/php' put:#( 'php' ). |
|
81 |
TagsSuffixes at:#'text/lisp' put:#( 'lisp' 'el' 'lsp' 'cl'). |
|
82 |
TagsSuffixes at:#'text/lisp-arc' put:#( 'arc' ). |
|
83 |
TagsSuffixes at:#'text/scheme' put:#( 'scm' 'ss' 'brg'). |
|
84 |
TagsSuffixes at:#'text/oz' put:#( 'oz'). |
|
14345 | 85 |
TagsSuffixes at:#'text/lua' put:#( 'lua'). |
9891 | 86 |
TagsSuffixes at:#'text/smalltalk' put:#( 'st' ). |
87 |
TagsSuffixes at:#'text/tcl' put:#( 'tcl' ). |
|
88 |
TagsSuffixes at:#'text/ruby' put:#( 'rb' ). |
|
89 |
TagsSuffixes at:#'text/yacc' put:#( 'y' ). |
|
11825 | 90 |
TagsSuffixes at:#'text/batch' put:#( 'bat' ). |
9891 | 91 |
^ TagsSuffixes |
92 |
||
11825 | 93 |
"Modified: / 28-09-2012 / 14:48:25 / cg" |
9891 | 94 |
! ! |
95 |
||
96 |
!TagList class methodsFor:'defaults'! |
|
97 |
||
98 |
arcLispSuffixes |
|
99 |
"returns a list of supported arc-lisp-suffixes" |
|
100 |
||
101 |
^ self tagsSuffixes at:#'text/lisp-arc' |
|
102 |
! |
|
103 |
||
104 |
assemblerSuffixes |
|
105 |
"returns a list of supported assembler-suffixes" |
|
106 |
||
107 |
^ self tagsSuffixes at:#'text/asm' |
|
108 |
! |
|
109 |
||
11825 | 110 |
batchSuffixes |
111 |
"returns a list of supported batchfile-suffixes |
|
112 |
" |
|
113 |
^ self tagsSuffixes at:#'text/batch' |
|
114 |
||
115 |
"Created: / 28-09-2012 / 14:48:41 / cg" |
|
116 |
! |
|
117 |
||
9891 | 118 |
cPlusPlusSuffixes |
119 |
"returns a list of supported c-suffixes" |
|
120 |
||
121 |
^ self tagsSuffixes at:#'text/cpp' |
|
122 |
! |
|
123 |
||
124 |
cSuffixes |
|
125 |
"returns a list of supported c-suffixes" |
|
126 |
||
127 |
^ self tagsSuffixes at:#'text/c' |
|
128 |
! |
|
129 |
||
130 |
commonLispSuffixes |
|
131 |
"returns a list of supported common-lisp-suffixes" |
|
132 |
||
133 |
^ self tagsSuffixes at:#'text/lisp' |
|
134 |
! |
|
135 |
||
11766 | 136 |
dartSuffixes |
137 |
"returns a list of supported dart-suffixes" |
|
138 |
||
139 |
^ self tagsSuffixes at:#'text/dart' |
|
140 |
||
141 |
"Created: / 22-08-2012 / 21:01:32 / cg" |
|
142 |
! |
|
143 |
||
9891 | 144 |
eiffelSuffixes |
145 |
"returns a list of supported eiffel-suffixes |
|
146 |
" |
|
147 |
^ self tagsSuffixes at:#'text/eiffel' |
|
148 |
! |
|
149 |
||
150 |
fortranSuffixes |
|
151 |
"returns a list of supported fortran-suffixes |
|
152 |
" |
|
153 |
^ self tagsSuffixes at:#'text/fortran' |
|
154 |
! |
|
155 |
||
156 |
htmlSuffixes |
|
157 |
"returns a list of supported html-suffixes |
|
158 |
" |
|
159 |
^ self tagsSuffixes at:#'text/html' |
|
160 |
||
161 |
"Created: / 20-04-2011 / 19:03:39 / cg" |
|
162 |
! |
|
163 |
||
164 |
isTagSearchableSuffix:aSuffix |
|
165 |
"returns true, if aSuffix looks ok for ctags |
|
166 |
" |
|
167 |
self tagsSuffixes keysAndValuesDo:[:tag :suffixes | |
|
168 |
(suffixes includes:aSuffix) ifTrue:[^ true]. |
|
169 |
]. |
|
170 |
"/ (self cSuffixes includes:aSuffix) ifTrue:[^ true]. |
|
171 |
"/ (self javaSuffixes includes:aSuffix) ifTrue:[^ true]. |
|
172 |
"/ (self fortranSuffixes includes:aSuffix) ifTrue:[^ true]. |
|
173 |
"/ (self eiffelSuffixes includes:aSuffix) ifTrue:[^ true]. |
|
174 |
"/ (self commonLispSuffixes includes:aSuffix) ifTrue:[^ true]. |
|
175 |
"/ (self schemeSuffixes includes:aSuffix) ifTrue:[^ true]. |
|
176 |
^ false |
|
177 |
! |
|
178 |
||
179 |
javaScriptSuffixes |
|
180 |
"returns a list of supported javaScript-suffixes" |
|
181 |
||
182 |
^ self tagsSuffixes at:#'text/javaScript' |
|
183 |
||
184 |
"Created: / 28-06-2010 / 12:44:58 / cg" |
|
185 |
! |
|
186 |
||
187 |
javaSuffixes |
|
188 |
"returns a list of supported java-suffixes |
|
189 |
" |
|
190 |
^ self tagsSuffixes at:#'text/java' |
|
191 |
! |
|
192 |
||
14345 | 193 |
luaSuffixes |
194 |
"returns a list of supported lua-suffixes |
|
195 |
" |
|
196 |
^ self tagsSuffixes at:#'text/lua' |
|
197 |
! |
|
198 |
||
9891 | 199 |
makeFilePatterns |
200 |
"returns a list of makefile match patterns |
|
201 |
" |
|
202 |
^ self tagsSuffixes at:#'text/make' |
|
203 |
! |
|
204 |
||
205 |
ozSuffixes |
|
206 |
"returns a list of supported oz-suffixes |
|
207 |
" |
|
208 |
^ self tagsSuffixes at:#'text/oz' |
|
209 |
! |
|
210 |
||
211 |
phpSuffixes |
|
212 |
"returns a list of supported php-suffixes" |
|
213 |
||
214 |
^ self tagsSuffixes at:#'text/php' |
|
215 |
! |
|
216 |
||
10840 | 217 |
pltSchemeLispSuffixes |
218 |
^ #('plt') |
|
219 |
||
220 |
"Created: / 21-10-2011 / 09:32:20 / cg" |
|
221 |
! |
|
222 |
||
9891 | 223 |
prologSuffixes |
224 |
"returns a list of supported prolog-suffixes |
|
225 |
" |
|
226 |
^ self tagsSuffixes at:#'text/prolog' |
|
227 |
! |
|
228 |
||
229 |
pythonSuffixes |
|
230 |
"returns a list of supported python-suffixes |
|
231 |
" |
|
232 |
^ self tagsSuffixes at:#'text/python' |
|
233 |
! |
|
234 |
||
10840 | 235 |
racketSchemeLispSuffixes |
236 |
^ #('rkt') |
|
237 |
||
238 |
"Created: / 21-10-2011 / 09:32:27 / cg" |
|
239 |
! |
|
240 |
||
9891 | 241 |
rubySuffixes |
242 |
"returns a list of supported ruby-suffixes |
|
243 |
" |
|
244 |
^ self tagsSuffixes at:#'text/ruby' |
|
245 |
! |
|
246 |
||
247 |
schemeSuffixes |
|
248 |
"returns a list of supported scheme-lisp-suffixes |
|
249 |
" |
|
250 |
^ self tagsSuffixes at:#'text/scheme' |
|
251 |
! |
|
252 |
||
253 |
smalltalkSuffixes |
|
254 |
"returns a list of supported smalltalk-suffixes |
|
255 |
" |
|
256 |
^ self tagsSuffixes at:#'text/smalltalk' |
|
257 |
! |
|
258 |
||
259 |
tclSuffixes |
|
260 |
"returns a list of supported tcl-suffixes |
|
261 |
" |
|
262 |
^ self tagsSuffixes at:#'text/tcl' |
|
263 |
! |
|
264 |
||
265 |
yaccSuffixes |
|
266 |
"returns a list of supported yacc-suffixes |
|
267 |
" |
|
268 |
^ self tagsSuffixes at:#'text/yacc' |
|
269 |
! ! |
|
270 |
||
271 |
!TagList class methodsFor:'queries'! |
|
272 |
||
273 |
isArcLispSuffix:suffix |
|
274 |
^ self isSuffix:suffix in:self arcLispSuffixes |
|
275 |
! |
|
276 |
||
277 |
isAssemblerSuffix:suffix |
|
278 |
^ self isSuffix:suffix in:self assemblerSuffixes |
|
279 |
! |
|
280 |
||
11825 | 281 |
isBatchSuffix:suffix |
282 |
^ self isSuffix:suffix in:self batchSuffixes |
|
283 |
||
284 |
"Created: / 28-09-2012 / 14:47:43 / cg" |
|
285 |
! |
|
286 |
||
14481 | 287 |
isCOrCPlusPlusSuffix:suffix |
288 |
^ (self isCSuffix:suffix) or:[self isCPlusPlusSuffix:suffix] |
|
289 |
! |
|
290 |
||
9891 | 291 |
isCPlusPlusSuffix:suffix |
292 |
^ self isSuffix:suffix in:self cPlusPlusSuffixes |
|
293 |
! |
|
294 |
||
295 |
isCSuffix:suffix |
|
296 |
^ self isSuffix:suffix in:self cSuffixes |
|
297 |
! |
|
298 |
||
299 |
isCommonLispSuffix:suffix |
|
300 |
^ self isSuffix:suffix in:self commonLispSuffixes |
|
301 |
! |
|
302 |
||
11766 | 303 |
isDartSuffix:suffix |
304 |
^ self isSuffix:suffix in:self dartSuffixes |
|
305 |
||
306 |
"Created: / 22-08-2012 / 21:01:10 / cg" |
|
307 |
! |
|
308 |
||
9891 | 309 |
isEiffelSuffix:suffix |
310 |
^ self isSuffix:suffix in:self eiffelSuffixes |
|
311 |
! |
|
312 |
||
313 |
isFortranSuffix:suffix |
|
314 |
^ self isSuffix:suffix in:self fortranSuffixes |
|
315 |
! |
|
316 |
||
317 |
isHTMLSuffix:suffix |
|
318 |
^ self isSuffix:suffix in:self htmlSuffixes |
|
319 |
||
320 |
"Created: / 20-04-2011 / 19:03:26 / cg" |
|
321 |
! |
|
322 |
||
323 |
isJavaScriptSuffix:suffix |
|
324 |
^ self isSuffix:suffix in:self javaScriptSuffixes |
|
325 |
||
326 |
"Created: / 28-06-2010 / 12:44:47 / cg" |
|
327 |
! |
|
328 |
||
329 |
isJavaSuffix:suffix |
|
330 |
^ self isSuffix:suffix in:self javaSuffixes |
|
331 |
! |
|
332 |
||
333 |
isLispSuffix:suffix |
|
334 |
^ (self isCommonLispSuffix:suffix) |
|
335 |
or:[(self isSchemeSuffix:suffix) |
|
10840 | 336 |
or:[(self isArcLispSuffix:suffix) |
337 |
or:[(self isPltSchemeLispSuffix:suffix) |
|
338 |
or:[(self isRacketSchemeLispSuffix:suffix)]]]] |
|
339 |
||
340 |
"Modified: / 21-10-2011 / 09:31:30 / cg" |
|
9891 | 341 |
! |
342 |
||
14345 | 343 |
isLuaSuffix:suffix |
344 |
^ self isSuffix:suffix in:self luaSuffixes |
|
345 |
! |
|
346 |
||
9891 | 347 |
isMakefileName:fileName |
348 |
|lcName| |
|
349 |
||
350 |
lcName := fileName asFilename baseName asLowercase. |
|
351 |
self makeFilePatterns do:[:aPattern | |
|
352 |
(aPattern match:lcName) ifTrue:[ ^ true ]. |
|
353 |
]. |
|
354 |
^ false |
|
355 |
! |
|
356 |
||
357 |
isOzSuffix:suffix |
|
358 |
^ self isSuffix:suffix in:self ozSuffixes |
|
359 |
! |
|
360 |
||
361 |
isPhpSuffix:suffix |
|
362 |
^ self isSuffix:suffix in:self phpSuffixes |
|
363 |
! |
|
364 |
||
10840 | 365 |
isPltSchemeLispSuffix:suffix |
366 |
^ self isSuffix:suffix in:self pltSchemeLispSuffixes |
|
367 |
||
368 |
"Created: / 21-10-2011 / 09:30:56 / cg" |
|
369 |
! |
|
370 |
||
9891 | 371 |
isPrologSuffix:suffix |
372 |
^ self isSuffix:suffix in:self prologSuffixes |
|
373 |
! |
|
374 |
||
375 |
isPythonSuffix:suffix |
|
376 |
^ self isSuffix:suffix in:self pythonSuffixes |
|
377 |
! |
|
378 |
||
10840 | 379 |
isRacketSchemeLispSuffix:suffix |
380 |
^ self isSuffix:suffix in:self racketSchemeLispSuffixes |
|
381 |
||
382 |
"Created: / 21-10-2011 / 09:31:04 / cg" |
|
383 |
! |
|
384 |
||
9891 | 385 |
isRubySuffix:suffix |
386 |
^ self isSuffix:suffix in:self rubySuffixes |
|
387 |
! |
|
388 |
||
389 |
isSchemeSuffix:suffix |
|
390 |
^ self isSuffix:suffix in:self schemeSuffixes |
|
391 |
! |
|
392 |
||
393 |
isSmalltalkSuffix:suffix |
|
394 |
^ self isSuffix:suffix in:self smalltalkSuffixes |
|
395 |
! |
|
396 |
||
397 |
isTCLSuffix:suffix |
|
398 |
^ self isSuffix:suffix in:self tclSuffixes |
|
399 |
! |
|
400 |
||
401 |
isYaccSuffix:suffix |
|
402 |
^ self isSuffix:suffix in:self yaccSuffixes |
|
403 |
! ! |
|
404 |
||
405 |
!TagList class methodsFor:'queries basic'! |
|
406 |
||
407 |
isSuffix:suffix in:patterns |
|
408 |
|lcSuffix| |
|
409 |
||
410 |
lcSuffix := suffix asLowercase. |
|
411 |
^ patterns contains:[:pattern | pattern match:lcSuffix]. |
|
412 |
! |
|
413 |
||
414 |
tagMimeTypeForFile:aFile |
|
415 |
"returns the tag-mimetype for a file or nil |
|
416 |
" |
|
417 |
|suff file list name mimeMake| |
|
418 |
||
419 |
aFile isNil ifTrue:[^ nil]. |
|
420 |
||
421 |
file := aFile asFilename. |
|
14365 | 422 |
suff := file suffix. |
9891 | 423 |
|
424 |
suff size ~~ 0 ifTrue:[ |
|
425 |
suff := suff asLowercase. |
|
426 |
||
427 |
(suff = 'bak' or:[suff = 'sav']) ifTrue:[ |
|
428 |
file := file asFilename withoutSuffix. |
|
429 |
suff := file suffix. |
|
430 |
suff size ~~ 0 ifTrue:[ |
|
431 |
suff := suff asLowercase |
|
432 |
] |
|
433 |
] |
|
434 |
]. |
|
435 |
list := self tagsSuffixes. |
|
436 |
||
437 |
" hack to test for make-file patterns " |
|
438 |
name := file baseName asLowercase. |
|
439 |
mimeMake := #'text/make'. |
|
440 |
||
441 |
((list at:mimeMake) contains:[:pattern | pattern match:name]) ifTrue:[ |
|
442 |
^ mimeMake |
|
443 |
]. |
|
444 |
||
445 |
self tagsSuffixes keysAndValuesDo:[:mimeType :suffixes| |
|
14365 | 446 |
(suffixes includes:suff) ifTrue:[ |
447 |
^ mimeType |
|
448 |
] |
|
9891 | 449 |
]. |
14365 | 450 |
^ aFile asFilename mimeTypeOfContents |
451 |
"/ ^ nil |
|
9891 | 452 |
! ! |
453 |
||
454 |
!TagList class methodsFor:'tag generation'! |
|
455 |
||
456 |
cachedTagsFromFile:aFilename in:aTempDirectory |
|
457 |
"retrieve a cached tagList for a file" |
|
458 |
||
459 |
|tagList cached fileTime suffix| |
|
460 |
||
461 |
fileTime := aFilename modificationTime. |
|
462 |
||
463 |
CachedTagListsPerFile isNil ifTrue:[ |
|
464 |
CachedTagListsPerFile := Dictionary new. |
|
465 |
]. |
|
466 |
cached := CachedTagListsPerFile at:aFilename ifAbsent:nil. |
|
467 |
cached notNil ifTrue:[ |
|
468 |
fileTime > cached tagTimestamp ifFalse:[ |
|
469 |
^ cached tagList |
|
470 |
] |
|
471 |
]. |
|
472 |
suffix := aFilename suffix. |
|
473 |
||
474 |
"/ ((self isCSuffix:suffix) |
|
475 |
"/ or:[(self isJavaSuffix:suffix) |
|
476 |
"/ or:[(self isFortranSuffix:suffix) |
|
477 |
"/ or:[(self isEiffelSuffix:suffix)]]]) |
|
478 |
"/ ifFalse:[ |
|
479 |
"/ ^ #() |
|
480 |
"/ ]. |
|
481 |
tagList := self new. |
|
482 |
tagList showOnly:nil. |
|
483 |
tagList fromFile:aFilename in:aTempDirectory. |
|
14442 | 484 |
tagList do:[:eachTag | eachTag fileName:aFilename]. |
9891 | 485 |
|
486 |
CachedTagListsPerFile at:aFilename put:(CachedTags new tagList:tagList; tagTimestamp:fileTime; yourself). |
|
487 |
^ tagList |
|
488 |
||
489 |
"Modified: / 07-06-2010 / 12:13:25 / cg" |
|
490 |
! |
|
491 |
||
492 |
cachedTagsFromFile:aFilename in:aTempDirectory buildTargetHandler:aTargetHandler remote:aBoolean |
|
493 |
"retrieve a cached tagList for a file" |
|
494 |
||
495 |
^ self cachedTagsFromFile:aFilename in:aTempDirectory. |
|
496 |
! |
|
497 |
||
498 |
flushCachedTags |
|
499 |
CachedTagListsPerFile := nil |
|
500 |
||
501 |
" |
|
502 |
self flushCachedTags |
|
503 |
" |
|
504 |
! |
|
505 |
||
506 |
makeTargetTagsInFile:aMakefilePath |
|
507 |
"makefile tags: |
|
508 |
naive, q&d scan for lines ending with a colon |
|
509 |
" |
|
510 |
^ self makeTargetTagsInFile:aMakefilePath filter:nil |
|
511 |
! |
|
512 |
||
513 |
makeTargetTagsInFile:aMakefilePath filter:showOnly |
|
514 |
"makefile tags: |
|
515 |
naive, q&d scan for lines ending with a colon |
|
516 |
" |
|
517 |
|targets| |
|
518 |
||
519 |
Tag autoload. |
|
520 |
||
521 |
targets := OrderedCollection new. |
|
522 |
aMakefilePath asFilename contents keysAndValuesDo:[:lnr :line | |
|
523 |
|idxColon idxAssign varName target| |
|
524 |
||
525 |
line size > 0 ifTrue:[ |
|
526 |
line first isSeparator ifFalse:[ |
|
527 |
(line startsWith:$#) ifFalse:[ |
|
528 |
idxAssign := line indexOf:$=. |
|
529 |
idxAssign ~~ 0 ifTrue:[ |
|
530 |
showOnly ~~ #targets ifTrue:[ |
|
531 |
varName := line copyFrom:1 to:idxAssign - 1. |
|
532 |
targets add:(Tag::TVariable |
|
533 |
label:varName |
|
534 |
pattern:('/^',varName,'=') |
|
535 |
type:nil |
|
536 |
lineNumber:lnr) |
|
537 |
] |
|
538 |
] ifFalse:[ |
|
539 |
idxColon := line indexOf:$:. |
|
540 |
idxColon ~~ 0 ifTrue:[ |
|
541 |
target := line copyFrom:1 to:idxColon - 1. |
|
542 |
"/ ignore macro-targets |
|
543 |
||
544 |
(target includes:$$) ifFalse:[ |
|
545 |
(target startsWith:$.) ifFalse:[ |
|
546 |
"/ normal targets |
|
547 |
targets add:(Tag::TMakeTarget |
|
548 |
label:target |
|
549 |
pattern:('/^',target,':') |
|
550 |
type:nil |
|
551 |
lineNumber:lnr) |
|
552 |
] ifTrue:[ |
|
553 |
"/ rule-targets |
|
554 |
targets add:(Tag::TMakeRule |
|
555 |
label:target |
|
556 |
pattern:('/^',target,':') |
|
557 |
type:nil |
|
558 |
lineNumber:lnr) |
|
559 |
] |
|
560 |
] ifTrue:[ |
|
561 |
"/ rule-targets |
|
562 |
targets add:(Tag::TMakeTarget |
|
563 |
label:target |
|
564 |
pattern:('/^',target,':') |
|
565 |
type:nil |
|
566 |
lineNumber:lnr) |
|
567 |
]. |
|
568 |
] |
|
569 |
] |
|
570 |
] |
|
571 |
] |
|
572 |
] |
|
573 |
]. |
|
574 |
^ targets |
|
575 |
! ! |
|
576 |
||
13631 | 577 |
!TagList methodsFor:'accessing'! |
578 |
||
579 |
tagTypesPresent:aBoolean |
|
580 |
tagTypesPresent := aBoolean. |
|
581 |
! ! |
|
582 |
||
9891 | 583 |
!TagList methodsFor:'accessing-filters'! |
584 |
||
14579 | 585 |
anchorsOnly |
586 |
^ showOnly == #anchors |
|
587 |
! |
|
588 |
||
589 |
anchorsOnly:aBoolean |
|
590 |
showOnly := DefaultShowOnly := nil. |
|
591 |
aBoolean ifTrue:[ |
|
592 |
showOnly := "DefaultShowOnly :=" #anchors |
|
593 |
]. |
|
594 |
||
595 |
"Created: / 08-05-2011 / 10:11:39 / cg" |
|
596 |
! |
|
597 |
||
9891 | 598 |
classesFunctionsAndVariablesOnly |
599 |
^ showOnly == #classesFunctionsAndVariables |
|
600 |
||
601 |
"Modified: / 07-06-2010 / 14:18:09 / cg" |
|
602 |
! |
|
603 |
||
604 |
classesFunctionsAndVariablesOnly:aBoolean |
|
605 |
showOnly := nil. |
|
606 |
aBoolean ifTrue:[ |
|
607 |
showOnly := DefaultShowOnly := #classesFunctionsAndVariables |
|
608 |
]. |
|
609 |
||
610 |
"Modified: / 05-05-2011 / 15:21:53 / cg" |
|
611 |
! |
|
612 |
||
613 |
classesOnly |
|
614 |
^ showOnly == #classes |
|
615 |
||
616 |
"Modified: / 07-06-2010 / 14:18:12 / cg" |
|
617 |
! |
|
618 |
||
619 |
classesOnly:aBoolean |
|
620 |
showOnly := nil. |
|
621 |
aBoolean ifTrue:[ |
|
622 |
showOnly := DefaultShowOnly := #classes |
|
623 |
]. |
|
624 |
||
625 |
"Modified: / 05-05-2011 / 15:21:56 / cg" |
|
626 |
! |
|
627 |
||
11762 | 628 |
dartClassesAndMethodsOnly |
629 |
^ showOnly == #dartClassesAndMethods |
|
630 |
||
631 |
"Modified: / 07-06-2010 / 14:18:25 / cg" |
|
632 |
! |
|
633 |
||
634 |
dartClassesAndMethodsOnly:aBoolean |
|
635 |
showOnly := nil. |
|
636 |
aBoolean ifTrue:[ |
|
637 |
showOnly := DefaultShowOnly := #dartClassesAndMethods |
|
638 |
]. |
|
639 |
||
640 |
"Modified: / 05-05-2011 / 15:23:25 / cg" |
|
641 |
! |
|
642 |
||
643 |
dartClassesOnly |
|
644 |
^ showOnly == #dartClasses |
|
645 |
||
646 |
"Modified: / 07-06-2010 / 14:18:28 / cg" |
|
647 |
! |
|
648 |
||
649 |
dartClassesOnly:aBoolean |
|
650 |
showOnly := nil. |
|
651 |
aBoolean ifTrue:[ |
|
652 |
showOnly := DefaultShowOnly := #dartClasses |
|
653 |
]. |
|
654 |
||
655 |
"Modified: / 05-05-2011 / 15:23:29 / cg" |
|
656 |
! |
|
657 |
||
658 |
dartMethodsOnly |
|
659 |
^ showOnly == #dartMethods |
|
660 |
||
661 |
"Modified: / 07-06-2010 / 14:18:30 / cg" |
|
662 |
! |
|
663 |
||
664 |
dartMethodsOnly:aBoolean |
|
665 |
showOnly := nil. |
|
666 |
aBoolean ifTrue:[ |
|
667 |
showOnly := DefaultShowOnly := #dartMethods |
|
668 |
]. |
|
669 |
||
670 |
"Modified: / 05-05-2011 / 15:23:31 / cg" |
|
671 |
! |
|
672 |
||
9891 | 673 |
definesOnly |
674 |
^ showOnly == #defines |
|
675 |
||
676 |
"Modified: / 07-06-2010 / 14:18:15 / cg" |
|
677 |
! |
|
678 |
||
679 |
definesOnly:aBoolean |
|
680 |
showOnly := nil. |
|
681 |
aBoolean ifTrue:[ |
|
682 |
showOnly := DefaultShowOnly := #defines |
|
683 |
]. |
|
684 |
||
685 |
"Modified: / 05-05-2011 / 15:21:58 / cg" |
|
686 |
! |
|
687 |
||
9921 | 688 |
documentationOnly |
689 |
^ showOnly == #documentation |
|
690 |
||
691 |
"Created: / 08-05-2011 / 10:11:47 / cg" |
|
692 |
! |
|
693 |
||
694 |
documentationOnly:aBoolean |
|
695 |
showOnly := DefaultShowOnly := nil. |
|
696 |
aBoolean ifTrue:[ |
|
697 |
showOnly := "DefaultShowOnly :=" #documentation |
|
698 |
]. |
|
699 |
||
700 |
"Created: / 08-05-2011 / 10:11:39 / cg" |
|
701 |
! |
|
702 |
||
13311 | 703 |
filter:aStringOrNil |
704 |
(filter ? '') ~= (aStringOrNil ? '') ifTrue:[ |
|
705 |
filter := aStringOrNil. |
|
9891 | 706 |
rawList notNil ifTrue:[ |
707 |
self updateContentsFromRawList |
|
708 |
]. |
|
709 |
]. |
|
710 |
||
711 |
"Modified: / 05-05-2011 / 14:43:04 / cg" |
|
712 |
! |
|
713 |
||
14346 | 714 |
flagNamed:aSymbol |
715 |
^ flags at:aSymbol ifAbsent:false |
|
716 |
! |
|
717 |
||
718 |
flagNamed:aSymbol put:aBoolean |
|
719 |
flags at:aSymbol put:aBoolean |
|
720 |
! |
|
721 |
||
9891 | 722 |
functionsAndVariablesOnly |
723 |
^ showOnly == #functionsAndVariables |
|
724 |
||
725 |
"Modified: / 07-06-2010 / 14:18:05 / cg" |
|
726 |
! |
|
727 |
||
728 |
functionsAndVariablesOnly:aBoolean |
|
729 |
showOnly := nil. |
|
730 |
aBoolean ifTrue:[ |
|
731 |
showOnly := DefaultShowOnly := #functionsAndVariables |
|
732 |
]. |
|
733 |
||
734 |
"Modified: / 05-05-2011 / 15:22:01 / cg" |
|
735 |
! |
|
736 |
||
737 |
functionsOnly |
|
738 |
^ showOnly == #functions |
|
739 |
||
740 |
"Modified: / 07-06-2010 / 14:17:54 / cg" |
|
741 |
! |
|
742 |
||
743 |
functionsOnly:aBoolean |
|
744 |
showOnly := nil. |
|
745 |
aBoolean ifTrue:[ |
|
746 |
showOnly := DefaultShowOnly := #functions |
|
747 |
]. |
|
748 |
||
749 |
"Modified: / 05-05-2011 / 15:22:03 / cg" |
|
750 |
! |
|
751 |
||
14579 | 752 |
headlinesOnly |
753 |
^ showOnly == #headlines |
|
754 |
! |
|
755 |
||
756 |
headlinesOnly:aBoolean |
|
757 |
showOnly := DefaultShowOnly := nil. |
|
758 |
aBoolean ifTrue:[ |
|
759 |
showOnly := "DefaultShowOnly :=" #headlines |
|
760 |
]. |
|
761 |
! |
|
762 |
||
9891 | 763 |
hideClasses |
14346 | 764 |
^ self flagNamed:#hideClasses |
9891 | 765 |
! |
766 |
||
767 |
hideClasses:aBoolean |
|
14346 | 768 |
self flagNamed:#hideClasses put:aBoolean |
9891 | 769 |
|
770 |
"Modified: / 05-05-2011 / 15:22:08 / cg" |
|
771 |
! |
|
772 |
||
11762 | 773 |
hideDartClasses |
14346 | 774 |
^ self flagNamed:#hideDartClasses |
11762 | 775 |
! |
776 |
||
777 |
hideDartClasses:aBoolean |
|
14346 | 778 |
self flagNamed:#hideDartClasses put:aBoolean |
11762 | 779 |
|
780 |
"Modified: / 05-05-2011 / 15:22:32 / cg" |
|
781 |
! |
|
782 |
||
783 |
hideDartFields |
|
14346 | 784 |
^ self flagNamed:#hideDartFields |
11762 | 785 |
! |
786 |
||
787 |
hideDartFields:aBoolean |
|
14346 | 788 |
self flagNamed:#hideDartFields put:aBoolean |
11762 | 789 |
|
790 |
"Modified: / 05-05-2011 / 15:22:34 / cg" |
|
791 |
! |
|
792 |
||
793 |
hideDartInterfaces |
|
14346 | 794 |
^ self flagNamed:#hideDartInterfaces |
11762 | 795 |
! |
796 |
||
797 |
hideDartInterfaces:aBoolean |
|
14346 | 798 |
self flagNamed:#hideDartInterfaces put:aBoolean |
11762 | 799 |
|
800 |
"Modified: / 05-05-2011 / 15:22:38 / cg" |
|
801 |
! |
|
802 |
||
803 |
hideDartMethods |
|
14346 | 804 |
^ self flagNamed:#hideDartMethods |
11762 | 805 |
! |
806 |
||
807 |
hideDartMethods:aBoolean |
|
14346 | 808 |
self flagNamed:#hideDartMethods put:aBoolean. |
11762 | 809 |
|
810 |
"Modified: / 05-05-2011 / 15:22:40 / cg" |
|
811 |
! |
|
812 |
||
813 |
hideDartPackages |
|
14346 | 814 |
^ self flagNamed:#hideDartPackages |
11762 | 815 |
! |
816 |
||
817 |
hideDartPackages:aBoolean |
|
14346 | 818 |
self flagNamed:#hideDartPackages put:aBoolean. |
11762 | 819 |
|
820 |
"Modified: / 05-05-2011 / 15:22:41 / cg" |
|
821 |
! |
|
822 |
||
9891 | 823 |
hideDataLabels |
14346 | 824 |
^ self flagNamed:#hideDataLabels |
9891 | 825 |
! |
826 |
||
827 |
hideDataLabels:aBoolean |
|
14346 | 828 |
self flagNamed:#hideDataLabels put:aBoolean. |
9891 | 829 |
|
830 |
"Modified: / 05-05-2011 / 15:22:10 / cg" |
|
831 |
! |
|
832 |
||
833 |
hideDefines |
|
14346 | 834 |
^ self flagNamed:#hideDefines |
9891 | 835 |
! |
836 |
||
837 |
hideDefines:aBoolean |
|
14346 | 838 |
self flagNamed:#hideDefines put:aBoolean. |
9891 | 839 |
|
840 |
"Modified: / 05-05-2011 / 15:22:12 / cg" |
|
841 |
! |
|
842 |
||
9921 | 843 |
hideDocumentation |
14346 | 844 |
^ self flagNamed:#hideDocumentation |
9921 | 845 |
|
846 |
"Created: / 08-05-2011 / 10:11:02 / cg" |
|
847 |
! |
|
848 |
||
849 |
hideDocumentation:aBoolean |
|
14346 | 850 |
self flagNamed:#hideDocumentation put:aBoolean. |
9921 | 851 |
|
852 |
"Created: / 08-05-2011 / 10:11:06 / cg" |
|
853 |
! |
|
854 |
||
9891 | 855 |
hideFunctionProtoTypes |
14346 | 856 |
^ self flagNamed:#hideFunctionProtoTypes |
9891 | 857 |
! |
858 |
||
859 |
hideFunctionProtoTypes:aBoolean |
|
14346 | 860 |
self flagNamed:#hideFunctionProtoTypes put:aBoolean. |
9891 | 861 |
|
862 |
"Modified: / 05-05-2011 / 15:22:14 / cg" |
|
863 |
! |
|
864 |
||
865 |
hideFunctions |
|
14346 | 866 |
^ self flagNamed:#hideFunctions |
9891 | 867 |
! |
868 |
||
869 |
hideFunctions:aBoolean |
|
14346 | 870 |
self flagNamed:#hideFunctions put:aBoolean. |
9891 | 871 |
|
872 |
"Modified: / 05-05-2011 / 15:22:18 / cg" |
|
873 |
! |
|
874 |
||
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
875 |
hideHTMLHeaders |
14346 | 876 |
^ self flagNamed:#hideHTMLHeaders |
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
877 |
|
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
878 |
"Created: / 12-09-2012 / 12:29:45 / cg" |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
879 |
! |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
880 |
|
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
881 |
hideHTMLHeaders:aBoolean |
14346 | 882 |
self flagNamed:#hideHTMLHeaders put:aBoolean. |
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
883 |
|
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
884 |
"Created: / 12-09-2012 / 12:29:52 / cg" |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
885 |
! |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
886 |
|
9891 | 887 |
hideHTMLInput |
14346 | 888 |
^ self flagNamed:#hideHTMLInput |
9891 | 889 |
|
890 |
"Created: / 20-04-2011 / 19:01:04 / cg" |
|
891 |
! |
|
892 |
||
893 |
hideHTMLInput:aBoolean |
|
14346 | 894 |
self flagNamed:#hideHTMLInput put:aBoolean. |
9891 | 895 |
|
896 |
"Created: / 20-04-2011 / 19:01:32 / cg" |
|
897 |
"Modified: / 05-05-2011 / 15:22:21 / cg" |
|
898 |
! |
|
899 |
||
900 |
hideHTMLScript |
|
14346 | 901 |
^ self flagNamed:#hideHTMLScript |
9891 | 902 |
|
903 |
"Created: / 20-04-2011 / 19:00:32 / cg" |
|
904 |
! |
|
905 |
||
906 |
hideHTMLScript:aBoolean |
|
14346 | 907 |
self flagNamed:#hideHTMLScript put:aBoolean. |
9891 | 908 |
|
909 |
"Created: / 20-04-2011 / 19:01:32 / cg" |
|
910 |
"Modified: / 05-05-2011 / 15:22:23 / cg" |
|
911 |
! |
|
912 |
||
913 |
hideHTMLTable |
|
14346 | 914 |
^ self flagNamed:#hideHTMLTable |
9891 | 915 |
|
916 |
"Created: / 20-04-2011 / 19:01:23 / cg" |
|
917 |
! |
|
918 |
||
919 |
hideHTMLTable:aBoolean |
|
14346 | 920 |
self flagNamed:#hideHTMLTable put:aBoolean. |
9891 | 921 |
|
922 |
"Created: / 20-04-2011 / 19:01:48 / cg" |
|
923 |
"Modified: / 05-05-2011 / 15:22:26 / cg" |
|
924 |
! |
|
925 |
||
926 |
hideHTMLTextArea |
|
14346 | 927 |
^ self flagNamed:#hideHTMLTextArea |
9891 | 928 |
|
929 |
"Created: / 20-04-2011 / 19:00:55 / cg" |
|
930 |
! |
|
931 |
||
932 |
hideHTMLTextArea:aBoolean |
|
14346 | 933 |
self flagNamed:#hideHTMLTextArea put:aBoolean. |
9891 | 934 |
|
935 |
"Created: / 20-04-2011 / 19:01:58 / cg" |
|
936 |
"Modified: / 05-05-2011 / 15:22:28 / cg" |
|
937 |
! |
|
938 |
||
939 |
hideJavaClasses |
|
14346 | 940 |
^ self flagNamed:#hideJavaClasses |
9891 | 941 |
! |
942 |
||
943 |
hideJavaClasses:aBoolean |
|
14346 | 944 |
self flagNamed:#hideJavaClasses put:aBoolean |
9891 | 945 |
|
946 |
"Modified: / 05-05-2011 / 15:22:32 / cg" |
|
947 |
! |
|
948 |
||
949 |
hideJavaFields |
|
14347 | 950 |
^ self flagNamed:#hideJavaFields |
9891 | 951 |
! |
952 |
||
953 |
hideJavaFields:aBoolean |
|
14347 | 954 |
self flagNamed:#hideJavaFields put:aBoolean. |
9891 | 955 |
|
956 |
"Modified: / 05-05-2011 / 15:22:34 / cg" |
|
957 |
! |
|
958 |
||
959 |
hideJavaInterfaces |
|
14347 | 960 |
^ self flagNamed:#hideJavaInterfaces |
9891 | 961 |
! |
962 |
||
963 |
hideJavaInterfaces:aBoolean |
|
14347 | 964 |
self flagNamed:#hideJavaInterfaces put:aBoolean. |
9891 | 965 |
|
966 |
"Modified: / 05-05-2011 / 15:22:38 / cg" |
|
967 |
! |
|
968 |
||
969 |
hideJavaMethods |
|
14346 | 970 |
^ self flagNamed:#hideJavaMethods |
9891 | 971 |
! |
972 |
||
973 |
hideJavaMethods:aBoolean |
|
14346 | 974 |
self flagNamed:#hideJavaMethods put:aBoolean. |
9891 | 975 |
|
976 |
"Modified: / 05-05-2011 / 15:22:40 / cg" |
|
977 |
! |
|
978 |
||
979 |
hideJavaPackages |
|
14346 | 980 |
^ self flagNamed:#hideJavaPackages |
9891 | 981 |
! |
982 |
||
983 |
hideJavaPackages:aBoolean |
|
14346 | 984 |
self flagNamed:#hideJavaPackages put:aBoolean. |
9891 | 985 |
|
986 |
"Modified: / 05-05-2011 / 15:22:41 / cg" |
|
987 |
! |
|
988 |
||
14385 | 989 |
hideLabels |
990 |
^ self flagNamed:#hideLabels |
|
991 |
! |
|
992 |
||
993 |
hideLabels:aBoolean |
|
994 |
self flagNamed:#hideLabels put:aBoolean. |
|
995 |
||
996 |
"Modified: / 05-05-2011 / 15:22:46 / cg" |
|
997 |
! |
|
998 |
||
9891 | 999 |
hideLispConstants |
14346 | 1000 |
^ self flagNamed:#hideLispConstants |
9891 | 1001 |
! |
1002 |
||
1003 |
hideLispConstants:aBoolean |
|
14346 | 1004 |
self flagNamed:#hideLispConstants put:aBoolean. |
9891 | 1005 |
|
1006 |
"Modified: / 05-05-2011 / 15:22:46 / cg" |
|
1007 |
! |
|
1008 |
||
1009 |
hideLispEvaluations |
|
14346 | 1010 |
^ self flagNamed:#hideLispEvaluations |
9891 | 1011 |
! |
1012 |
||
1013 |
hideLispEvaluations:aBoolean |
|
14346 | 1014 |
self flagNamed:#hideLispEvaluations put:aBoolean. |
9891 | 1015 |
|
1016 |
"Modified: / 05-05-2011 / 15:22:49 / cg" |
|
1017 |
! |
|
1018 |
||
1019 |
hideLispMacros |
|
14346 | 1020 |
^ self flagNamed:#hideLispMacros |
9891 | 1021 |
! |
1022 |
||
1023 |
hideLispMacros:aBoolean |
|
14346 | 1024 |
self flagNamed:#hideLispMacros put:aBoolean. |
9891 | 1025 |
|
1026 |
"Modified: / 05-05-2011 / 15:22:50 / cg" |
|
1027 |
! |
|
1028 |
||
1029 |
hideLispMethods |
|
14346 | 1030 |
^ self flagNamed:#hideLispMethods |
9891 | 1031 |
! |
1032 |
||
1033 |
hideLispMethods:aBoolean |
|
14346 | 1034 |
self flagNamed:#hideLispMethods put:aBoolean. |
9891 | 1035 |
|
1036 |
"Modified: / 05-05-2011 / 15:22:53 / cg" |
|
1037 |
! |
|
1038 |
||
1039 |
hideLocalLabels |
|
14346 | 1040 |
^ self flagNamed:#hideLocalLabels |
9891 | 1041 |
! |
1042 |
||
11466 | 1043 |
hideLocalLabels2 |
14346 | 1044 |
^ self flagNamed:#hideLocalLabels2 |
11466 | 1045 |
|
1046 |
"Created: / 24-03-2012 / 23:23:15 / cg" |
|
1047 |
! |
|
1048 |
||
1049 |
hideLocalLabels2:aBoolean |
|
14346 | 1050 |
self flagNamed:#hideLocalLabels2 put:aBoolean. |
11466 | 1051 |
|
1052 |
"Modified: / 05-05-2011 / 15:22:54 / cg" |
|
1053 |
"Created: / 24-03-2012 / 23:23:20 / cg" |
|
1054 |
! |
|
1055 |
||
11502 | 1056 |
hideLocalLabels3 |
14346 | 1057 |
^ self flagNamed:#hideLocalLabels3 |
11502 | 1058 |
|
1059 |
"Created: / 13-05-2012 / 11:12:37 / cg" |
|
1060 |
! |
|
1061 |
||
1062 |
hideLocalLabels3:aBoolean |
|
14346 | 1063 |
self flagNamed:#hideLocalLabels3 put:aBoolean. |
11502 | 1064 |
|
1065 |
"Modified: / 05-05-2011 / 15:22:54 / cg" |
|
1066 |
"Created: / 13-05-2012 / 11:12:42 / cg" |
|
1067 |
! |
|
1068 |
||
9891 | 1069 |
hideLocalLabels:aBoolean |
14346 | 1070 |
self flagNamed:#hideLocalLabels put:aBoolean. |
9891 | 1071 |
|
1072 |
"Modified: / 05-05-2011 / 15:22:54 / cg" |
|
1073 |
! |
|
1074 |
||
14346 | 1075 |
hideLuaFunctions |
1076 |
^ self flagNamed:#hideLuaFunctions |
|
1077 |
! |
|
1078 |
||
1079 |
hideLuaFunctions:aBoolean |
|
1080 |
self flagNamed:#hideLuaFunctions put:aBoolean |
|
1081 |
! |
|
1082 |
||
11762 | 1083 |
hideMethods |
14346 | 1084 |
^ self flagNamed:#hideMethods |
11762 | 1085 |
|
1086 |
"Created: / 21-08-2012 / 21:02:24 / cg" |
|
1087 |
! |
|
1088 |
||
1089 |
hideMethods:aBoolean |
|
14346 | 1090 |
self flagNamed:#hideMethods put:aBoolean. |
11762 | 1091 |
|
1092 |
"Created: / 21-08-2012 / 21:01:38 / cg" |
|
1093 |
! |
|
1094 |
||
9891 | 1095 |
hideOzClasses |
14346 | 1096 |
^ self flagNamed:#hideOzClasses |
9891 | 1097 |
! |
1098 |
||
1099 |
hideOzClasses:aBoolean |
|
14346 | 1100 |
self flagNamed:#hideOzClasses put:aBoolean. |
9891 | 1101 |
|
1102 |
"Modified: / 05-05-2011 / 15:22:58 / cg" |
|
1103 |
! |
|
1104 |
||
1105 |
hideOzFunctions |
|
14346 | 1106 |
^ self flagNamed:#hideOzFunctions |
9891 | 1107 |
! |
1108 |
||
1109 |
hideOzFunctions:aBoolean |
|
14346 | 1110 |
self flagNamed:#hideOzFunctions put:aBoolean. |
9891 | 1111 |
|
1112 |
"Modified: / 05-05-2011 / 15:23:00 / cg" |
|
1113 |
! |
|
1114 |
||
1115 |
hideOzMethods |
|
14346 | 1116 |
^ self flagNamed:#hideOzMethods |
9891 | 1117 |
! |
1118 |
||
1119 |
hideOzMethods:aBoolean |
|
14346 | 1120 |
self flagNamed:#hideOzMethods put:aBoolean. |
9891 | 1121 |
|
1122 |
"Modified: / 05-05-2011 / 15:23:02 / cg" |
|
1123 |
! |
|
1124 |
||
1125 |
hidePythonClasses |
|
14346 | 1126 |
^ self flagNamed:#hidePythonClasses |
9891 | 1127 |
! |
1128 |
||
1129 |
hidePythonClasses:aBoolean |
|
14346 | 1130 |
self flagNamed:#hidePythonClasses put:aBoolean. |
9891 | 1131 |
|
1132 |
"Modified: / 05-05-2011 / 15:23:05 / cg" |
|
1133 |
! |
|
1134 |
||
1135 |
hidePythonFunctions |
|
14346 | 1136 |
^ self flagNamed:#hidePythonFunctions |
9891 | 1137 |
! |
1138 |
||
1139 |
hidePythonFunctions:aBoolean |
|
14346 | 1140 |
self flagNamed:#hidePythonFunctions put:aBoolean. |
9891 | 1141 |
|
1142 |
"Modified: / 05-05-2011 / 15:23:07 / cg" |
|
1143 |
! |
|
1144 |
||
1145 |
hidePythonMethods |
|
14346 | 1146 |
^ self flagNamed:#hidePythonMethods |
9891 | 1147 |
! |
1148 |
||
1149 |
hidePythonMethods:aBoolean |
|
14346 | 1150 |
self flagNamed:#hidePythonMethods put:aBoolean. |
9891 | 1151 |
|
1152 |
"Modified: / 05-05-2011 / 15:23:09 / cg" |
|
1153 |
! |
|
1154 |
||
1155 |
hideStatic |
|
14346 | 1156 |
^ self flagNamed:#hideStatic |
9891 | 1157 |
! |
1158 |
||
1159 |
hideStatic:aBoolean |
|
14346 | 1160 |
self flagNamed:#hideStatic put:aBoolean. |
9891 | 1161 |
|
1162 |
"Modified: / 05-05-2011 / 15:23:11 / cg" |
|
1163 |
! |
|
1164 |
||
1165 |
hideStructMembers |
|
14346 | 1166 |
^ self flagNamed:#hideStructMembers |
9891 | 1167 |
! |
1168 |
||
1169 |
hideStructMembers:aBoolean |
|
14346 | 1170 |
self flagNamed:#hideStructMembers put:aBoolean. |
9891 | 1171 |
|
1172 |
"Modified: / 05-05-2011 / 15:23:15 / cg" |
|
1173 |
! |
|
1174 |
||
1175 |
hideStructures |
|
14346 | 1176 |
^ self flagNamed:#hideStructures |
9891 | 1177 |
! |
1178 |
||
1179 |
hideStructures:aBoolean |
|
14346 | 1180 |
self flagNamed:#hideStructures put:aBoolean. |
9891 | 1181 |
|
1182 |
"Modified: / 05-05-2011 / 15:23:17 / cg" |
|
1183 |
! |
|
1184 |
||
1185 |
hideTextLabels |
|
14346 | 1186 |
^ self flagNamed:#hideTextLabels |
9891 | 1187 |
! |
1188 |
||
1189 |
hideTextLabels:aBoolean |
|
14346 | 1190 |
self flagNamed:#hideTextLabels put:aBoolean. |
9891 | 1191 |
|
1192 |
"Modified: / 05-05-2011 / 15:23:19 / cg" |
|
1193 |
! |
|
1194 |
||
1195 |
hideTypedefs |
|
14346 | 1196 |
^ self flagNamed:#hideTypedefs |
9891 | 1197 |
! |
1198 |
||
1199 |
hideTypedefs:aBoolean |
|
14346 | 1200 |
self flagNamed:#hideTypedefs put:aBoolean. |
9891 | 1201 |
|
1202 |
"Modified: / 05-05-2011 / 15:23:21 / cg" |
|
1203 |
! |
|
1204 |
||
1205 |
hideVariables |
|
14346 | 1206 |
^ self flagNamed:#hideVariables |
9891 | 1207 |
! |
1208 |
||
1209 |
hideVariables:aBoolean |
|
14346 | 1210 |
self flagNamed:#hideVariables put:aBoolean. |
9891 | 1211 |
|
1212 |
"Modified: / 05-05-2011 / 15:23:23 / cg" |
|
1213 |
! |
|
1214 |
||
1215 |
javaClassesAndMethodsOnly |
|
1216 |
^ showOnly == #javaClassesAndMethods |
|
1217 |
||
1218 |
"Modified: / 07-06-2010 / 14:18:25 / cg" |
|
1219 |
! |
|
1220 |
||
1221 |
javaClassesAndMethodsOnly:aBoolean |
|
1222 |
showOnly := nil. |
|
1223 |
aBoolean ifTrue:[ |
|
1224 |
showOnly := DefaultShowOnly := #javaClassesAndMethods |
|
1225 |
]. |
|
1226 |
||
1227 |
"Modified: / 05-05-2011 / 15:23:25 / cg" |
|
1228 |
! |
|
1229 |
||
1230 |
javaClassesOnly |
|
1231 |
^ showOnly == #javaClasses |
|
1232 |
||
1233 |
"Modified: / 07-06-2010 / 14:18:28 / cg" |
|
1234 |
! |
|
1235 |
||
1236 |
javaClassesOnly:aBoolean |
|
1237 |
showOnly := nil. |
|
1238 |
aBoolean ifTrue:[ |
|
1239 |
showOnly := DefaultShowOnly := #javaClasses |
|
1240 |
]. |
|
1241 |
||
1242 |
"Modified: / 05-05-2011 / 15:23:29 / cg" |
|
1243 |
! |
|
1244 |
||
1245 |
javaMethodsOnly |
|
1246 |
^ showOnly == #javaMethods |
|
1247 |
||
1248 |
"Modified: / 07-06-2010 / 14:18:30 / cg" |
|
1249 |
! |
|
1250 |
||
1251 |
javaMethodsOnly:aBoolean |
|
1252 |
showOnly := nil. |
|
1253 |
aBoolean ifTrue:[ |
|
1254 |
showOnly := DefaultShowOnly := #javaMethods |
|
1255 |
]. |
|
1256 |
||
1257 |
"Modified: / 05-05-2011 / 15:23:31 / cg" |
|
1258 |
! |
|
1259 |
||
1260 |
macrosOnly |
|
1261 |
^ showOnly == #macros |
|
1262 |
||
1263 |
"Created: / 07-06-2010 / 12:09:22 / cg" |
|
1264 |
"Modified: / 07-06-2010 / 14:18:33 / cg" |
|
1265 |
! |
|
1266 |
||
1267 |
macrosOnly:aBoolean |
|
1268 |
showOnly := nil. |
|
1269 |
aBoolean ifTrue:[ |
|
1270 |
showOnly := DefaultShowOnly := #macros |
|
1271 |
]. |
|
1272 |
||
1273 |
"Created: / 07-06-2010 / 12:09:34 / cg" |
|
1274 |
"Modified: / 05-05-2011 / 15:23:33 / cg" |
|
1275 |
! |
|
1276 |
||
1277 |
methodsOnly |
|
1278 |
^ showOnly == #methods |
|
1279 |
||
1280 |
"Created: / 07-06-2010 / 12:12:26 / cg" |
|
1281 |
"Modified: / 07-06-2010 / 14:18:38 / cg" |
|
1282 |
! |
|
1283 |
||
1284 |
methodsOnly:aBoolean |
|
1285 |
showOnly := nil. |
|
1286 |
aBoolean ifTrue:[ |
|
1287 |
showOnly := DefaultShowOnly := #methods |
|
1288 |
]. |
|
1289 |
||
1290 |
"Created: / 07-06-2010 / 12:12:30 / cg" |
|
1291 |
"Modified: / 05-05-2011 / 15:23:35 / cg" |
|
1292 |
! |
|
1293 |
||
1294 |
ozClassesOnly |
|
1295 |
^ showOnly == #ozClasses |
|
1296 |
||
1297 |
"Modified: / 07-06-2010 / 14:18:41 / cg" |
|
1298 |
! |
|
1299 |
||
1300 |
ozClassesOnly:aBoolean |
|
1301 |
showOnly := nil. |
|
1302 |
aBoolean ifTrue:[ |
|
1303 |
showOnly := DefaultShowOnly := #ozClasses |
|
1304 |
]. |
|
1305 |
||
1306 |
"Modified: / 05-05-2011 / 15:23:38 / cg" |
|
1307 |
! |
|
1308 |
||
1309 |
ozFunctionsOnly |
|
1310 |
^ showOnly == #ozFunctions |
|
1311 |
||
1312 |
"Modified: / 07-06-2010 / 14:18:44 / cg" |
|
1313 |
! |
|
1314 |
||
1315 |
ozFunctionsOnly:aBoolean |
|
1316 |
showOnly := nil. |
|
1317 |
aBoolean ifTrue:[ |
|
1318 |
showOnly := DefaultShowOnly := #ozFunctions |
|
1319 |
]. |
|
1320 |
self updateContentsFromRawList. |
|
1321 |
||
1322 |
"Modified: / 05-05-2011 / 15:18:51 / cg" |
|
1323 |
! |
|
1324 |
||
1325 |
ozMethodsOnly |
|
1326 |
^ showOnly == #ozMethods |
|
1327 |
||
1328 |
"Modified: / 07-06-2010 / 14:18:47 / cg" |
|
1329 |
! |
|
1330 |
||
1331 |
ozMethodsOnly:aBoolean |
|
1332 |
showOnly := nil. |
|
1333 |
aBoolean ifTrue:[ |
|
1334 |
showOnly := DefaultShowOnly := #ozMethods |
|
1335 |
]. |
|
1336 |
||
1337 |
"Modified: / 05-05-2011 / 15:23:44 / cg" |
|
1338 |
! |
|
1339 |
||
1340 |
pythonClassesOnly |
|
1341 |
^ showOnly == #pythonClasses |
|
1342 |
||
1343 |
"Modified: / 07-06-2010 / 14:18:52 / cg" |
|
1344 |
! |
|
1345 |
||
1346 |
pythonClassesOnly:aBoolean |
|
1347 |
showOnly := nil. |
|
1348 |
aBoolean ifTrue:[ |
|
1349 |
showOnly := DefaultShowOnly := #pythonClasses |
|
1350 |
]. |
|
1351 |
||
1352 |
"Modified: / 05-05-2011 / 15:23:46 / cg" |
|
1353 |
! |
|
1354 |
||
1355 |
pythonFunctionsOnly |
|
1356 |
^ showOnly == #pythonFunctions |
|
1357 |
||
1358 |
"Modified: / 07-06-2010 / 14:18:55 / cg" |
|
1359 |
! |
|
1360 |
||
1361 |
pythonFunctionsOnly:aBoolean |
|
1362 |
showOnly := nil. |
|
1363 |
aBoolean ifTrue:[ |
|
1364 |
showOnly := DefaultShowOnly := #pythonFunctions |
|
1365 |
]. |
|
1366 |
||
1367 |
"Modified: / 05-05-2011 / 15:23:48 / cg" |
|
1368 |
! |
|
1369 |
||
1370 |
pythonMethodsOnly |
|
1371 |
^ showOnly == #pythonMethods |
|
1372 |
||
1373 |
"Modified: / 07-06-2010 / 14:18:58 / cg" |
|
1374 |
! |
|
1375 |
||
1376 |
pythonMethodsOnly:aBoolean |
|
1377 |
showOnly := nil. |
|
1378 |
aBoolean ifTrue:[ |
|
1379 |
showOnly := DefaultShowOnly := #pythonMethods |
|
1380 |
]. |
|
1381 |
||
1382 |
"Modified: / 05-05-2011 / 15:23:51 / cg" |
|
1383 |
! |
|
1384 |
||
1385 |
showOnly |
|
1386 |
tagTypesPresent == false ifTrue:[ |
|
1387 |
^ nil "/ showing everything |
|
1388 |
]. |
|
1389 |
^ showOnly "? DefaultShowOnly" |
|
1390 |
||
1391 |
"Modified: / 20-06-2010 / 01:44:13 / cg" |
|
1392 |
! |
|
1393 |
||
1394 |
showOnly:aSymbol |
|
1395 |
showOnly := aSymbol |
|
1396 |
||
1397 |
"Modified: / 05-05-2011 / 15:23:55 / cg" |
|
1398 |
! |
|
1399 |
||
1400 |
structsOnly |
|
1401 |
^ showOnly == #structs |
|
1402 |
||
1403 |
"Created: / 25-06-2010 / 10:42:27 / cg" |
|
1404 |
! |
|
1405 |
||
1406 |
structsOnly:aBoolean |
|
1407 |
showOnly := DefaultShowOnly := nil. |
|
1408 |
aBoolean ifTrue:[ |
|
1409 |
showOnly := "DefaultShowOnly :=" #structs |
|
1410 |
]. |
|
1411 |
||
1412 |
"Created: / 25-06-2010 / 10:42:39 / cg" |
|
1413 |
"Modified: / 05-05-2011 / 15:23:58 / cg" |
|
1414 |
! |
|
1415 |
||
1416 |
targetsOnly |
|
1417 |
^ showOnly == #targets |
|
1418 |
||
1419 |
"Modified: / 07-06-2010 / 14:19:03 / cg" |
|
1420 |
! |
|
1421 |
||
1422 |
targetsOnly:aBoolean |
|
1423 |
showOnly := DefaultShowOnly := nil. |
|
1424 |
aBoolean ifTrue:[ |
|
1425 |
showOnly := DefaultShowOnly := #targets |
|
1426 |
]. |
|
1427 |
||
1428 |
"Modified: / 05-05-2011 / 15:24:02 / cg" |
|
1429 |
! |
|
1430 |
||
1431 |
typesOnly |
|
1432 |
^ showOnly == #types |
|
1433 |
||
1434 |
"Modified: / 07-06-2010 / 14:19:06 / cg" |
|
1435 |
! |
|
1436 |
||
1437 |
typesOnly:aBoolean |
|
1438 |
showOnly := DefaultShowOnly := nil. |
|
1439 |
aBoolean ifTrue:[ |
|
1440 |
showOnly := "DefaultShowOnly :=" #types |
|
1441 |
]. |
|
1442 |
||
1443 |
"Modified: / 05-05-2011 / 15:24:04 / cg" |
|
1444 |
! |
|
1445 |
||
1446 |
variablesOnly |
|
1447 |
^ showOnly == #variables |
|
1448 |
||
1449 |
"Modified: / 07-06-2010 / 14:19:09 / cg" |
|
1450 |
! |
|
1451 |
||
1452 |
variablesOnly:aBoolean |
|
1453 |
showOnly := nil. |
|
1454 |
aBoolean ifTrue:[ |
|
1455 |
showOnly := DefaultShowOnly := #variables |
|
1456 |
]. |
|
1457 |
||
1458 |
"Modified: / 05-05-2011 / 15:24:06 / cg" |
|
1459 |
! ! |
|
1460 |
||
1461 |
!TagList methodsFor:'accessing-presentation'! |
|
1462 |
||
1463 |
groupBy |
|
1464 |
^ groupBy |
|
1465 |
||
1466 |
"Created: / 05-05-2011 / 14:31:37 / cg" |
|
1467 |
"Modified: / 05-05-2011 / 15:34:14 / cg" |
|
1468 |
! |
|
1469 |
||
1470 |
groupBy:aSymbolOrNil |
|
1471 |
groupBy ~~ aSymbolOrNil ifTrue:[ |
|
1472 |
groupBy := DefaultGroupBy := aSymbolOrNil. |
|
1473 |
self updateContentsFromFilteredList |
|
1474 |
]. |
|
1475 |
||
1476 |
"Created: / 05-05-2011 / 14:32:00 / cg" |
|
1477 |
! |
|
1478 |
||
1479 |
groupedByType |
|
1480 |
^ self groupBy == #byType |
|
1481 |
||
1482 |
"Created: / 05-05-2011 / 14:32:53 / cg" |
|
1483 |
! |
|
1484 |
||
1485 |
groupedByType:aBoolean |
|
1486 |
aBoolean == true ifTrue:[ |
|
1487 |
self groupBy:#byType |
|
1488 |
] ifFalse:[ |
|
1489 |
self groupBy:nil |
|
1490 |
]. |
|
1491 |
||
1492 |
"Created: / 05-05-2011 / 14:33:05 / cg" |
|
1493 |
! |
|
1494 |
||
1495 |
sortCriteria |
|
1496 |
^ sortCriteria ? DefaultSortCriteria |
|
1497 |
! |
|
1498 |
||
1499 |
sortCriteria:aSymbolOrNil |
|
1500 |
sortCriteria ~~ aSymbolOrNil ifTrue:[ |
|
1501 |
sortCriteria := DefaultSortCriteria := aSymbolOrNil. |
|
1502 |
Sorted := sortCriteria. |
|
1503 |
self updateContentsFromFilteredList |
|
1504 |
]. |
|
1505 |
||
1506 |
"Modified: / 05-05-2011 / 14:50:18 / cg" |
|
1507 |
! |
|
1508 |
||
1509 |
sorted |
|
1510 |
"backward compatibility" |
|
1511 |
||
1512 |
^ self sortCriteria notNil |
|
1513 |
! |
|
1514 |
||
1515 |
sorted:aBoolean |
|
1516 |
"backward compatibility" |
|
1517 |
||
1518 |
aBoolean ifTrue:[ |
|
1519 |
self sortCriteria:#byName |
|
1520 |
] ifFalse:[ |
|
1521 |
self sortCriteria:nil |
|
1522 |
]. |
|
1523 |
! |
|
1524 |
||
1525 |
sortedByLineNumber |
|
1526 |
^ self sortCriteria isNil |
|
1527 |
or:[ self sortCriteria == #lineNumber ] |
|
1528 |
||
1529 |
"Modified: / 05-05-2011 / 14:30:33 / cg" |
|
1530 |
! |
|
1531 |
||
1532 |
sortedByLineNumber:aBoolean |
|
1533 |
aBoolean == true ifTrue:[ |
|
1534 |
self sortCriteria:#lineNumber |
|
1535 |
]. |
|
1536 |
||
1537 |
"Modified: / 27-06-2010 / 21:31:44 / cg" |
|
1538 |
! |
|
1539 |
||
1540 |
sortedByName |
|
1541 |
^ self sortCriteria == #byName |
|
1542 |
! |
|
1543 |
||
1544 |
sortedByName:aBoolean |
|
1545 |
aBoolean == true ifTrue:[ |
|
1546 |
self sortCriteria:#byName |
|
1547 |
]. |
|
1548 |
! |
|
1549 |
||
1550 |
sortedByNameIgnoringCase |
|
1551 |
^ self sortCriteria == #byNameIgnoringCase |
|
1552 |
! |
|
1553 |
||
1554 |
sortedByNameIgnoringCase:aBoolean |
|
1555 |
aBoolean == true ifTrue:[ |
|
1556 |
self sortCriteria:#byNameIgnoringCase |
|
1557 |
]. |
|
1558 |
! |
|
1559 |
||
1560 |
sortedByNameIgnoringLeadingUnderscores |
|
1561 |
^ self sortCriteria == #byNameIgnoringLeadingUnderscores |
|
1562 |
! |
|
1563 |
||
1564 |
sortedByNameIgnoringLeadingUnderscores:aBoolean |
|
1565 |
aBoolean == true ifTrue:[ |
|
1566 |
self sortCriteria:#byNameIgnoringLeadingUnderscores |
|
1567 |
]. |
|
1568 |
! |
|
1569 |
||
1570 |
sortedByNameIgnoringLeadingUnderscoresAndCase |
|
1571 |
^ self sortCriteria == #byNameIgnoringLeadingUnderscoresAndCase |
|
1572 |
! |
|
1573 |
||
1574 |
sortedByNameIgnoringLeadingUnderscoresAndCase:aBoolean |
|
1575 |
aBoolean == true ifTrue:[ |
|
1576 |
self sortCriteria:#byNameIgnoringLeadingUnderscoresAndCase |
|
1577 |
]. |
|
1578 |
! |
|
1579 |
||
1580 |
sortedByType |
|
1581 |
^ self sortCriteria == #byType |
|
1582 |
! |
|
1583 |
||
1584 |
sortedByType:aBoolean |
|
1585 |
aBoolean == true ifTrue:[ |
|
1586 |
self sortCriteria:#byType |
|
1587 |
]. |
|
1588 |
! |
|
1589 |
||
1590 |
tagTypesPresent |
|
1591 |
^ tagTypesPresent |
|
1592 |
! ! |
|
1593 |
||
14346 | 1594 |
!TagList methodsFor:'initialization'! |
1595 |
||
1596 |
initContents:n |
|
1597 |
"Invoked when a new instance is created." |
|
1598 |
||
1599 |
super initContents:n. |
|
14387 | 1600 |
flags isNil ifTrue:[ |
1601 |
flags := IdentityDictionary new. |
|
1602 |
]. |
|
14346 | 1603 |
! |
1604 |
||
1605 |
initialize |
|
1606 |
"Invoked when a new instance is created." |
|
1607 |
||
1608 |
flags := IdentityDictionary new. |
|
1609 |
! ! |
|
1610 |
||
9891 | 1611 |
!TagList methodsFor:'private'! |
1612 |
||
1613 |
applyFilterToList:aList |
|
14564 | 1614 |
|filters| |
1615 |
||
1616 |
filters := filter splitByAny:',;'. |
|
1617 |
filters size == 1 ifTrue:[ |
|
1618 |
filter includesMatchCharacters ifFalse:[ |
|
1619 |
^ aList select:[:tag | tag label includesString:filter caseSensitive:false] |
|
1620 |
]. |
|
11722
f1f3a4d964ee
changed: #applyFilterToList:
Claus Gittinger <cg@exept.de>
parents:
11502
diff
changeset
|
1621 |
]. |
14564 | 1622 |
|
1623 |
^ aList |
|
1624 |
select:[:tag | |
|
1625 |
filters |
|
1626 |
contains:[:someFilter | |
|
1627 |
someFilter includesMatchCharacters ifTrue:[ |
|
1628 |
someFilter match:tag label caseSensitive:false |
|
1629 |
] ifFalse:[ |
|
1630 |
tag label includesString:someFilter caseSensitive:false |
|
1631 |
]. |
|
1632 |
]. |
|
1633 |
]. |
|
9891 | 1634 |
! |
1635 |
||
1636 |
getCtagsVersion |
|
1637 |
" parse major and minor version from ctags by operating system command |
|
1638 |
cehck for the 'Exuberant Ctags' string being present |
|
1639 |
return an Array with mafor and minor part of version or nil if not available" |
|
1640 |
||
1641 |
| stream string index majorVersion minorVersion indexOfPoint| |
|
1642 |
||
1643 |
stream := WriteStream on:''. |
|
1644 |
OperatingSystem |
|
1645 |
executeCommand:'ctags --version' |
|
1646 |
inputFrom:nil |
|
1647 |
outputTo:stream |
|
1648 |
errorTo:stream |
|
1649 |
inDirectory:nil |
|
1650 |
onError:[:status| false]. |
|
1651 |
string := stream contents. |
|
1652 |
index := string findString:'Exuberant Ctags' ifAbsent:[nil]. |
|
1653 |
index notNil ifTrue:[ |
|
1654 |
string := (string copyFrom:(index + ('Exuberant Ctags' size))) asArrayOfSubstrings first. |
|
1655 |
(string includes:$,) ifTrue:[ string := string copyTo:((string indexOf:$,) - 1)]. |
|
1656 |
indexOfPoint := string indexOf:$. ifAbsent:nil. |
|
1657 |
indexOfPoint notNil ifTrue:[ |
|
1658 |
majorVersion := (string copyFrom:1 to:indexOfPoint - 1) asInteger. |
|
1659 |
minorVersion := (string copyFrom:indexOfPoint + 1 to:string size) asInteger. |
|
1660 |
^ Array with:majorVersion with:minorVersion. |
|
1661 |
] |
|
1662 |
]. |
|
1663 |
^ nil |
|
1664 |
||
1665 |
"Modified: / 05-05-2011 / 14:48:08 / cg" |
|
1666 |
! |
|
1667 |
||
1668 |
setFilteredList:aList |
|
1669 |
filteredList := aList. |
|
1670 |
self updateContentsFromFilteredList |
|
1671 |
||
1672 |
"Created: / 05-05-2011 / 14:46:12 / cg" |
|
1673 |
! |
|
1674 |
||
1675 |
setRawList:aList |
|
1676 |
rawList := aList. |
|
1677 |
self updateContentsFromRawList |
|
1678 |
||
1679 |
"Created: / 05-05-2011 / 14:46:22 / cg" |
|
1680 |
! |
|
1681 |
||
1682 |
shellCommandFor:aFilenameString |
|
1683 |
"returns the shellCommand to be used" |
|
1684 |
||
11050 | 1685 |
|template| |
1686 |
||
1687 |
(template := self shellCommandTemplateFor:aFilenameString) isNil ifTrue:[ |
|
1688 |
^ nil |
|
1689 |
]. |
|
1690 |
^ template bindWith:aFilenameString |
|
1691 |
||
1692 |
"Modified: / 05-01-2012 / 11:10:03 / cg" |
|
1693 |
! |
|
1694 |
||
1695 |
shellCommandTemplateFor:aFilenameString |
|
12332 | 1696 |
"returns the shellCommand to be used (contains %1 for the filename). |
1697 |
When first called, looks for ctags (both a private and the system-supplied), |
|
1698 |
and tries to see what version that is. I prefer exuberant ctags version" |
|
11050 | 1699 |
|
9891 | 1700 |
|lcSuffix shellCommand isCSuffix isCPlusPlusSuffix isJavaSuffix isEiffelSuffix isFortranSuffix |
12332 | 1701 |
isTCLSuffix isRubySuffix isPythonSuffix isPhpSuffix isJavaScriptSuffix |
12341 | 1702 |
showOnly response suff fn langValue langOption moreOptions| |
9891 | 1703 |
|
1704 |
ctagsCommand isNil ifTrue:[ |
|
9915
923eae65fc70
fixes for reusability in cc browser
Claus Gittinger <cg@exept.de>
parents:
9891
diff
changeset
|
1705 |
remoteTarget isNil ifTrue:[ |
9891 | 1706 |
"/ local use |
1707 |
suff := (OperatingSystem isMSWINDOWSlike) ifTrue:'.exe' ifFalse:''. |
|
1708 |
||
14881 | 1709 |
ctagsCommand := 'ctags',suff. |
9891 | 1710 |
(ctagsCommand notNil and:[(fn := ctagsCommand asFilename) isExecutableProgram]) ifTrue:[ |
1711 |
ctagsCommand := fn pathName. |
|
1712 |
ctagsIsExCtags := ctagsIsExCtags5x := true. |
|
1713 |
] ifFalse:[ |
|
14881 | 1714 |
ctagsCommand := 'bin/ctags',suff. |
9891 | 1715 |
(ctagsCommand notNil and:[(fn := ctagsCommand asFilename) isExecutableProgram]) ifTrue:[ |
1716 |
ctagsCommand := fn pathName. |
|
14881 | 1717 |
ctagsIsExCtags := ctagsIsExCtags5x := true. |
9891 | 1718 |
] ifFalse:[ |
14881 | 1719 |
ctagsCommand := Smalltalk getPackageFileName:'stx/support/tools/ctags-5.8/ctags',suff. |
9891 | 1720 |
(ctagsCommand notNil and:[(fn := ctagsCommand asFilename) isExecutableProgram]) ifTrue:[ |
1721 |
ctagsCommand := fn pathName. |
|
14881 | 1722 |
ctagsIsExCtags := ctagsIsExCtags5x := true. |
9891 | 1723 |
] ifFalse:[ |
14881 | 1724 |
ctagsCommand := Smalltalk getPackageFileName:'stx/support/tools/ctags-3.2.2/ctags',suff. |
1725 |
(ctagsCommand notNil and:[(fn := ctagsCommand asFilename) isExecutableProgram]) ifTrue:[ |
|
1726 |
ctagsCommand := fn pathName. |
|
1727 |
ctagsIsExCtags := true. |
|
1728 |
ctagsIsExCtags5x := false. |
|
1729 |
] ifFalse:[ |
|
1730 |
ctagsIsExCtags := nil. |
|
1731 |
ctagsIsExCtags5x := nil. |
|
1732 |
ctagsCommand := Smalltalk getPackageFileName:'stx/support/tools/ctags/ctags',suff. |
|
1733 |
(ctagsCommand notNil and:[(fn := ctagsCommand asFilename) isExecutableProgram]) ifTrue:[ |
|
1734 |
ctagsCommand := fn pathName. |
|
1735 |
] ifFalse:[ |
|
1736 |
"/ use systems default ctags command |
|
1737 |
ctagsCommand := 'ctags'. |
|
1738 |
] |
|
1739 |
] |
|
1740 |
]. |
|
9891 | 1741 |
] |
14881 | 1742 |
] |
9891 | 1743 |
] ifFalse:[ |
1744 |
"/ cross-development |
|
1745 |
"/ target remoteOperatingSystem = 'Linux' ifTrue:[ |
|
1746 |
"/ use systems default ctags command |
|
1747 |
ctagsCommand := 'ctags'. |
|
1748 |
ctagsIsExCtags := nil. |
|
1749 |
ctagsIsExCtags5x := nil. |
|
1750 |
"/ ] |
|
1751 |
]. |
|
1752 |
]. |
|
1753 |
||
1754 |
(ctagsIsExCtags isNil or:[ctagsIsExCtags5x isNil]) ifTrue:[ |
|
1755 |
ctagsCommand notNil ifTrue:[ |
|
1756 |
response := OperatingSystem getCommandOutputFrom:(ctagsCommand, ' --version'). |
|
1757 |
(response notNil |
|
1758 |
and:[response asLowercase startsWith:'exuberant ctags']) ifTrue:[ |
|
1759 |
ctagsIsExCtags := true. |
|
1760 |
||
1761 |
response := (response copyFrom:'exuberant ctags' size + 1) withoutSeparators. |
|
1762 |
ctagsIsExCtags5x := response startsWith:'5.' |
|
1763 |
]. |
|
1764 |
]. |
|
1765 |
]. |
|
1766 |
||
12344 | 1767 |
ctagsIsExCtags5x ifTrue:[ |
1768 |
langOption := '--language-force=%1'. |
|
1769 |
] ifFalse:[ ctagsIsExCtags ifTrue:[ |
|
1770 |
langOption := '--lang=%1'. |
|
1771 |
]]. |
|
1772 |
||
9891 | 1773 |
shellCommand := ctagsCommand. |
1774 |
(shellCommand includes:Character space) ifTrue:[ |
|
1775 |
shellCommand := '"',shellCommand,'"'. |
|
1776 |
]. |
|
12341 | 1777 |
moreOptions := ''. |
9891 | 1778 |
|
1779 |
showOnly := self showOnly. |
|
1780 |
||
1781 |
lcSuffix := aFilenameString asFilename suffix asLowercase. |
|
1782 |
isCSuffix := self class isCSuffix:lcSuffix. |
|
12344 | 1783 |
|
1784 |
"/ a hack for temporary files generated by stc |
|
1785 |
lcSuffix = 'sc' ifTrue:[ |
|
1786 |
(aFilenameString asFilename asAbsoluteFilename components includes:'stx') ifTrue:[ |
|
1787 |
isCSuffix := true |
|
1788 |
]. |
|
1789 |
]. |
|
9891 | 1790 |
isCPlusPlusSuffix := self class isCPlusPlusSuffix:lcSuffix. |
1791 |
||
1792 |
(shellCommand notNil and:[(ctagsIsExCtags ? false)]) ifTrue:[ |
|
1793 |
isJavaSuffix := self class isJavaSuffix:lcSuffix. |
|
1794 |
isEiffelSuffix := self class isEiffelSuffix:lcSuffix. |
|
1795 |
isFortranSuffix := self class isFortranSuffix:lcSuffix. |
|
1796 |
||
1797 |
"/ ex_ctags supports c, c++, java, fortran and a few others |
|
1798 |
(isCSuffix or:[isCPlusPlusSuffix or:[isJavaSuffix or:[isEiffelSuffix or:[isFortranSuffix]]]]) ifFalse:[ |
|
1799 |
(ctagsIsExCtags5x ? false) ifFalse:[ |
|
1800 |
^ nil |
|
1801 |
]. |
|
12332 | 1802 |
|
1803 |
"/ ex_ctags5.x also supports: |
|
1804 |
"/ Assembler, AWK, ASP, BETA, |
|
1805 |
"/ Bourne/Korn/Z Shell, C, C++, C#, COBOL, Eiffel, Erlang, Fortran, Java, Lisp, |
|
1806 |
"/ Lua, Makefile, Pascal, Perl, PHP, PL/SQL, Python, REXX, Ruby, Scheme, |
|
1807 |
"/ S-Lang, SML (Standard ML), Tcl, Vera, Verilog, VHDL, Vim, and YACC. |
|
9891 | 1808 |
]. |
12332 | 1809 |
isTCLSuffix := self class isTCLSuffix:lcSuffix. |
1810 |
isRubySuffix := self class isRubySuffix:lcSuffix. |
|
1811 |
isPythonSuffix := self class isPythonSuffix:lcSuffix. |
|
1812 |
isPhpSuffix := self class isPhpSuffix:lcSuffix. |
|
1813 |
isJavaScriptSuffix := self class isJavaScriptSuffix:lcSuffix. |
|
9891 | 1814 |
|
1815 |
usingDefaultCTags := false. |
|
1816 |
shellCommand := shellCommand asFilename asAbsoluteFilename pathName. |
|
1817 |
"/ shellCommand := shellCommand, ' -f - --c-types=f --file-scope=no'. |
|
1818 |
"/ shellCommand := shellCommand, ' -f - --file-scope=yes'. |
|
1819 |
"/ shellCommand := shellCommand, ' -f - --file-scope=yes'. |
|
1820 |
shellCommand := shellCommand, ' -f - --file-scope=yes --excmd=number'. |
|
1821 |
||
1822 |
(isCSuffix or:[isCPlusPlusSuffix]) ifTrue:[ |
|
1823 |
isCPlusPlusSuffix |
|
12341 | 1824 |
ifTrue:[ langValue := 'c++'] |
1825 |
ifFalse:[ langValue := 'c']. |
|
9891 | 1826 |
|
1827 |
showOnly == #classes ifTrue:[ |
|
12341 | 1828 |
moreOptions := moreOptions, ' --c-types=c' |
9891 | 1829 |
] ifFalse:[ |
1830 |
showOnly == #functions ifTrue:[ |
|
12341 | 1831 |
moreOptions := moreOptions, ' --c-types=f' |
9891 | 1832 |
] ifFalse:[ |
1833 |
showOnly == #functionsAndVariables ifTrue:[ |
|
12341 | 1834 |
moreOptions := moreOptions, ' --c-types=fv' |
9891 | 1835 |
] ifFalse:[ |
1836 |
showOnly == #classesFunctionsAndVariables ifTrue:[ |
|
12341 | 1837 |
moreOptions := moreOptions, ' --c-types=cfv' |
9891 | 1838 |
] ifFalse:[ |
1839 |
showOnly == #variables ifTrue:[ |
|
12341 | 1840 |
moreOptions := moreOptions, ' --c-types=v' |
9891 | 1841 |
] ifFalse:[ |
1842 |
showOnly == #types ifTrue:[ |
|
12341 | 1843 |
moreOptions := moreOptions, ' --c-types=t' |
9891 | 1844 |
] |
1845 |
] |
|
1846 |
] |
|
1847 |
] |
|
1848 |
] |
|
1849 |
]. |
|
14346 | 1850 |
self hideStructMembers == true ifTrue:[ moreOptions := moreOptions, ' --c-types=-m']. |
1851 |
self hideDefines == true ifTrue:[ moreOptions := moreOptions, ' --c-types=-d' ]. |
|
1852 |
self hideTypedefs == true ifTrue:[ moreOptions := moreOptions, ' --c-types=-t' ]. |
|
1853 |
self hideStructures == true ifTrue:[ moreOptions := moreOptions, ' --c-types=-s']. |
|
1854 |
self hideVariables == true ifTrue:[ moreOptions := moreOptions, ' --c-types=-v']. |
|
1855 |
self hideFunctions == true ifTrue:[ moreOptions := moreOptions, ' --c-types=-f']. |
|
1856 |
self hideClasses == true ifTrue:[ moreOptions := moreOptions, ' --c-types=-c']. |
|
9891 | 1857 |
]. |
12332 | 1858 |
|
9891 | 1859 |
isJavaSuffix ifTrue:[ |
12341 | 1860 |
langValue := 'java'. |
9891 | 1861 |
|
1862 |
showOnly == #javaClasses ifTrue:[ |
|
12341 | 1863 |
moreOptions := moreOptions, ' --java-types=c' |
9891 | 1864 |
] ifFalse:[ |
1865 |
showOnly == #javaMethods ifTrue:[ |
|
12341 | 1866 |
moreOptions := moreOptions, ' --java-types=m' |
9891 | 1867 |
] ifFalse:[ |
1868 |
showOnly == #javaClassesAndMethods ifTrue:[ |
|
12341 | 1869 |
moreOptions := moreOptions, ' --java-types=mc' |
9891 | 1870 |
] |
1871 |
] |
|
1872 |
]. |
|
14346 | 1873 |
self hideJavaClasses == true ifTrue:[ moreOptions := moreOptions, ' --java-types=-c' ]. |
1874 |
self hideJavaMethods == true ifTrue:[ moreOptions := moreOptions, ' --java-types=-m' ]. |
|
1875 |
self hideJavaInterfaces == true ifTrue:[ moreOptions := moreOptions, ' --java-types=-i' ]. |
|
1876 |
self hideJavaFields == true ifTrue:[ moreOptions := moreOptions, ' --java-types=-f' ]. |
|
1877 |
self hideJavaPackages == true ifTrue:[ moreOptions := moreOptions, ' --java-types=-p' ]. |
|
9891 | 1878 |
]. |
12332 | 1879 |
|
9891 | 1880 |
isEiffelSuffix ifTrue:[ |
12341 | 1881 |
langValue := 'eiffel'. |
9891 | 1882 |
|
12332 | 1883 |
showOnly == #classes ifTrue:[ |
12341 | 1884 |
moreOptions := moreOptions, ' --eiffel-types=c' |
9891 | 1885 |
] ifFalse:[ |
1886 |
showOnly == #features ifTrue:[ |
|
12341 | 1887 |
moreOptions := moreOptions, ' --eiffel-types=f' |
9891 | 1888 |
] |
1889 |
]. |
|
1890 |
"/ hideEiffelClasses == true ifTrue:[ |
|
12341 | 1891 |
"/ moreOptions := moreOptions, ' --eiffel-types=-c' |
9891 | 1892 |
"/ ]. |
1893 |
"/ hideEiffelFeatures == true ifTrue:[ |
|
12341 | 1894 |
"/ moreOptions := moreOptions, ' --eiffel-types=-m' |
9891 | 1895 |
"/ ]. |
1896 |
]. |
|
1897 |
||
1898 |
isFortranSuffix ifTrue:[ |
|
12341 | 1899 |
langValue := 'fortran'. |
9891 | 1900 |
|
1901 |
showOnly == #functions ifTrue:[ |
|
12341 | 1902 |
moreOptions := moreOptions, ' --fortran-types=f' |
9891 | 1903 |
] ifFalse:[ |
1904 |
showOnly == #interfaces ifTrue:[ |
|
12341 | 1905 |
moreOptions := moreOptions, ' --fortran-types=i' |
9891 | 1906 |
] ifFalse:[ |
1907 |
showOnly == #subroutines ifTrue:[ |
|
12341 | 1908 |
moreOptions := moreOptions, ' --fortran-types=s' |
9891 | 1909 |
] ifFalse:[ |
1910 |
showOnly == #commonBlocks == true ifTrue:[ |
|
12341 | 1911 |
moreOptions := moreOptions, ' --fortran-types=c' |
9891 | 1912 |
] |
1913 |
] |
|
1914 |
] |
|
1915 |
]. |
|
1916 |
"/ hideFortranFunctions == true ifTrue:[ |
|
12341 | 1917 |
"/ moreOptions := moreOptions, ' --fortran-types=-f' |
9891 | 1918 |
"/ ]. |
1919 |
"/ hideFortranInterfaces == true ifTrue:[ |
|
12341 | 1920 |
"/ moreOptions := moreOptions, ' --fortran-types=-i' |
9891 | 1921 |
"/ ]. |
1922 |
"/ hideFortranSubroutines == true ifTrue:[ |
|
12341 | 1923 |
"/ moreOptions := moreOptions, ' --fortran-types=-s' |
9891 | 1924 |
"/ ]. |
1925 |
"/ hideFortranCommonBlocks == true ifTrue:[ |
|
12341 | 1926 |
"/ moreOptions := moreOptions, ' --fortran-types=-c' |
9891 | 1927 |
"/ ]. |
1928 |
"/ hideFortranEntryPoints == true ifTrue:[ |
|
12341 | 1929 |
"/ moreOptions := moreOptions, ' --fortran-types=-e' |
9891 | 1930 |
"/ ]. |
1931 |
"/ hideFortranLabels == true ifTrue:[ |
|
12341 | 1932 |
"/ moreOptions := moreOptions, ' --fortran-types=-l' |
9891 | 1933 |
"/ ]. |
1934 |
"/ hideFortranDerivedTypes == true ifTrue:[ |
|
12341 | 1935 |
"/ moreOptions := moreOptions, ' --fortran-types=-t' |
9891 | 1936 |
"/ ]. |
1937 |
]. |
|
1938 |
||
1939 |
"/ shellCommand := shellCommand, ' -f -'. |
|
12341 | 1940 |
langValue notNil ifTrue:[ |
1941 |
langOption notNil ifTrue:[ |
|
1942 |
shellCommand := shellCommand , ' ' , (langOption bindWith:langValue) |
|
1943 |
]. |
|
1944 |
]. |
|
1945 |
moreOptions notEmptyOrNil ifTrue:[ |
|
1946 |
shellCommand := shellCommand , moreOptions |
|
1947 |
]. |
|
11050 | 1948 |
shellCommand := shellCommand, ' "%1"'. |
9915
923eae65fc70
fixes for reusability in cc browser
Claus Gittinger <cg@exept.de>
parents:
9891
diff
changeset
|
1949 |
remoteTarget notNil ifTrue:[ |
923eae65fc70
fixes for reusability in cc browser
Claus Gittinger <cg@exept.de>
parents:
9891
diff
changeset
|
1950 |
^ (remoteTarget makeRemoteCommandFrom:shellCommand inDirectory:'./'). |
9891 | 1951 |
]. |
1952 |
^ shellCommand. |
|
1953 |
]. |
|
1954 |
||
1955 |
"/ regular ctags: assume supports c, c++ only |
|
1956 |
isCSuffix ifFalse:[ |
|
1957 |
^ nil |
|
1958 |
]. |
|
1959 |
||
1960 |
usingDefaultCTags := true. |
|
1961 |
||
1962 |
shellCommand := 'ctags'. |
|
1963 |
||
1964 |
"/ "sunos and realIX have no option -s" |
|
1965 |
"/ (OperatingSystem getOSType = 'linux') ifTrue:[ |
|
1966 |
"/ shellCommand := 'ctags -S' |
|
1967 |
"/ ]. |
|
15240 | 1968 |
Transcript showCR:('TagList [info]: using default ctags command (not ctags from stx): <', shellCommand, '>'). |
9891 | 1969 |
ctagsCommand := nil. "/ flush - so we will check again. |
1970 |
||
11050 | 1971 |
shellCommand := shellCommand, ' "%1"'. |
9915
923eae65fc70
fixes for reusability in cc browser
Claus Gittinger <cg@exept.de>
parents:
9891
diff
changeset
|
1972 |
remoteTarget notNil ifTrue:[ |
923eae65fc70
fixes for reusability in cc browser
Claus Gittinger <cg@exept.de>
parents:
9891
diff
changeset
|
1973 |
^ (remoteTarget makeRemoteCommandFrom:shellCommand inDirectory:'./'). |
9891 | 1974 |
]. |
1975 |
^ shellCommand |
|
1976 |
||
1977 |
"Modified: / 08-07-2010 / 00:23:24 / cg" |
|
11050 | 1978 |
"Created: / 05-01-2012 / 11:07:41 / cg" |
9891 | 1979 |
! |
1980 |
||
1981 |
sortBlock |
|
1982 |
"sort AND group" |
|
1983 |
||
1984 |
|sortBlock| |
|
1985 |
||
1986 |
sortCriteria := self sortCriteria. |
|
1987 |
sortBlock := self sortBlockForSortCriteria. |
|
1988 |
||
1989 |
groupBy isNil ifTrue:[ |
|
1990 |
^ sortBlock |
|
1991 |
]. |
|
1992 |
||
1993 |
^ [:a :b| |
|
1994 |
|t1 t2 l1 l2| |
|
1995 |
||
1996 |
t1 := a typeIdentifierInList ? ' '. |
|
1997 |
t2 := b typeIdentifierInList ? ' '. |
|
1998 |
t1 = t2 ifTrue:[ |
|
1999 |
sortBlock value:a value:b |
|
2000 |
] ifFalse:[ |
|
2001 |
t1 < t2 |
|
2002 |
] |
|
2003 |
]. |
|
2004 |
||
2005 |
"Modified: / 05-05-2011 / 15:35:02 / cg" |
|
2006 |
! |
|
2007 |
||
2008 |
sortBlockForSortCriteria |
|
2009 |
sortCriteria == #byName ifTrue:[ |
|
2010 |
^ [:a :b| |
|
2011 |
|l1 l2| |
|
2012 |
||
9939
b9bfde3e776b
changed: #sortBlockForSortCriteria
Claus Gittinger <cg@exept.de>
parents:
9921
diff
changeset
|
2013 |
l1 := a label ? ''. |
b9bfde3e776b
changed: #sortBlockForSortCriteria
Claus Gittinger <cg@exept.de>
parents:
9921
diff
changeset
|
2014 |
l2 := b label ? ''. |
9891 | 2015 |
l1 = l2 ifTrue:[ |
2016 |
(a lineNumber ? 0) < (b lineNumber ? 0) |
|
2017 |
] ifFalse:[ |
|
2018 |
l1 < l2 |
|
2019 |
] |
|
2020 |
] |
|
2021 |
]. |
|
2022 |
||
2023 |
sortCriteria == #byNameIgnoringCase ifTrue:[ |
|
2024 |
^ [:a :b| |
|
2025 |
|l1 l2| |
|
2026 |
||
2027 |
l1 := a label asLowercase. |
|
2028 |
l2 := b label asLowercase. |
|
2029 |
l1 = l2 ifTrue:[ |
|
2030 |
(a lineNumber ? 0) < (b lineNumber ? 0) |
|
2031 |
] ifFalse:[ |
|
2032 |
l1 < l2 |
|
2033 |
] |
|
2034 |
] |
|
2035 |
]. |
|
2036 |
||
2037 |
sortCriteria == #byNameIgnoringLeadingUnderscores ifTrue:[ |
|
2038 |
^ [:a :b| |
|
2039 |
|l1 l2 i| |
|
2040 |
||
2041 |
l1 := a label. |
|
2042 |
l2 := b label. |
|
2043 |
l1 = l2 ifTrue:[ |
|
2044 |
(a lineNumber ? 0) < (b lineNumber ? 0) |
|
2045 |
] ifFalse:[ |
|
2046 |
i := l1 findFirst:[:c | (c ~~ $_)]. |
|
2047 |
i > 1 ifTrue:[ |
|
2048 |
l1 := l1 copyFrom:i |
|
2049 |
]. |
|
2050 |
i := l2 findFirst:[:c | (c ~~ $_)]. |
|
2051 |
i > 1 ifTrue:[ |
|
2052 |
l2 := l2 copyFrom:i |
|
2053 |
]. |
|
2054 |
l1 < l2 |
|
2055 |
] |
|
2056 |
]. |
|
2057 |
]. |
|
2058 |
||
2059 |
sortCriteria == #byNameIgnoringLeadingUnderscoresAndCase ifTrue:[ |
|
2060 |
^ [:a :b| |
|
2061 |
|l1 l2 i| |
|
2062 |
||
2063 |
l1 := a label asLowercase. |
|
2064 |
l2 := b label asLowercase. |
|
2065 |
l1 = l2 ifTrue:[ |
|
2066 |
(a lineNumber ? 0) < (b lineNumber ? 0) |
|
2067 |
] ifFalse:[ |
|
2068 |
i := l1 findFirst:[:c | (c ~~ $_)]. |
|
2069 |
i > 1 ifTrue:[ |
|
2070 |
l1 := l1 copyFrom:i |
|
2071 |
]. |
|
2072 |
i := l2 findFirst:[:c | (c ~~ $_)]. |
|
2073 |
i > 1 ifTrue:[ |
|
2074 |
l2 := l2 copyFrom:i |
|
2075 |
]. |
|
2076 |
l1 < l2 |
|
2077 |
] |
|
2078 |
]. |
|
2079 |
]. |
|
2080 |
||
2081 |
"/ sortCriteria == #byType ifTrue:[ |
|
2082 |
"/ ^ [:a :b| |
|
2083 |
"/ |t1 t2 l1 l2| |
|
2084 |
"/ t1 := a typeIdentifierInList ? ' '. |
|
2085 |
"/ t2 := b typeIdentifierInList ? ' '. |
|
2086 |
"/ t1 = t2 ifTrue:[ |
|
2087 |
"/ l1 := a label. |
|
2088 |
"/ l2 := b label. |
|
2089 |
"/ l1 = l2 ifTrue:[ |
|
2090 |
"/ (a lineNumber ? 0) < (b lineNumber ? 0) |
|
2091 |
"/ ] ifFalse:[ |
|
2092 |
"/ l1 < l2 |
|
2093 |
"/ ] |
|
2094 |
"/ ] ifFalse:[ |
|
2095 |
"/ t1 < t2 |
|
2096 |
"/ ] |
|
2097 |
"/ ]. |
|
2098 |
"/ ]. |
|
2099 |
||
2100 |
^ [:a :b| a lineNumber < b lineNumber ] |
|
2101 |
||
2102 |
"Created: / 05-05-2011 / 14:37:25 / cg" |
|
9939
b9bfde3e776b
changed: #sortBlockForSortCriteria
Claus Gittinger <cg@exept.de>
parents:
9921
diff
changeset
|
2103 |
"Modified: / 18-06-2011 / 19:30:45 / cg" |
9891 | 2104 |
! |
2105 |
||
2106 |
updateContentsFromFilteredList |
|
2107 |
"call this, if only the sort order has changed (no need to call ctags or filter again)" |
|
2108 |
||
2109 |
|list| |
|
2110 |
||
2111 |
list := filteredList. |
|
2112 |
list notEmptyOrNil ifTrue:[ |
|
2113 |
list := list asSortedCollection:(self sortBlock). |
|
2114 |
]. |
|
2115 |
self contents:(list ? #()). |
|
2116 |
||
2117 |
"Created: / 05-05-2011 / 14:45:41 / cg" |
|
2118 |
! |
|
2119 |
||
2120 |
updateContentsFromRawList |
|
2121 |
"call this, if only the filter has changed (no need to call ctags again)" |
|
2122 |
||
2123 |
filteredList := (filter isEmptyOrNil or:[rawList isNil]) |
|
2124 |
ifTrue:[ rawList ] |
|
2125 |
ifFalse:[ self applyFilterToList:rawList ]. |
|
13634 | 2126 |
filteredList notNil ifTrue:[ |
14346 | 2127 |
self hideFunctions == true ifTrue:[ |
13634 | 2128 |
filteredList := filteredList reject:[:tag | tag isFunctionTag]. |
2129 |
] ifFalse:[ |
|
2130 |
showOnly == #functions ifTrue:[ |
|
14433 | 2131 |
filteredList := filteredList select:[:tag | tag isFunctionOrMethodTag]. |
13634 | 2132 |
]. |
13631 | 2133 |
]. |
2134 |
]. |
|
9891 | 2135 |
self updateContentsFromFilteredList |
2136 |
||
2137 |
"Modified: / 05-05-2011 / 15:13:14 / cg" |
|
2138 |
! ! |
|
2139 |
||
2140 |
!TagList methodsFor:'queries'! |
|
2141 |
||
2142 |
bestTagForLine:lineNr |
|
14478 | 2143 |
"find the best tag for a given lineNr in the file" |
2144 |
||
2145 |
^ self bestTagForLine:lineNr filtering:nil |
|
2146 |
! |
|
2147 |
||
2148 |
bestTagForLine:lineNr filtering:tagFilterOrNil |
|
14479 | 2149 |
"find the best tag for a given lineNr in the file. |
2150 |
The filter can be used eg. to find only function tags |
|
2151 |
(i.e. to ignore case and goto labels in C)" |
|
14478 | 2152 |
|
9891 | 2153 |
|bestTag sortedByLineNumber| |
2154 |
||
2155 |
sortedByLineNumber := self sortedByLineNumber. |
|
2156 |
self do:[:eachTag | |
|
2157 |
eachTag notNil ifTrue:[ |
|
14478 | 2158 |
(tagFilterOrNil isNil or:[tagFilterOrNil value:eachTag]) ifTrue:[ |
2159 |
eachTag lineNumber <= lineNr ifTrue:[ |
|
2160 |
bestTag isNil ifTrue:[ |
|
2161 |
bestTag := eachTag. |
|
2162 |
"/ sortedByLineNumber ifTrue:[^ eachTag]. |
|
2163 |
] ifFalse:[ |
|
2164 |
eachTag lineNumber > bestTag lineNumber ifTrue:[ |
|
2165 |
bestTag := eachTag |
|
2166 |
] |
|
9891 | 2167 |
] |
14478 | 2168 |
]. |
9891 | 2169 |
]. |
2170 |
]. |
|
2171 |
]. |
|
2172 |
||
2173 |
^ bestTag |
|
13342 | 2174 |
! |
2175 |
||
2176 |
tagForFunction:functionName |
|
2177 |
^ rawList |
|
2178 |
detect:[:tag | |
|
2179 |
tag isFunctionTag and:[ tag label = functionName ] |
|
2180 |
] |
|
2181 |
ifNone:nil |
|
2182 |
! |
|
2183 |
||
2184 |
tagsValidForFile |
|
2185 |
"the file, for which the tagsList is valid" |
|
2186 |
||
2187 |
^ tagsValidForFile |
|
9891 | 2188 |
! ! |
2189 |
||
2190 |
!TagList methodsFor:'tag generation'! |
|
2191 |
||
2192 |
fromFile:aFile in:aTempDirectory |
|
2193 |
"create tags from a file; |
|
2194 |
either use the ctags/etags command, or an intenral naive, simple method." |
|
2195 |
||
13215 | 2196 |
|forceSimpleTagList list shellCmd numTags fileContents| |
9891 | 2197 |
|
2198 |
rawList := nil. |
|
13342 | 2199 |
tagsValidForFile := nil. |
2200 |
||
9891 | 2201 |
list := OrderedCollection new. |
2202 |
||
13215 | 2203 |
forceSimpleTagList := false. |
2204 |
"/ the simple builtin tagList generator is actually better than the ctags output for makefiles |
|
2205 |
(self class makeFilePatterns contains:[:aPattern | (aPattern match:aFile baseName asLowercase)]) ifTrue:[forceSimpleTagList := true]. |
|
2206 |
||
2207 |
forceSimpleTagList ifFalse:[ |
|
2208 |
shellCmd := (self shellCommandFor:aFile pathName). |
|
2209 |
shellCmd notNil ifTrue:[ |
|
2210 |
tagTypesPresent := false. "/ will be set again, when ctags command provides types |
|
13753 | 2211 |
list := self getTagListFromFile:aFile usingCommand:shellCmd mode:nil in:aTempDirectory. |
2212 |
(self class isCSuffix:(aFile suffix)) ifTrue:[ |
|
2213 |
list addAll:(self additionalCTagsInFile:aFile) |
|
2214 |
] |
|
13215 | 2215 |
]. |
9891 | 2216 |
]. |
12334 | 2217 |
|
12343 | 2218 |
"/ in case ctags could not find anything, try our own, naive fallback (not too bad either) |
12334 | 2219 |
list isEmptyOrNil ifTrue:[ |
2220 |
list := self getSimpleTagListFromFile:aFile in:aTempDirectory. |
|
2221 |
]. |
|
9891 | 2222 |
tagTypesPresent := true. |
2223 |
||
2224 |
numTags := list size. |
|
2225 |
fileContents := aFile contents. |
|
2226 |
||
2227 |
(numTags > 1 and:[fileContents notEmptyOrNil]) ifTrue:[ |
|
2228 |
numTags to:1 by:-1 do:[:i| |
|
2229 |
|tag lnr| |
|
2230 |
||
2231 |
tag := list at:i ifAbsent:nil. |
|
2232 |
||
2233 |
lnr := tag lineNumberIn:fileContents. |
|
2234 |
lnr == 0 ifTrue:[ |
|
2235 |
list removeIndex:i |
|
2236 |
] ifFalse:[ |
|
2237 |
tag lineNumber:lnr |
|
2238 |
] |
|
2239 |
] |
|
2240 |
]. |
|
2241 |
self setRawList:list. |
|
13342 | 2242 |
tagsValidForFile := aFile. |
9891 | 2243 |
|
11050 | 2244 |
"Modified: / 05-01-2012 / 11:03:29 / cg" |
9891 | 2245 |
! |
2246 |
||
2247 |
fromFile:aFile in:aTempDirectory onTarget:aTarget |
|
2248 |
"create tags from a file; |
|
2249 |
either use the ctags/etags command, or an intenral naive, simple method. |
|
2250 |
" |
|
2251 |
|list| |
|
2252 |
||
9915
923eae65fc70
fixes for reusability in cc browser
Claus Gittinger <cg@exept.de>
parents:
9891
diff
changeset
|
2253 |
remoteTarget := aTarget. |
9891 | 2254 |
|
2255 |
[ |
|
2256 |
list := self fromFile:aFile in:aTempDirectory |
|
11497
b27035bd0981
#ensure instead of #valueNowOrOnUnwindDo:
Stefan Vogel <sv@exept.de>
parents:
11466
diff
changeset
|
2257 |
] ensure:[ |
9915
923eae65fc70
fixes for reusability in cc browser
Claus Gittinger <cg@exept.de>
parents:
9891
diff
changeset
|
2258 |
remoteTarget := nil. |
9891 | 2259 |
]. |
2260 |
^ list |
|
2261 |
! |
|
2262 |
||
2263 |
getModeFromFileSuffixOf:aFile |
|
2264 |
|suffix mode| |
|
2265 |
||
2266 |
suffix := aFile suffix. |
|
2267 |
(self class isCSuffix:suffix) ifTrue:[ |
|
2268 |
^ #c. |
|
2269 |
]. |
|
2270 |
(self class isCPlusPlusSuffix:suffix) ifTrue:[ |
|
2271 |
^ #c. |
|
2272 |
]. |
|
2273 |
(self class isJavaSuffix:suffix) ifTrue:[ |
|
2274 |
^ #java. |
|
2275 |
]. |
|
2276 |
(self class isFortranSuffix:suffix) ifTrue:[ |
|
2277 |
^ #fortran. |
|
2278 |
]. |
|
2279 |
(self class isEiffelSuffix:suffix) ifTrue:[ |
|
2280 |
^ #eiffel. |
|
2281 |
]. |
|
2282 |
(self class isHTMLSuffix:suffix) ifTrue:[ |
|
2283 |
^ #html. |
|
2284 |
]. |
|
2285 |
^ mode |
|
2286 |
||
2287 |
"Modified: / 20-04-2011 / 19:02:54 / cg" |
|
2288 |
! |
|
2289 |
||
11050 | 2290 |
getTagListFromFile:aFile usingCommand:scmd mode:modeOrNil in:aTempDirectory |
9891 | 2291 |
"create ctags-list from a file, using cmd (which is etags / ctags)" |
2292 |
||
2293 |
|list pipe tag tagFile contents mode infoDictionary| |
|
2294 |
||
11050 | 2295 |
(mode := modeOrNil) isNil ifTrue:[ |
2296 |
mode := self getModeFromFileSuffixOf:aFile. |
|
2297 |
]. |
|
9891 | 2298 |
list := OrderedCollection new:512. |
2299 |
||
2300 |
infoDictionary := Dictionary new. |
|
2301 |
||
2302 |
"/ Transcript showCR:'execute tags command: ', scmd. |
|
2303 |
usingDefaultCTags ifFalse:[ |
|
2304 |
(pipe := PipeStream readingFrom:scmd) notNil ifTrue:[ |
|
2305 |
[ |
|
2306 |
|line atEnd| |
|
2307 |
||
2308 |
atEnd := false. |
|
2309 |
ReadError |
|
2310 |
handle:[:ex | ] |
|
2311 |
do:[ |
|
2312 |
[atEnd] whileFalse:[ |
|
2313 |
(line := pipe nextLine) isNil ifTrue:[ |
|
2314 |
atEnd := pipe atEnd |
|
2315 |
] ifFalse:[ |
|
2316 |
"/ Transcript showCR:line. |
|
2317 |
tag := self tagFromLine:line mode:mode using:infoDictionary. |
|
2318 |
||
2319 |
tag notNil ifTrue:[ |
|
2320 |
list add:tag |
|
2321 |
] |
|
2322 |
] |
|
2323 |
] |
|
2324 |
] |
|
2325 |
] ensure:[pipe close]. |
|
2326 |
]. |
|
2327 |
^ list. |
|
2328 |
]. |
|
2329 |
||
2330 |
(OperatingSystem executeCommand:scmd inDirectory:aTempDirectory) ifTrue:[ |
|
2331 |
tagFile := aTempDirectory construct:'tags'. |
|
2332 |
||
2333 |
tagFile exists ifTrue:[ |
|
2334 |
contents := tagFile contents. |
|
2335 |
||
2336 |
contents notNil ifTrue:[ |
|
2337 |
contents do:[:aLine| |
|
2338 |
(tag := self tagFromLine:aLine mode:mode using:infoDictionary) notNil ifTrue:[list add:tag] |
|
2339 |
] |
|
2340 |
]. |
|
2341 |
Exception |
|
2342 |
handle:[:ex| ] |
|
2343 |
do:[tagFile remove]. |
|
2344 |
]. |
|
2345 |
^ list. |
|
2346 |
]. |
|
2347 |
||
2348 |
scmd = 'ctags' ifFalse:[ |
|
2349 |
"/ try default ctags without any options |
|
11050 | 2350 |
^ self getTagListFromFile:aFile usingCommand:'ctags' mode:modeOrNil in:aTempDirectory |
9891 | 2351 |
]. |
2352 |
^ #() |
|
11050 | 2353 |
|
2354 |
"Created: / 05-01-2012 / 11:03:04 / cg" |
|
9891 | 2355 |
! |
2356 |
||
2357 |
tagFromLine:aLine mode:languageMode using:infoDictionary |
|
2358 |
"analyze the line as returned from ctags and create a corresponding tag object for it" |
|
2359 |
||
2360 |
|stream word1 word2 tagType pattern key |
|
2361 |
file className lineNumber tagClass fmtString fmt |
|
2362 |
showOnly| |
|
2363 |
||
13317 | 2364 |
"/ Transcript showCR:aLine. |
9891 | 2365 |
aLine size < 6 ifTrue:[ |
2366 |
^ nil |
|
2367 |
]. |
|
2368 |
aLine first == $!! ifTrue:[ |
|
2369 |
(aLine startsWith:'!!_TAG_FILE_FORMAT') ifTrue:[ |
|
2370 |
"/ aha - ex. ctags |
|
2371 |
stream := aLine readStream. |
|
2372 |
stream upTo:Character tab. |
|
2373 |
stream skipSeparators. |
|
2374 |
fmtString := stream upTo:Character tab. |
|
2375 |
fmt := Integer readFrom:fmtString onError:nil. |
|
2376 |
fmt notNil ifTrue:[ |
|
2377 |
infoDictionary at:#formatVersion put:fmt |
|
2378 |
] |
|
2379 |
]. |
|
2380 |
^ nil |
|
2381 |
]. |
|
2382 |
||
2383 |
"/ tab separated list; except for the pattern, which might include a tab. |
|
2384 |
stream := aLine readStream. |
|
2385 |
key := stream upTo:Character tab. |
|
2386 |
stream skipSeparators. |
|
2387 |
file := stream upTo:Character tab. |
|
2388 |
stream skipSeparators. |
|
2389 |
stream peek == $/ ifTrue:[ |
|
2390 |
stream next. |
|
2391 |
pattern := stream upTo:$/. |
|
2392 |
[(pattern last) == $\] whileTrue:[ |
|
2393 |
pattern at:(pattern size) put:$/. |
|
2394 |
pattern := pattern , (stream upTo:$/). |
|
2395 |
]. |
|
2396 |
] ifFalse:[ |
|
2397 |
stream peek isDigit ifTrue:[ |
|
2398 |
lineNumber := Integer readFrom:stream onError:nil. |
|
2399 |
lineNumber isNil ifTrue:[ |
|
2400 |
self halt:'should not happen - please debug'. |
|
2401 |
] ifFalse:[ |
|
2402 |
pattern := key. |
|
2403 |
]. |
|
2404 |
] ifFalse:[ |
|
2405 |
self halt:'should not happen - please debug'. |
|
2406 |
]. |
|
2407 |
]. |
|
2408 |
stream peekFor:$;. |
|
2409 |
stream peekFor:$". |
|
2410 |
stream skipSeparators. |
|
2411 |
tagType := stream upTo:Character tab. |
|
2412 |
stream skipSeparators. |
|
2413 |
word1 := stream upTo:Character tab. "/ optional file: (scope) |
|
2414 |
stream skipSeparators. |
|
2415 |
word2 := stream upTo:Character tab. "/ optional class: |
|
2416 |
||
2417 |
(word1 startsWith:'file:') ifTrue:[ "/ file: (scope) |
|
14346 | 2418 |
self hideStatic == true ifTrue:[^ nil]. |
9891 | 2419 |
]. |
2420 |
||
2421 |
(word2 startsWith: 'class:') ifTrue:[ |
|
2422 |
className := word2 copyFrom:('class:' size) |
|
2423 |
] ifFalse:[ |
|
2424 |
(word1 startsWith: 'class:') ifTrue:[ |
|
2425 |
className := word1 copyFrom:('class:' size) |
|
2426 |
] |
|
2427 |
]. |
|
2428 |
"/ (word1 startsWith: 'class:') ifTrue:[ |
|
2429 |
"/ className := word1 copyFrom:('class:' size) |
|
2430 |
"/ ]. |
|
2431 |
"/ (word2 startsWith: 'class:') ifTrue:[ |
|
2432 |
"/ className := word2 copyFrom:('class:' size) |
|
2433 |
"/ ]. |
|
2434 |
||
2435 |
tagClass := Tag. |
|
2436 |
tagClass autoload. |
|
2437 |
||
2438 |
"/ typeCharacter to tag-Class mapping... |
|
2439 |
languageMode == #c ifTrue:[ |
|
14385 | 2440 |
"/ Transcript showCR:tagType. |
9891 | 2441 |
tagType = 'v' ifTrue:[ |
14346 | 2442 |
self hideVariables == true ifTrue:[^ nil]. |
9891 | 2443 |
tagClass := Tag::TVariable |
2444 |
] ifFalse:[ tagType = 'f' ifTrue:[ |
|
14346 | 2445 |
self hideFunctions == true ifTrue:[^ nil]. |
9891 | 2446 |
tagClass := Tag::TFunction |
2447 |
] ifFalse:[ tagType = 'd' ifTrue:[ |
|
14346 | 2448 |
self hideDefines == true ifTrue:[^ nil]. |
9891 | 2449 |
tagClass := Tag::TMacro |
2450 |
] ifFalse:[ tagType = 't' ifTrue:[ |
|
14346 | 2451 |
self hideTypedefs == true ifTrue:[^ nil]. |
9891 | 2452 |
tagClass := Tag::TTypedef |
2453 |
] ifFalse:[ tagType = 'm' ifTrue:[ |
|
14346 | 2454 |
self hideStructMembers == true ifTrue:[^ nil]. |
9891 | 2455 |
tagClass := Tag::TMember |
2456 |
] ifFalse:[ tagType = 's' ifTrue:[ |
|
14346 | 2457 |
self hideStructures == true ifTrue:[^ nil]. |
9891 | 2458 |
tagClass := Tag::TStruct |
2459 |
] ifFalse:[ tagType = 'u' ifTrue:[ |
|
14346 | 2460 |
self hideStructures == true ifTrue:[^ nil]. |
9891 | 2461 |
tagClass := Tag::TUnion |
2462 |
] ifFalse:[ tagType = 'c' ifTrue:[ |
|
14346 | 2463 |
self hideClasses == true ifTrue:[^ nil]. |
9891 | 2464 |
tagClass := Tag::TClass |
2465 |
] ifFalse:[ tagType = 'e' ifTrue:[ |
|
2466 |
tagClass := Tag::TEnumMember. |
|
2467 |
] ifFalse:[ tagType = 'g' ifTrue:[ |
|
2468 |
tagClass := Tag::TEnum. |
|
2469 |
"/ ] ifFalse:[ tagType = 'n' ifTrue:[ |
|
2470 |
"/ tagClass := Tag::TNamespace |
|
2471 |
"/ ] ifFalse:[ tagType = 'p' ifTrue:[ |
|
2472 |
"/ tagClass := Tag::TFunctionPrototype |
|
2473 |
"/ ] ifFalse:[ tagType = 'x' ifTrue:[ |
|
2474 |
"/ tagClass := Tag::TExternVariable |
|
2475 |
] ifFalse:[ |
|
13753 | 2476 |
self breakPoint:#cg. |
9891 | 2477 |
"/ add more here |
2478 |
]]]]]]]]]] |
|
2479 |
] ifFalse:[ languageMode == #java ifTrue:[ |
|
2480 |
tagType = 'c' ifTrue:[ |
|
14346 | 2481 |
self hideJavaClasses == true ifTrue:[^ nil]. |
9891 | 2482 |
tagClass := Tag::TClass |
2483 |
] ifFalse:[ tagType = 'm' ifTrue:[ |
|
14346 | 2484 |
self hideJavaMethods == true ifTrue:[^ nil]. |
9891 | 2485 |
tagClass := Tag::TMethod |
2486 |
] ifFalse:[ tagType = 'f' ifTrue:[ |
|
14346 | 2487 |
self hideJavaFields == true ifTrue:[^ nil]. |
9891 | 2488 |
tagClass := Tag::TField |
2489 |
] ifFalse:[ tagType = 'i' ifTrue:[ |
|
14346 | 2490 |
self hideJavaInterfaces == true ifTrue:[^ nil]. |
9891 | 2491 |
tagClass := Tag::TInterface |
2492 |
] ifFalse:[ tagType = 'p' ifTrue:[ |
|
14346 | 2493 |
self hideJavaPackages == true ifTrue:[^ nil]. |
9891 | 2494 |
tagClass := Tag::TPackage |
2495 |
] ifFalse:[ |
|
2496 |
"/ add more here */ |
|
2497 |
]]]]] |
|
2498 |
] ifFalse:[ languageMode == #eiffel ifTrue:[ |
|
2499 |
tagType = 'c' ifTrue:[ |
|
14346 | 2500 |
self hideClasses == true ifTrue:[^ nil]. |
9891 | 2501 |
tagClass := Tag::TClass |
2502 |
"/ ] ifFalse:[ tagType = 'f' ifTrue:[ |
|
2503 |
"/ tagClass := Tag::TFeature |
|
2504 |
"/ ] ifFalse:[ tagType = 'l' ifTrue:[ |
|
2505 |
"/ tagClass := Tag::TLocalEntity |
|
2506 |
] ifFalse:[ |
|
2507 |
"/ add more here */ |
|
2508 |
] |
|
2509 |
] ifFalse:[ languageMode == #fortran ifTrue:[ |
|
2510 |
tagType = 'f' ifTrue:[ |
|
14346 | 2511 |
self hideFunctions == true ifTrue:[^ nil]. |
9891 | 2512 |
tagClass := Tag::TFunction |
2513 |
] ifFalse:[ tagType = 'i' ifTrue:[ |
|
2514 |
"/ hideInterfaces == true ifTrue:[^ nil]. |
|
2515 |
tagClass := Tag::TInterface |
|
2516 |
] ifFalse:[ tagType = 't' ifTrue:[ |
|
14346 | 2517 |
self hideTypedefs == true ifTrue:[^ nil]. |
9891 | 2518 |
tagClass := Tag::TTypedef |
2519 |
"/ ] ifFalse:[ tagType = 'l' ifTrue:[ |
|
2520 |
"/ tagClass := Tag::TLabel |
|
2521 |
"/ ] ifFalse:[ tagType = 'm' ifTrue:[ |
|
2522 |
"/ tagClass := Tag::TModule |
|
2523 |
"/ ] ifFalse:[ tagType = 'n' ifTrue:[ |
|
2524 |
"/ tagClass := Tag::TNameList |
|
2525 |
"/ ] ifFalse:[ tagType = 'p' ifTrue:[ |
|
2526 |
"/ tagClass := Tag::TProgram |
|
2527 |
"/ ] ifFalse:[ tagType = 's' ifTrue:[ |
|
2528 |
"/ tagClass := Tag::TSubroutine |
|
2529 |
"/ ] ifFalse:[ tagType = 'b' ifTrue:[ |
|
2530 |
"/ tagClass := Tag::TBlockData |
|
2531 |
"/ ] ifFalse:[ tagType = 'c' ifTrue:[ |
|
2532 |
"/ tagClass := Tag::TCommonBlock |
|
2533 |
"/ ] ifFalse:[ tagType = 'e' ifTrue:[ |
|
2534 |
"/ tagClass := Tag::TEntryPoint |
|
2535 |
] ifFalse:[ |
|
2536 |
"/ add more here */ |
|
2537 |
]]] |
|
2538 |
]]]]. |
|
2539 |
||
2540 |
tagTypesPresent := true. |
|
2541 |
||
2542 |
tagType size == 0 ifTrue:[ |
|
2543 |
tagType := '' |
|
2544 |
] ifFalse:[ |
|
2545 |
(showOnly := self showOnly) notNil ifTrue:[ |
|
2546 |
showOnly == #classes ifTrue:[ |
|
2547 |
tagClass ~~ Tag::TClass ifTrue:[^ nil]. |
|
2548 |
] ifFalse:[ showOnly == #functions ifTrue:[ |
|
2549 |
tagClass ~~ Tag::TFunction ifTrue:[^ nil]. |
|
2550 |
] ifFalse:[ showOnly == #variables ifTrue:[ |
|
2551 |
tagClass ~~ Tag::TVariable ifTrue:[^ nil]. |
|
2552 |
] ifFalse:[ showOnly == #types ifTrue:[ |
|
2553 |
(tagClass ~~ Tag::TTypedef |
|
2554 |
and:[ true "tagClass ~~ Tag::TUnion" |
|
2555 |
and:[ tagClass ~~ Tag::TStruct ]])ifTrue:[^ nil]. |
|
2556 |
] ifFalse:[ showOnly == #functionsAndVariables ifTrue:[ |
|
2557 |
((tagClass ~~ Tag::TFunction) |
|
2558 |
and:[tagClass ~~ Tag::TVariable]) ifTrue:[^ nil]. |
|
2559 |
] ifFalse:[ showOnly == #classesFunctionsAndVariables ifTrue:[ |
|
2560 |
((tagClass ~~ Tag::TFunction) |
|
2561 |
and:[(tagClass ~~ Tag::TVariable) |
|
2562 |
and:[tagClass ~~ Tag::TClass]]) ifTrue:[^ nil]. |
|
2563 |
] ifFalse:[ showOnly == #defines ifTrue:[ |
|
2564 |
tagClass ~~ Tag::TMacro ifTrue:[^ nil]. |
|
2565 |
] ifFalse:[ showOnly == #structs ifTrue:[ |
|
2566 |
tagClass ~~ Tag::TStruct ifTrue:[^ nil]. |
|
2567 |
] ifFalse:[ showOnly == #everything ifTrue:[ |
|
2568 |
] ifFalse:[ |
|
2569 |
self halt:'unhandled showOnly'. |
|
2570 |
]]]]]]]]] |
|
2571 |
] |
|
2572 |
]. |
|
2573 |
||
2574 |
^ tagClass label:key |
|
2575 |
pattern:pattern |
|
2576 |
type:tagType |
|
2577 |
lineNumber:lineNumber |
|
2578 |
className:className. |
|
2579 |
||
2580 |
"Modified: / 05-05-2011 / 15:45:55 / cg" |
|
2581 |
! ! |
|
2582 |
||
13153 | 2583 |
!TagList methodsFor:'tag generation - helpers'! |
2584 |
||
14345 | 2585 |
linewiseNaiveTagsInFile:aFilePath using:parseLineBlock |
2586 |
"common helper for naive linewise parsing tags" |
|
2587 |
||
2588 |
|targets line lineNr s tagOrTagCollection| |
|
2589 |
||
2590 |
Tag autoload. |
|
2591 |
||
2592 |
targets := OrderedCollection new. |
|
2593 |
s := aFilePath asFilename readStream. |
|
2594 |
s notNil ifTrue:[ |
|
2595 |
s := LineNumberReadStream readingFrom:s. |
|
2596 |
[s atEnd] whileFalse:[ |
|
2597 |
lineNr := s lineNumber. |
|
2598 |
line := s nextLine. |
|
2599 |
||
2600 |
tagOrTagCollection := parseLineBlock value:line value:lineNr. |
|
2601 |
tagOrTagCollection notNil ifTrue:[ |
|
2602 |
tagOrTagCollection isCollection ifTrue:[ |
|
2603 |
targets addAll:tagOrTagCollection |
|
2604 |
] ifFalse:[ |
|
2605 |
targets add:tagOrTagCollection |
|
2606 |
]. |
|
2607 |
]. |
|
2608 |
]. |
|
2609 |
s close |
|
2610 |
]. |
|
2611 |
^ targets |
|
2612 |
||
2613 |
"Modified: / 08-05-2011 / 10:12:29 / cg" |
|
2614 |
! |
|
2615 |
||
13153 | 2616 |
plainTextBetweenHTMLElement:startElement andElementWithTag:endTag |
2617 |
"applied to an <h1>-tag element, passing '/h1' as endTag, |
|
2618 |
this retrieves the plain text of the headline. Used by the tag list." |
|
2619 |
||
2620 |
|el collector hasSpace txt| |
|
2621 |
||
14726 | 2622 |
collector := CharacterWriteStream on:(String new:100). |
13153 | 2623 |
el := startElement next. |
2624 |
||
2625 |
hasSpace := true. |
|
2626 |
[ el notNil and:[el tag ~= endTag] ] whileTrue:[ |
|
2627 |
el isTextElement ifTrue:[ |
|
2628 |
hasSpace ifFalse:[ |
|
2629 |
collector space. |
|
2630 |
hasSpace := true. |
|
2631 |
]. |
|
2632 |
txt := el text withoutSeparators. |
|
2633 |
txt notEmpty ifTrue:[ |
|
2634 |
collector nextPutAll:txt. |
|
2635 |
hasSpace := txt endsWith:' '. |
|
2636 |
] |
|
2637 |
]. |
|
2638 |
el := el next |
|
2639 |
]. |
|
2640 |
^ collector contents |
|
2641 |
||
2642 |
"Created: / 12-09-2012 / 12:38:01 / cg" |
|
2643 |
! |
|
2644 |
||
2645 |
tagsForLinesStartingWithIdentifierAndColon:aFilePath |
|
2646 |
"helper for yacc tags (and maybe others in the future): |
|
2647 |
naive, q&d scan for lines matching: |
|
2648 |
<anything>: |
|
2649 |
" |
|
2650 |
||
2651 |
|targets line l lineNr nm s words w| |
|
2652 |
||
2653 |
Tag autoload. |
|
2654 |
||
2655 |
targets := OrderedCollection new. |
|
2656 |
s := aFilePath asFilename readStream. |
|
2657 |
s notNil ifTrue:[ |
|
2658 |
s := LineNumberReadStream readingFrom:s. |
|
2659 |
[s atEnd] whileFalse:[ |
|
2660 |
line := s nextLine. |
|
2661 |
l := line withoutSeparators. |
|
2662 |
words := l asCollectionOfWords. |
|
2663 |
||
2664 |
words size >= 1 ifTrue:[ |
|
2665 |
w := words first. |
|
2666 |
(w endsWith:$:) ifTrue:[ |
|
14579 | 2667 |
nm := w copyButLast. |
13153 | 2668 |
|
2669 |
lineNr := s lineNumber - 1. |
|
2670 |
targets add:(Tag::TLabel |
|
2671 |
label:nm |
|
2672 |
pattern:nil |
|
2673 |
type:nil |
|
2674 |
lineNumber:lineNr). |
|
2675 |
]. |
|
2676 |
] |
|
2677 |
]. |
|
2678 |
s close |
|
2679 |
]. |
|
2680 |
^ targets |
|
2681 |
||
2682 |
"Created: / 28-09-2012 / 14:45:35 / cg" |
|
2683 |
! ! |
|
2684 |
||
9891 | 2685 |
!TagList methodsFor:'tag generation - simple'! |
2686 |
||
13753 | 2687 |
additionalCTagsInFile:aFilePath |
2688 |
"additional tags, which are not found by the standard ctags utility: |
|
2689 |
case foo: - case label tags |
|
2690 |
" |
|
2691 |
||
2692 |
|targets line lineNr s caseLabel l| |
|
2693 |
||
14385 | 2694 |
self hideLabels ifTrue:[^ #()]. |
14438 | 2695 |
showOnly notNil ifTrue:[^ #()]. |
14385 | 2696 |
|
13753 | 2697 |
Tag autoload. |
2698 |
||
2699 |
targets := OrderedCollection new. |
|
2700 |
s := aFilePath asFilename readStream. |
|
2701 |
s notNil ifTrue:[ |
|
2702 |
s := LineNumberReadStream readingFrom:s. |
|
2703 |
[s atEnd] whileFalse:[ |
|
2704 |
line := s nextLine withoutSeparators. |
|
14443 | 2705 |
((line startsWith:'case ') and:[line includes:$:]) ifTrue:[ |
13753 | 2706 |
l := line readStream. |
2707 |
l skip:5. |
|
2708 |
caseLabel := l upTo:$:. |
|
2709 |
lineNr := s lineNumber - 1. |
|
13771 | 2710 |
targets add:(Tag::TCaseLabel |
14443 | 2711 |
label:'case ' allItalic , caseLabel",' <case>' allItalic" |
13753 | 2712 |
pattern:nil |
2713 |
type:nil |
|
2714 |
lineNumber:lineNr). |
|
14443 | 2715 |
] ifFalse:[ |
2716 |
(line startsWith:'default:') ifTrue:[ |
|
2717 |
lineNr := s lineNumber - 1. |
|
2718 |
targets add:(Tag::TCaseLabel |
|
2719 |
label:'case ' allItalic, 'default'",' <case>' allItalic" |
|
2720 |
pattern:nil |
|
2721 |
type:nil |
|
2722 |
lineNumber:lineNr). |
|
2723 |
]. |
|
2724 |
]. |
|
13753 | 2725 |
]. |
2726 |
s close |
|
2727 |
]. |
|
2728 |
^ targets |
|
2729 |
! |
|
2730 |
||
9891 | 2731 |
assemblerTagsInFile:aFilePath |
2732 |
"assembler tags: |
|
2733 |
naive, q&d scan for lines matching: |
|
2734 |
<anything>: |
|
2735 |
CAVEAT: |
|
2736 |
the code below handles linux-i386 assembler only (for now) |
|
2737 |
" |
|
2738 |
||
2739 |
|targets line l lineNr nm s words w directive |
|
11502 | 2740 |
hideLocals hideLocals2 hideLocals3 hideData hideText currentSegment| |
9891 | 2741 |
|
2742 |
Tag autoload. |
|
2743 |
||
2744 |
targets := OrderedCollection new. |
|
2745 |
s := aFilePath asFilename readStream. |
|
2746 |
s notNil ifTrue:[ |
|
14346 | 2747 |
hideLocals := self flagNamed:#hideLocalLabels ? false. |
2748 |
hideLocals2 := self flagNamed:#hideLocalLabels2 ? false. |
|
2749 |
hideLocals3 := self flagNamed:#hideLocalLabels3 ? false. |
|
2750 |
hideData := self flagNamed:#hideDataLabels ? false. |
|
2751 |
hideText := self flagNamed:#hideTextLabels ? false. |
|
9891 | 2752 |
currentSegment := #text. |
2753 |
||
2754 |
s := LineNumberReadStream readingFrom:s. |
|
2755 |
[s atEnd] whileFalse:[ |
|
2756 |
lineNr := s lineNumber. |
|
2757 |
line := s nextLine. |
|
2758 |
l := line withoutSeparators. |
|
2759 |
words := l asCollectionOfWords. |
|
2760 |
words size >= 1 ifTrue:[ |
|
2761 |
w := words first. |
|
2762 |
(w endsWith:$:) ifTrue:[ |
|
2763 |
(hideText and:[currentSegment == #text]) ifFalse:[ |
|
2764 |
(hideData and:[currentSegment == #data]) ifFalse:[ |
|
2765 |
(hideLocals and:[(w startsWith:$.)]) ifFalse:[ |
|
11466 | 2766 |
(hideLocals2 and:[(w startsWith:$_) not]) ifFalse:[ |
11502 | 2767 |
(hideLocals3 |
2768 |
and:[ (w startsWith:$L) |
|
2769 |
and:[ (w size > 1) |
|
2770 |
and:[ ((w copyFrom:2 to:(w size-1)) conform:[:c | c isDigit]) |
|
2771 |
]]]) ifFalse:[ |
|
14579 | 2772 |
nm := w copyButLast. |
11502 | 2773 |
targets add:(Tag::TLabel |
2774 |
label:nm |
|
2775 |
pattern:nil |
|
2776 |
type:nil |
|
2777 |
lineNumber:lineNr). |
|
2778 |
]. |
|
11466 | 2779 |
]. |
9891 | 2780 |
]. |
2781 |
]. |
|
2782 |
]. |
|
2783 |
words size >= 2 ifTrue:[ |
|
2784 |
directive := words second |
|
2785 |
] ifFalse:[ |
|
2786 |
directive := nil. |
|
2787 |
] |
|
2788 |
] ifFalse:[ |
|
2789 |
directive := w. |
|
2790 |
]. |
|
2791 |
(directive notNil and:[directive startsWith:$.]) ifTrue:[ |
|
2792 |
directive = '.text' ifTrue:[ |
|
2793 |
currentSegment := #text |
|
2794 |
] ifFalse:[ directive = '.data' ifTrue:[ |
|
2795 |
currentSegment := #data |
|
2796 |
] ifFalse:[ directive = '.bss' ifTrue:[ |
|
2797 |
currentSegment := #data |
|
2798 |
] ifFalse:[ directive = '.rodata' ifTrue:[ |
|
2799 |
currentSegment := #data |
|
2800 |
]]]] |
|
2801 |
] |
|
2802 |
] |
|
2803 |
]. |
|
2804 |
s close |
|
2805 |
]. |
|
2806 |
^ targets |
|
2807 |
||
11502 | 2808 |
"Modified: / 13-05-2012 / 11:25:49 / cg" |
9891 | 2809 |
! |
2810 |
||
11825 | 2811 |
batchTagsInFile:aFilePath |
2812 |
"batch-file |
|
2813 |
naive, q&d scan for lines matching: |
|
2814 |
:<anything> |
|
2815 |
" |
|
2816 |
||
2817 |
|targets line l lineNr nm s words| |
|
2818 |
||
2819 |
Tag autoload. |
|
2820 |
||
2821 |
targets := OrderedCollection new. |
|
2822 |
s := aFilePath asFilename readStream. |
|
2823 |
s notNil ifTrue:[ |
|
2824 |
s := LineNumberReadStream readingFrom:s. |
|
2825 |
[s atEnd] whileFalse:[ |
|
2826 |
line := s nextLine. |
|
2827 |
(line startsWith:$:) ifTrue:[ |
|
2828 |
l := line withoutSeparators. |
|
2829 |
words := (l copyFrom:2) asCollectionOfWords. |
|
2830 |
||
2831 |
words size == 1 ifTrue:[ |
|
2832 |
nm := words first. |
|
2833 |
||
2834 |
lineNr := s lineNumber - 1. |
|
2835 |
targets add:(Tag::TLabel |
|
2836 |
label:nm |
|
2837 |
pattern:nil |
|
2838 |
type:nil |
|
2839 |
lineNumber:lineNr). |
|
2840 |
]. |
|
2841 |
] |
|
2842 |
]. |
|
2843 |
s close |
|
2844 |
]. |
|
2845 |
^ targets |
|
2846 |
||
2847 |
"Created: / 28-09-2012 / 14:45:10 / cg" |
|
2848 |
! |
|
2849 |
||
11762 | 2850 |
dartTagsInFile:aFilePath |
2851 |
"dart tags: |
|
2852 |
naive, q&d scan for lines matching: |
|
2853 |
interface foo |
|
2854 |
class foo |
|
2855 |
function foo |
|
2856 |
" |
|
2857 |
||
2858 |
|targets line l lineNr nm s| |
|
2859 |
||
2860 |
Tag autoload. |
|
2861 |
||
2862 |
targets := OrderedCollection new. |
|
2863 |
s := aFilePath asFilename readStream. |
|
2864 |
s notNil ifTrue:[ |
|
2865 |
s := LineNumberReadStream readingFrom:s. |
|
2866 |
[s atEnd] whileFalse:[ |
|
2867 |
lineNr := s lineNumber. |
|
2868 |
line := s nextLine. |
|
2869 |
l := line withoutSeparators. |
|
2870 |
{ |
|
14346 | 2871 |
{ 'function ' . #functions . self hideFunctions . Tag::TFunction } . |
2872 |
{ 'var ' . #variables . self hideVariables . Tag::TVariable } . |
|
2873 |
{ 'class ' . #classes . self hideClasses . Tag::TClass } . |
|
2874 |
{ 'abstract class ' . #classes . self hideClasses . Tag::TClass } . |
|
2875 |
{ 'interface ' . #interfaces . self hideDartInterfaces . Tag::TInterface } . |
|
2876 |
{ 'factory ' . #methods . self hideMethods . Tag::TMethod } . |
|
11762 | 2877 |
} tuplesDo:[:keywordSpace :showOnlyEnum :hideVariableValue :tagType| |
2878 |
(l startsWith:keywordSpace) ifTrue:[ |
|
2879 |
(showOnly isNil or:[showOnly == showOnlyEnum]) ifTrue:[ |
|
2880 |
hideVariableValue ~~ true ifTrue:[ |
|
2881 |
nm := l copyFrom:(keywordSpace size + 1). |
|
2882 |
nm := nm copyTo:(nm |
|
11771 | 2883 |
findFirst:[:ch | (ch isLetterOrDigit or:['$_.' includes:ch]) not] |
11762 | 2884 |
ifNone:nm size+1)-1. |
2885 |
targets add:(tagType |
|
2886 |
label:nm |
|
2887 |
pattern:nil |
|
2888 |
type:nil |
|
2889 |
lineNumber:lineNr). |
|
2890 |
] |
|
2891 |
] |
|
2892 |
]. |
|
2893 |
] |
|
2894 |
]. |
|
2895 |
s close |
|
2896 |
]. |
|
2897 |
^ targets |
|
2898 |
||
2899 |
"Created: / 28-06-2010 / 12:44:25 / cg" |
|
11766 | 2900 |
"Modified: / 22-08-2012 / 21:32:33 / cg" |
11762 | 2901 |
! |
2902 |
||
11050 | 2903 |
getSimpleTagListFromFile:aFileOrString in:aTempDirectory |
9891 | 2904 |
"fallback, if no ctags is present, or if the file is not a c-file. |
2905 |
Implemented here for some other file types (Makefiles) |
|
2906 |
" |
|
14365 | 2907 |
|file lcName pathName suffix mime| |
11050 | 2908 |
|
2909 |
file := aFileOrString asFilename. |
|
2910 |
lcName := file baseName asLowercase. |
|
2911 |
pathName := file pathName. |
|
2912 |
||
9891 | 2913 |
self class makeFilePatterns do:[:aPattern | |
2914 |
(aPattern match:lcName) ifTrue:[ |
|
2915 |
^ self class makeTargetTagsInFile:pathName filter:showOnly |
|
2916 |
] |
|
2917 |
]. |
|
2918 |
||
2919 |
suffix := lcName asFilename suffix. |
|
14365 | 2920 |
mime := TagList tagMimeTypeForFile:file. |
2921 |
||
2922 |
((self class isSmalltalkSuffix:suffix) |
|
2923 |
or:[(mime ? '') includesString:'smalltalk']) ifTrue:[ |
|
9891 | 2924 |
"/ smalltalk tags - simulated |
11050 | 2925 |
^ self stTagsInFile:pathName in:aTempDirectory |
9891 | 2926 |
]. |
14365 | 2927 |
((self class isPythonSuffix:suffix) |
2928 |
or:[(mime ? '') includesString:'python']) ifTrue:[ |
|
9891 | 2929 |
"/ python tags - simulated |
2930 |
^ self pythonTagsInFile:pathName |
|
2931 |
]. |
|
14365 | 2932 |
((self class isPhpSuffix:suffix) |
2933 |
or:[(mime ? '') includesString:'php']) ifTrue:[ |
|
9891 | 2934 |
"/ php tags - simulated |
2935 |
^ self phpTagsInFile:pathName |
|
2936 |
]. |
|
14365 | 2937 |
((self class isLispSuffix:suffix) |
2938 |
or:[(mime ? '') includesString:'lisp']) ifTrue:[ |
|
9891 | 2939 |
"/ lisp tags - simulated |
2940 |
^ self lispTagsInFile:pathName |
|
2941 |
]. |
|
14365 | 2942 |
((self class isOzSuffix:suffix) |
2943 |
or:[(mime ? '') includesString:'oz']) ifTrue:[ |
|
9891 | 2944 |
"/ oz tags - simulated |
2945 |
^ self ozTagsInFile:pathName |
|
2946 |
]. |
|
14365 | 2947 |
((self class isPrologSuffix:suffix) |
2948 |
or:[(mime ? '') includesString:'prolog']) ifTrue:[ |
|
9891 | 2949 |
"/ prolog tags - simulated |
2950 |
^ self prologTagsInFile:pathName |
|
2951 |
]. |
|
14365 | 2952 |
((self class isTCLSuffix:suffix) |
2953 |
or:[(mime ? '') includesString:'tcl']) ifTrue:[ |
|
9891 | 2954 |
"/ tcl tags - simulated |
2955 |
^ self tclTagsInFile:pathName |
|
2956 |
]. |
|
14365 | 2957 |
((self class isAssemblerSuffix:suffix) |
2958 |
or:[(mime ? '') includesString:'assembler']) ifTrue:[ |
|
9891 | 2959 |
"/ assembler tags - simulated |
2960 |
^ self assemblerTagsInFile:pathName |
|
2961 |
]. |
|
14365 | 2962 |
((self class isRubySuffix:suffix) |
2963 |
or:[(mime ? '') includesString:'ruby']) ifTrue:[ |
|
9891 | 2964 |
"/ ruby tags - simulated |
2965 |
^ self rubyTagsInFile:pathName |
|
2966 |
]. |
|
14365 | 2967 |
((self class isYaccSuffix:suffix) |
2968 |
or:[(mime ? '') includesString:'yacc']) ifTrue:[ |
|
9891 | 2969 |
"/ yacc tags - simulated |
2970 |
^ self yaccTagsInFile:pathName |
|
2971 |
]. |
|
14365 | 2972 |
((self class isJavaScriptSuffix:suffix) |
2973 |
or:[(mime ? '') includesString:'javascript']) ifTrue:[ |
|
9891 | 2974 |
"/ js tags - simulated |
2975 |
^ self javaScriptTagsInFile:pathName |
|
2976 |
]. |
|
14365 | 2977 |
((self class isDartSuffix:suffix) |
2978 |
or:[(mime ? '') includesString:'dart']) ifTrue:[ |
|
11766 | 2979 |
"/ dart tags - simulated |
2980 |
^ self dartTagsInFile:pathName |
|
2981 |
]. |
|
14365 | 2982 |
((self class isLuaSuffix:suffix) |
2983 |
or:[(mime ? '') includesString:'lua']) ifTrue:[ |
|
14345 | 2984 |
"/ lua tags - simulated |
2985 |
^ self luaTagsInFile:pathName |
|
2986 |
]. |
|
9891 | 2987 |
|
14365 | 2988 |
((self class isHTMLSuffix:suffix) |
2989 |
or:[(mime ? '') includesString:'html']) ifTrue:[ |
|
9891 | 2990 |
"/ html tags - simulated |
2991 |
^ self htmlTagsInFile:pathName |
|
2992 |
]. |
|
14365 | 2993 |
((self class isBatchSuffix:suffix) |
2994 |
or:[(mime ? '') includesString:'batch']) ifTrue:[ |
|
11825 | 2995 |
"/ batch tags - simulated |
2996 |
^ self batchTagsInFile:pathName |
|
2997 |
]. |
|
9891 | 2998 |
|
2999 |
"/ could add more here ... |
|
3000 |
^ nil. |
|
3001 |
||
11050 | 3002 |
"Created: / 05-01-2012 / 10:55:03 / cg" |
9891 | 3003 |
! |
3004 |
||
3005 |
htmlTagsInFile:aFilePath |
|
3006 |
"hatml tags: |
|
13153 | 3007 |
naive, q&d scan for lines containing: |
9891 | 3008 |
<textarea> |
3009 |
<input> |
|
3010 |
<table> |
|
3011 |
<script> |
|
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3012 |
<hX> |
9891 | 3013 |
" |
3014 |
||
3015 |
|targets line l lineNr s tag| |
|
3016 |
||
3017 |
"/ TODO: use HTMPParser to read all of them !! |
|
3018 |
||
3019 |
Tag autoload. |
|
3020 |
||
3021 |
targets := OrderedCollection new. |
|
3022 |
s := aFilePath asFilename readStream. |
|
3023 |
s notNil ifTrue:[ |
|
3024 |
s := LineNumberReadStream readingFrom:s. |
|
3025 |
[s atEnd] whileFalse:[ |
|
3026 |
lineNr := s lineNumber. |
|
3027 |
line := s nextLine. |
|
9918 | 3028 |
line := line withoutSeparators. |
3029 |
l := line asLowercase. |
|
9891 | 3030 |
|
3031 |
#( |
|
14579 | 3032 |
'textarea' hideHTMLTextArea nil |
3033 |
'input' hideHTMLInput nil |
|
3034 |
'table' hideHTMLTable nil |
|
3035 |
'script' hideHTMLScript nil |
|
3036 |
'form' hideHTMLForm nil |
|
3037 |
'a' nil anchors |
|
3038 |
'h1' hideHTMLHeaders headlines |
|
3039 |
'h2' hideHTMLHeaders headlines |
|
3040 |
'h3' hideHTMLHeaders headlines |
|
3041 |
'h4' hideHTMLHeaders headlines |
|
3042 |
'h5' hideHTMLHeaders headlines |
|
3043 |
'h6' hideHTMLHeaders headlines |
|
3044 |
) inGroupsOf:3 do:[:nm :hideInstVarName :thisType| |
|
11802 | 3045 |
|type hideHolder idx tagText doc markup label text markupName markupType |
3046 |
isHeader| |
|
9891 | 3047 |
|
3048 |
type := hideHolder := nil. |
|
3049 |
||
3050 |
idx := l indexOfSubCollection:('<',nm). |
|
3051 |
idx ~~ 0 ifTrue:[ |
|
11802 | 3052 |
hideHolder := hideInstVarName isNil |
3053 |
ifTrue:[ false ] |
|
14382 | 3054 |
ifFalse:[ self flagNamed:hideInstVarName ]. |
9891 | 3055 |
|
9918 | 3056 |
tagText := line copyFrom:idx. |
9891 | 3057 |
doc := HTMLParser new parseText:tagText. |
3058 |
markup := doc markup. |
|
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3059 |
markupName := markup name. |
11802 | 3060 |
markupType := "markup tag ?" markup type. |
3061 |
||
3062 |
isHeader := (#(h1 h2 h3 h4 h5 h6) includes:markupType). |
|
3063 |
isHeader ifTrue:[ |
|
3064 |
type := Tag::THeaderElement |
|
3065 |
] ifFalse: [ |
|
3066 |
markupType == #'form' ifTrue:[ |
|
3067 |
type := Tag::TFormElement |
|
3068 |
] ifFalse:[ |
|
3069 |
markupType == #'a' ifTrue:[ |
|
3070 |
type := Tag::TAnchorElement. |
|
3071 |
markupName := markup hrefString notEmptyOrNil ifTrue:['"',markup hrefString,'"'] ifFalse:[ markup name ] |
|
3072 |
] ifFalse:[ |
|
3073 |
type := Tag::TElement |
|
3074 |
] |
|
3075 |
]. |
|
3076 |
]. |
|
3077 |
||
9891 | 3078 |
markup id notEmptyOrNil ifTrue:[ |
3079 |
label := nm , ' (',markup id,')' |
|
3080 |
] ifFalse:[ |
|
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3081 |
markupName notEmptyOrNil ifTrue:[ |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3082 |
label := nm , ' (',markupName,')' |
9891 | 3083 |
] ifFalse:[ |
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3084 |
(markupType == #input and:[ markup valueString notEmptyOrNil ]) ifTrue:[ |
11802 | 3085 |
label := nm , ' ("',markup valueString,'")' |
9918 | 3086 |
] ifFalse:[ |
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3087 |
(markupType == #script and:[ markup src notEmptyOrNil ]) ifTrue:[ |
9918 | 3088 |
label := nm , ' ("',markup src,'")' |
3089 |
] ifFalse:[ |
|
11802 | 3090 |
( isHeader |
3091 |
and:[text := self plainTextBetweenHTMLElement:markup andElementWithTag:('/',markupType). |
|
3092 |
text notEmpty] |
|
3093 |
) ifTrue:[ |
|
11801
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3094 |
label := '"',text,'" (',nm,')' |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3095 |
] ifFalse:[ |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3096 |
label := nm |
18a705623785
better html tags (h-elements)
Claus Gittinger <cg@exept.de>
parents:
11771
diff
changeset
|
3097 |
] |
9918 | 3098 |
] |
3099 |
] |
|
9891 | 3100 |
]. |
3101 |
]. |
|
3102 |
||
14579 | 3103 |
(showOnly isNil or:[thisType isNil or:[showOnly == thisType]]) ifTrue:[ |
3104 |
hideHolder value ~~ true ifTrue:[ |
|
3105 |
tag := type |
|
3106 |
label:label |
|
3107 |
pattern:nil |
|
3108 |
type:nil |
|
3109 |
lineNumber:lineNr. |
|
3110 |
targets add:tag. |
|
3111 |
] |
|
9891 | 3112 |
] |
3113 |
]. |
|
3114 |
]. |
|
3115 |
]. |
|
3116 |
s close |
|
3117 |
]. |
|
3118 |
^ targets |
|
3119 |
||
3120 |
"Created: / 20-04-2011 / 18:59:29 / cg" |
|
11802 | 3121 |
"Modified: / 12-09-2012 / 17:54:07 / cg" |
9891 | 3122 |
! |
3123 |
||
3124 |
javaScriptTagsInFile:aFilePath |
|
3125 |
"javaScript tags: |
|
3126 |
naive, q&d scan for lines matching: |
|
3127 |
(function foo |
|
3128 |
" |
|
3129 |
||
3130 |
|targets line l lineNr nm s| |
|
3131 |
||
3132 |
Tag autoload. |
|
3133 |
||
3134 |
targets := OrderedCollection new. |
|
3135 |
s := aFilePath asFilename readStream. |
|
3136 |
s notNil ifTrue:[ |
|
3137 |
s := LineNumberReadStream readingFrom:s. |
|
3138 |
[s atEnd] whileFalse:[ |
|
3139 |
lineNr := s lineNumber. |
|
3140 |
line := s nextLine. |
|
3141 |
l := line withoutSeparators. |
|
3142 |
||
14359 | 3143 |
(l = 'function') ifTrue:[ |
3144 |
l := l , ' ' , (s nextLine withoutSeparators). |
|
3145 |
]. |
|
9891 | 3146 |
(l startsWith:'function ') ifTrue:[ |
3147 |
(showOnly isNil or:[showOnly == #functions]) ifTrue:[ |
|
14346 | 3148 |
self hideFunctions ~~ true ifTrue:[ |
9891 | 3149 |
nm := l copyFrom:('function ' size + 1). |
3150 |
nm := nm copyTo:(nm |
|
3151 |
findFirst:[:ch | (ch isLetterOrDigit or:['$_' includes:ch]) not] |
|
3152 |
ifNone:nm size+1)-1. |
|
3153 |
targets add:(Tag::TFunction |
|
3154 |
label:nm |
|
3155 |
pattern:nil |
|
3156 |
type:nil |
|
3157 |
lineNumber:lineNr). |
|
3158 |
] |
|
3159 |
] |
|
3160 |
] ifFalse:[ |
|
3161 |
(l startsWith:'var ') ifTrue:[ |
|
3162 |
(showOnly isNil or:[showOnly == #variables]) ifTrue:[ |
|
14346 | 3163 |
self hideVariables ~~ true ifTrue:[ |
9891 | 3164 |
nm := l copyFrom:('var ' size + 1). |
3165 |
nm := nm copyTo:(nm |
|
3166 |
findFirst:[:ch | (ch isLetterOrDigit or:['$_' includes:ch]) not] |
|
3167 |
ifNone:nm size+1)-1. |
|
3168 |
targets add:(Tag::TVariable |
|
3169 |
label:nm |
|
3170 |
pattern:nil |
|
3171 |
type:nil |
|
3172 |
lineNumber:lineNr). |
|
3173 |
]. |
|
3174 |
]. |
|
15072 | 3175 |
] ifFalse:[ |
3176 |
((l includesString:'=function') or:[(l includesString:'= function')]) ifTrue:[ |
|
3177 |
(showOnly isNil or:[showOnly == #functions]) ifTrue:[ |
|
3178 |
self hideFunctions ~~ true ifTrue:[ |
|
3179 |
nm := l copyTo:((l indexOf:$=) - 1). nm := nm withoutSeparators. |
|
3180 |
targets add:(Tag::TFunction |
|
3181 |
label:nm |
|
3182 |
pattern:nil |
|
3183 |
type:nil |
|
3184 |
lineNumber:lineNr). |
|
3185 |
]. |
|
3186 |
]. |
|
3187 |
]. |
|
9891 | 3188 |
]. |
3189 |
] |
|
3190 |
]. |
|
3191 |
s close |
|
3192 |
]. |
|
3193 |
^ targets |
|
3194 |
||
3195 |
"Created: / 28-06-2010 / 12:44:25 / cg" |
|
9921 | 3196 |
"Modified: / 08-05-2011 / 10:39:55 / cg" |
9891 | 3197 |
! |
3198 |
||
3199 |
lispTagFromLine:line lineNr:lineNr |
|
14344 | 3200 |
"lisp/scheme tags: |
9891 | 3201 |
naive, q&d scan for lines starting with (not syntax-aware): |
3202 |
(define ... |
|
3203 |
(defun ... |
|
3204 |
(defvar ... |
|
3205 |
(defmacro ... |
|
3206 |
(defclass ... |
|
3207 |
(defmethod ... |
|
3208 |
(defpackage ... |
|
3209 |
(eval-when ... |
|
3210 |
(define- ... |
|
3211 |
(def* ... |
|
3212 |
(set ... |
|
3213 |
(constant ... |
|
3214 |
(defconstant ... |
|
9921 | 3215 |
;;; more documentation |
9891 | 3216 |
" |
3217 |
||
14352 | 3218 |
|l nm words def inParens rest| |
9891 | 3219 |
|
3220 |
l := line withoutSeparators. |
|
3221 |
||
9921 | 3222 |
(l startsWith:'(') ifFalse:[ |
3223 |
(showOnly notNil and:[showOnly ~~ #documentation]) ifTrue:[^ nil]. |
|
14346 | 3224 |
self hideDocumentation == true ifTrue:[ ^ nil ]. |
9921 | 3225 |
|
3226 |
(l startsWith:';;;') ifFalse:[^ nil]. |
|
3227 |
rest := (l copyFrom:4) withoutSeparators. |
|
3228 |
rest isEmpty ifTrue:[^ nil]. |
|
14352 | 3229 |
(rest conform:[:ch | ch = $;]) ifTrue:[^ nil]. |
9921 | 3230 |
^ Tag::TDocumentation |
3231 |
label:(rest colorizeAllWith:(Color blue "grey")) |
|
3232 |
pattern:nil |
|
3233 |
type:nil |
|
3234 |
lineNumber:lineNr. |
|
3235 |
]. |
|
9891 | 3236 |
|
3237 |
words := (l copyFrom:2) asCollectionOfWords. |
|
3238 |
words size >= 2 ifFalse:[^ nil]. |
|
3239 |
||
3240 |
def := words first. |
|
3241 |
nm := words second. |
|
3242 |
(inParens := nm startsWith:'(') ifTrue:[ |
|
3243 |
nm := nm copyFrom:2. |
|
3244 |
] ifFalse:[ |
|
3245 |
nm := nm upTo:$(. "/ in case it is (define foo() - without space after name |
|
3246 |
(inParens := nm startsWith:'(') ifTrue:[ |
|
3247 |
nm := nm copyFrom:2. |
|
3248 |
]. |
|
3249 |
]. |
|
3250 |
(nm endsWith:')') ifTrue:[ |
|
14579 | 3251 |
nm := nm copyButLast |
9891 | 3252 |
]. |
3253 |
||
3254 |
def = 'defun' ifTrue:[ |
|
3255 |
(showOnly notNil and:[showOnly ~~ #functions]) ifTrue:[^ nil]. |
|
14346 | 3256 |
self hideFunctions == true ifTrue:[ ^ nil ]. |
9891 | 3257 |
^ Tag::TFunction |
3258 |
label:nm |
|
3259 |
pattern:nil |
|
3260 |
type:nil |
|
3261 |
lineNumber:lineNr. |
|
3262 |
]. |
|
3263 |
def = 'define' ifTrue:[ "/ scheme |
|
3264 |
inParens ifTrue:[ |
|
3265 |
(showOnly notNil and:[showOnly ~~ #functions]) ifTrue:[^ nil]. |
|
14346 | 3266 |
self hideFunctions == true ifTrue:[ ^ nil ]. |
9891 | 3267 |
^ Tag::TFunction |
3268 |
label:nm |
|
3269 |
pattern:nil |
|
3270 |
type:nil |
|
3271 |
lineNumber:lineNr. |
|
3272 |
] ifFalse:[ |
|
14344 | 3273 |
"/ check for (define name (lambda ... |
3274 |
"/ and (define name (macro ... |
|
3275 |
(words size > 2 |
|
3276 |
and:[ words third startsWith:'(' ]) ifTrue:[ |
|
3277 |
(words third = '(' and:[words size > 3]) ifTrue:[ |
|
3278 |
def := words fourth |
|
3279 |
] ifFalse:[ |
|
3280 |
def := words third copyFrom:2. |
|
3281 |
]. |
|
3282 |
def = 'lambda' ifTrue:[ |
|
3283 |
(showOnly notNil and:[showOnly ~~ #functions]) ifTrue:[^ nil]. |
|
14346 | 3284 |
self hideFunctions == true ifTrue:[ ^ nil ]. |
14344 | 3285 |
^ Tag::TFunction |
3286 |
label:nm |
|
3287 |
pattern:nil |
|
3288 |
type:nil |
|
3289 |
lineNumber:lineNr. |
|
3290 |
]. |
|
3291 |
def = 'macro' ifTrue:[ |
|
3292 |
(showOnly notNil and:[showOnly ~~ #macros]) ifTrue:[^ nil]. |
|
14346 | 3293 |
self hideLispMacros == true ifTrue:[ ^ nil ]. |
14344 | 3294 |
^ Tag::TLispMacro |
3295 |
label:nm |
|
3296 |
pattern:nil |
|
3297 |
type:nil |
|
3298 |
lineNumber:lineNr. |
|
3299 |
]. |
|
3300 |
]. |
|
9891 | 3301 |
(showOnly notNil and:[showOnly ~~ #variables]) ifTrue:[^ nil]. |
14346 | 3302 |
self hideVariables == true ifTrue:[ ^ nil ]. |
9891 | 3303 |
^ Tag::TVariable |
3304 |
label:nm |
|
3305 |
pattern:nil |
|
3306 |
type:nil |
|
3307 |
lineNumber:lineNr. |
|
3308 |
]. |
|
3309 |
^ nil |
|
3310 |
]. |
|
3311 |
||
3312 |
def = 'defvar' ifTrue:[ |
|
3313 |
(showOnly notNil and:[showOnly ~~ #variables]) ifTrue:[^ nil]. |
|
14346 | 3314 |
self hideVariables == true ifTrue:[ ^ nil ]. |
9891 | 3315 |
^ Tag::TVariable |
3316 |
label:nm |
|
3317 |
pattern:nil |
|
3318 |
type:nil |
|
3319 |
lineNumber:lineNr. |
|
3320 |
]. |
|
3321 |
def = 'set' ifTrue:[ |
|
14346 | 3322 |
self hideVariables == true ifTrue:[ ^ nil ]. |
9891 | 3323 |
^ Tag::TVariable |
3324 |
label:nm |
|
3325 |
pattern:nil |
|
3326 |
type:nil |
|
3327 |
lineNumber:lineNr. |
|
3328 |
]. |
|
3329 |
(def = 'defconstant' or:[def = 'constant']) ifTrue:[ |
|
3330 |
(showOnly notNil and:[showOnly ~~ #constants]) ifTrue:[^ nil]. |
|
14346 | 3331 |
self hideLispConstants == true ifTrue:[ ^ nil ]. |
9891 | 3332 |
^ Tag::TLispConstant |
3333 |
label:nm |
|
3334 |
pattern:nil |
|
3335 |
type:nil |
|
3336 |
lineNumber:lineNr. |
|
3337 |
]. |
|
3338 |
(def = 'mac' or:[def = 'defmacro' or:[def = 'define-macro']]) ifTrue:[ |
|
3339 |
(showOnly notNil and:[showOnly ~~ #macros]) ifTrue:[^ nil]. |
|
14346 | 3340 |
self hideLispMacros == true ifTrue:[ ^ nil ]. |
9891 | 3341 |
^ Tag::TLispMacro |
3342 |
label:nm |
|
3343 |
pattern:nil |
|
3344 |
type:nil |
|
3345 |
lineNumber:lineNr. |
|
3346 |
]. |
|
3347 |
(def = 'defclass' or:[def = 'define-class']) ifTrue:[ |
|
3348 |
(showOnly notNil and:[showOnly ~~ #classes]) ifTrue:[^ nil]. |
|
14346 | 3349 |
self hideClasses == true ifTrue:[ ^ nil ]. |
9891 | 3350 |
^ Tag::TClass |
3351 |
label:nm |
|
3352 |
pattern:nil |
|
3353 |
type:nil |
|
3354 |
lineNumber:lineNr. |
|
3355 |
]. |
|
3356 |
(def = 'defmethod' or:[def = 'define-method' or:[def = 'define-generic']]) ifTrue:[ |
|
3357 |
(showOnly notNil and:[showOnly ~~ #methods]) ifTrue:[^ nil]. |
|
14346 | 3358 |
self hideLispMethods == true ifTrue:[ ^ nil ]. |
9891 | 3359 |
^ Tag::TMethod |
3360 |
label:nm |
|
3361 |
pattern:nil |
|
3362 |
type:nil |
|
3363 |
lineNumber:lineNr. |
|
3364 |
]. |
|
3365 |
(def = 'defpackage') ifTrue:[ |
|
14346 | 3366 |
self hideLispMethods == true ifTrue:[ ^ nil ]. |
9891 | 3367 |
^ Tag::TPackage |
3368 |
label:nm |
|
3369 |
pattern:nil |
|
3370 |
type:nil |
|
3371 |
lineNumber:lineNr. |
|
3372 |
]. |
|
3373 |
def = 'eval-when' ifTrue:[ |
|
14346 | 3374 |
self hideLispEvaluations == true ifTrue:[ ^ nil ]. |
9891 | 3375 |
^ Tag::TLispEval |
14352 | 3376 |
label:nm |
9891 | 3377 |
pattern:nil |
3378 |
type:nil |
|
3379 |
lineNumber:lineNr. |
|
3380 |
]. |
|
3381 |
def = 'defstruct' ifTrue:[ |
|
14346 | 3382 |
self hideStructures == true ifTrue:[ ^ nil ]. |
9891 | 3383 |
^ Tag::TStruct |
3384 |
label:nm |
|
3385 |
pattern:nil |
|
3386 |
type:nil |
|
3387 |
lineNumber:lineNr. |
|
3388 |
]. |
|
3389 |
(def startsWith:'def') ifTrue:[ |
|
3390 |
(showOnly notNil and:[showOnly ~~ #functions]) ifTrue:[^ nil]. |
|
14346 | 3391 |
self hideFunctions == true ifTrue:[ ^ nil ]. |
9891 | 3392 |
^ Tag::TFunction |
3393 |
label:nm |
|
3394 |
pattern:nil |
|
3395 |
type:nil |
|
3396 |
lineNumber:lineNr. |
|
3397 |
]. |
|
3398 |
^ nil |
|
3399 |
||
9921 | 3400 |
"Modified: / 08-05-2011 / 10:57:03 / cg" |
9891 | 3401 |
! |
3402 |
||
3403 |
lispTagsInFile:aFilePath |
|
3404 |
"lisp tags: |
|
3405 |
naive, q&d scan for lines starting with (not syntax-aware): |
|
3406 |
(define ... |
|
3407 |
(defun ... |
|
3408 |
(defvar ... |
|
3409 |
(defmacro ... |
|
3410 |
(defclass ... |
|
3411 |
(defmethod ... |
|
3412 |
(defpackage ... |
|
3413 |
(eval-when ... |
|
3414 |
(define- ... |
|
3415 |
(def* ... |
|
3416 |
(set ... |
|
3417 |
(constant ... |
|
3418 |
(defconstant ... |
|
9921 | 3419 |
;;; moretext documentation |
9891 | 3420 |
" |
3421 |
||
14345 | 3422 |
^ self |
3423 |
linewiseNaiveTagsInFile:aFilePath |
|
3424 |
using:[:line :lineNr | |
|
3425 |
self lispTagFromLine:line lineNr:lineNr |
|
3426 |
] |
|
9891 | 3427 |
|
9921 | 3428 |
"Modified: / 08-05-2011 / 10:12:29 / cg" |
9891 | 3429 |
! |
3430 |
||
14345 | 3431 |
luaTagFromLine:line lineNr:lineNr |
3432 |
"lua tags: |
|
3433 |
naive, q&d scan for lines starting with (not syntax-aware): |
|
3434 |
local function ... |
|
3435 |
" |
|
3436 |
||
3437 |
|l nm words def isLocal| |
|
3438 |
||
3439 |
l := line withoutSeparators. |
|
3440 |
||
3441 |
(l startsWith:'--') ifTrue:[^ nil]. "/ comment |
|
3442 |
||
3443 |
words := l splitByAny:(' (),',Character tab). |
|
3444 |
words size >= 2 ifFalse:[^ nil]. |
|
3445 |
||
3446 |
(isLocal := words first = 'local') ifTrue:[ words := words copyFrom:2 ]. |
|
3447 |
words size <= 2 ifTrue:[ ^ nil ]. |
|
3448 |
def := words first. |
|
3449 |
nm := words second. |
|
3450 |
||
3451 |
def = 'function' ifTrue:[ |
|
3452 |
(showOnly notNil and:[showOnly ~~ #functions]) ifTrue:[^ nil]. |
|
14346 | 3453 |
self hideFunctions == true ifTrue:[ ^ nil ]. |
14345 | 3454 |
^ Tag::TFunction |
3455 |
label:nm |
|
3456 |
pattern:nil |
|
3457 |
type:nil |
|
3458 |
lineNumber:lineNr. |
|
3459 |
]. |
|
3460 |
||
3461 |
isLocal ifTrue:[ |
|
3462 |
(words includes:'=') ifTrue:[ |
|
3463 |
words := words copyTo:(words indexOf:'=')-1 |
|
3464 |
]. |
|
3465 |
^ words |
|
3466 |
collect:[:eachVar | |
|
3467 |
Tag::TVariable |
|
3468 |
label:eachVar |
|
3469 |
pattern:nil |
|
3470 |
type:nil |
|
3471 |
lineNumber:lineNr. |
|
3472 |
] |
|
3473 |
as:Array. |
|
3474 |
]. |
|
3475 |
||
3476 |
^ nil |
|
3477 |
! |
|
3478 |
||
3479 |
luaTagsInFile:aFilePath |
|
3480 |
"lua tags: |
|
3481 |
naive, q&d scan for lines starting with (not syntax-aware): |
|
3482 |
local function ... |
|
3483 |
" |
|
3484 |
||
3485 |
^ self |
|
3486 |
linewiseNaiveTagsInFile:aFilePath |
|
3487 |
using:[:line :lineNr | |
|
3488 |
self luaTagFromLine:line lineNr:lineNr |
|
3489 |
] |
|
3490 |
! |
|
3491 |
||
3492 |
ozTagFromLine:line lineNr:lineNr |
|
3493 |
"oz tags: |
|
3494 |
naive, q&d scan for lines starting with: |
|
3495 |
fun { name ... |
|
3496 |
" |
|
3497 |
||
3498 |
|l nm lineStream kwLen skipBrace type hideHolder| |
|
3499 |
||
3500 |
l := line withoutSeparators. |
|
3501 |
||
3502 |
kwLen := nil. |
|
3503 |
skipBrace := false. |
|
3504 |
||
3505 |
(l startsWith:'class') ifTrue:[ |
|
3506 |
kwLen := 5. |
|
3507 |
type := Tag::TClass. |
|
14346 | 3508 |
hideHolder := self hideOzClasses. |
14345 | 3509 |
]. |
3510 |
(l startsWith:'meth') ifTrue:[ |
|
3511 |
kwLen := 4. |
|
3512 |
type := Tag::TMethod. |
|
14346 | 3513 |
hideHolder := self hideOzMethods. |
14345 | 3514 |
]. |
3515 |
(l startsWith:'fun') ifTrue:[ |
|
3516 |
kwLen := 3. |
|
3517 |
skipBrace := true. |
|
3518 |
type := Tag::TFunction. |
|
14346 | 3519 |
hideHolder := self hideOzFunctions. |
14345 | 3520 |
]. |
3521 |
(l startsWith:'proc') ifTrue:[ |
|
3522 |
kwLen := 4. |
|
3523 |
skipBrace := true. |
|
3524 |
type := Tag::TFunction. |
|
14346 | 3525 |
hideHolder := self hideOzFunctions. |
14345 | 3526 |
]. |
3527 |
hideHolder value ~~ true ifTrue:[ |
|
3528 |
kwLen notNil ifTrue:[ |
|
3529 |
lineStream := l readStream. |
|
3530 |
lineStream skip:kwLen; skipSeparators. |
|
3531 |
||
3532 |
(skipBrace not or:[lineStream peek = ${ ]) ifTrue:[ |
|
3533 |
skipBrace ifTrue:[lineStream skip:1; skipSeparators]. |
|
14538 | 3534 |
nm := lineStream upToElementForWhich:[:ch | (ch isLetterOrDigit or:['_' includes:ch]) not]. |
15220 | 3535 |
(nm notEmpty and:[nm first isLetterOrUnderline]) ifTrue:[ |
14345 | 3536 |
^ type |
3537 |
label:nm |
|
3538 |
pattern:nil |
|
3539 |
type:nil |
|
3540 |
lineNumber:lineNr. |
|
3541 |
] |
|
3542 |
] |
|
3543 |
]. |
|
3544 |
]. |
|
3545 |
^ nil |
|
3546 |
! |
|
3547 |
||
9891 | 3548 |
ozTagsInFile:aFilePath |
3549 |
"oz tags: |
|
3550 |
naive, q&d scan for lines starting with: |
|
3551 |
fun { name ... |
|
3552 |
" |
|
3553 |
||
14345 | 3554 |
^ self |
3555 |
linewiseNaiveTagsInFile:aFilePath |
|
3556 |
using:[:line :lineNr | |
|
3557 |
self ozTagFromLine:line lineNr:lineNr |
|
3558 |
] |
|
3559 |
! |
|
3560 |
||
3561 |
phpTagFromLine:line lineNr:lineNr |
|
3562 |
"php tags: |
|
3563 |
naive, q&d scan for lines starting with: |
|
3564 |
var ... |
|
3565 |
class ... |
|
3566 |
function ... |
|
3567 |
" |
|
3568 |
||
3569 |
|l nm lineStream| |
|
3570 |
||
3571 |
l := line withoutSeparators. |
|
14669 | 3572 |
(l startsWith:'public ') ifTrue:[ l := (l copyFrom:'public ' size + 1) withoutSeparators ]. |
14681 | 3573 |
(l startsWith:'private ') ifTrue:[ l := (l copyFrom:'private ' size + 1) withoutSeparators ]. |
14345 | 3574 |
|
3575 |
(l startsWith:'var ') ifTrue:[ |
|
14669 | 3576 |
lineStream := (l copyFrom:'var ' size) readStream. |
14345 | 3577 |
lineStream skipSeparators. |
3578 |
lineStream peek == $$ ifTrue:[ |
|
3579 |
lineStream next. |
|
3580 |
nm := lineStream |
|
3581 |
nextMatching:[:c | c isLetter] |
|
3582 |
thenMatching:[:c | c isLetterOrDigit or:[c == $_]]. |
|
3583 |
^ (Tag::TVariable |
|
3584 |
label:nm |
|
3585 |
pattern:nil |
|
3586 |
type:nil |
|
3587 |
lineNumber:lineNr). |
|
3588 |
] |
|
3589 |
] ifFalse:[ |
|
14681 | 3590 |
((l startsWith:'class ') or:[l startsWith:'Class '])ifTrue:[ |
14669 | 3591 |
lineStream := (l copyFrom:'class ' size) readStream. |
14345 | 3592 |
lineStream skipSeparators. |
3593 |
nm := lineStream |
|
3594 |
nextMatching:[:c | c isLetter] |
|
3595 |
thenMatching:[:c | c isLetterOrDigit or:[c == $_]]. |
|
3596 |
^ (Tag::TClass |
|
3597 |
label:nm |
|
3598 |
pattern:nil |
|
3599 |
type:nil |
|
3600 |
lineNumber:lineNr). |
|
3601 |
] ifFalse:[ |
|
14681 | 3602 |
((l startsWith:'function ') or:[l startsWith:'Function ']) ifTrue:[ |
14669 | 3603 |
lineStream := (l copyFrom:'function ' size) readStream. |
14345 | 3604 |
lineStream skipSeparators. |
3605 |
nm := lineStream |
|
14669 | 3606 |
nextMatching:[:c | c isLetter or:[c == $_]] |
14345 | 3607 |
thenMatching:[:c | c isLetterOrDigit or:[c == $_]]. |
3608 |
^ (Tag::TFunction |
|
3609 |
label:nm |
|
3610 |
pattern:nil |
|
3611 |
type:nil |
|
3612 |
lineNumber:lineNr). |
|
9891 | 3613 |
]. |
3614 |
]. |
|
3615 |
]. |
|
14345 | 3616 |
^ nil |
9891 | 3617 |
! |
3618 |
||
3619 |
phpTagsInFile:aFilePath |
|
3620 |
"php tags: |
|
3621 |
naive, q&d scan for lines starting with: |
|
3622 |
var ... |
|
3623 |
class ... |
|
3624 |
function ... |
|
3625 |
" |
|
3626 |
||
14345 | 3627 |
^ self |
3628 |
linewiseNaiveTagsInFile:aFilePath |
|
3629 |
using:[:line :lineNr | |
|
3630 |
self phpTagFromLine:line lineNr:lineNr |
|
3631 |
] |
|
3632 |
! |
|
3633 |
||
3634 |
prologTagFromLine:line lineNr:lineNr |
|
3635 |
"prolog tags: |
|
3636 |
naive, q&d scan for lines matching: |
|
3637 |
<anything> :- |
|
3638 |
" |
|
3639 |
||
3640 |
|l nm| |
|
3641 |
||
3642 |
l := line withoutSeparators. |
|
3643 |
||
3644 |
(l includesString:':-') ifTrue:[ |
|
3645 |
(l startsWith:':-') ifFalse:[ |
|
3646 |
nm := l copyTo:(l indexOfSubCollection:':-'). |
|
3647 |
^ (Tag::TPrologClause |
|
3648 |
label:nm |
|
3649 |
pattern:nil |
|
3650 |
type:nil |
|
3651 |
lineNumber:lineNr). |
|
3652 |
] |
|
9891 | 3653 |
]. |
14345 | 3654 |
^ nil |
9891 | 3655 |
! |
3656 |
||
3657 |
prologTagsInFile:aFilePath |
|
3658 |
"prolog tags: |
|
3659 |
naive, q&d scan for lines matching: |
|
3660 |
<anything> :- |
|
3661 |
" |
|
3662 |
||
14345 | 3663 |
^ self |
3664 |
linewiseNaiveTagsInFile:aFilePath |
|
3665 |
using:[:line :lineNr | |
|
3666 |
self prologTagFromLine:line lineNr:lineNr |
|
3667 |
] |
|
9891 | 3668 |
! |
3669 |
||
3670 |
pythonTagsInFile:aFilePath |
|
3671 |
"python tags: |
|
3672 |
naive, q&d scan for lines matching |
|
3673 |
class <anything> : |
|
3674 |
or |
|
3675 |
def <anything> : |
|
3676 |
" |
|
3677 |
||
3678 |
|targets line l lineNr nm s inClass indent classIndent| |
|
3679 |
||
3680 |
Tag autoload. |
|
3681 |
||
3682 |
inClass := nil. |
|
3683 |
targets := OrderedCollection new. |
|
3684 |
s := aFilePath asFilename readStream. |
|
3685 |
inClass := OrderedCollection new. |
|
3686 |
classIndent := 0. |
|
3687 |
||
3688 |
s notNil ifTrue:[ |
|
3689 |
s := LineNumberReadStream readingFrom:s. |
|
3690 |
[s atEnd] whileFalse:[ |
|
3691 |
lineNr := s lineNumber. |
|
3692 |
line := s nextLine. |
|
3693 |
l := line withoutSeparators. |
|
3694 |
l size > 0 ifTrue:[ |
|
3695 |
||
3696 |
line := line withTabsExpanded:8. |
|
3697 |
indent := line findFirst:[:c | c ~~ Character space]. |
|
3698 |
indent := indent // 8. |
|
3699 |
indent < classIndent ifTrue:[ |
|
3700 |
inClass removeFirstIfAbsent:nil. |
|
3701 |
classIndent := classIndent - 1. |
|
3702 |
]. |
|
3703 |
||
3704 |
(l startsWith:'class ') ifTrue:[ |
|
3705 |
(l endsWith:':') ifTrue:[ |
|
3706 |
nm := l copyFrom:7 to:(l size - 1). |
|
3707 |
nm := nm withoutSeparators. |
|
3708 |
(showOnly ~~ #pythonFunctions |
|
3709 |
and:[showOnly ~~ #pythonMethods]) ifTrue:[ |
|
14346 | 3710 |
self hidePythonClasses ~~ true ifTrue:[ |
9891 | 3711 |
targets add:(Tag::TClass |
3712 |
label:nm |
|
3713 |
pattern:nil |
|
3714 |
type:nil |
|
3715 |
lineNumber:lineNr). |
|
3716 |
]. |
|
3717 |
]. |
|
3718 |
nm := nm upTo:$(. |
|
3719 |
inClass addFirst:nm. |
|
3720 |
classIndent := indent + 1. |
|
3721 |
] |
|
3722 |
] ifFalse:[ |
|
3723 |
(l startsWith:'def ') ifTrue:[ |
|
3724 |
(l endsWith:':') ifTrue:[ |
|
3725 |
nm := l copyFrom:5 to:(l size - 1). |
|
3726 |
nm := nm withoutSeparators. |
|
3727 |
||
3728 |
inClass size > 0 ifTrue:[ |
|
3729 |
(showOnly ~~ #pythonFunctions |
|
3730 |
and:[showOnly ~~ #pythonClasses]) ifTrue:[ |
|
14346 | 3731 |
self hidePythonMethods ~~ true ifTrue:[ |
9891 | 3732 |
nm := inClass first , '.' , nm. |
3733 |
targets add:(Tag::TMethod |
|
3734 |
label:nm |
|
3735 |
pattern:nil |
|
3736 |
type:nil |
|
3737 |
lineNumber:lineNr). |
|
3738 |
] |
|
3739 |
] |
|
3740 |
] ifFalse:[ |
|
3741 |
(showOnly ~~ #pythonClasses |
|
3742 |
and:[showOnly ~~ #pythonMethods]) ifTrue:[ |
|
14346 | 3743 |
self hidePythonFunctions ~~ true ifTrue:[ |
9891 | 3744 |
targets add:(Tag::TFunction |
3745 |
label:nm |
|
3746 |
pattern:nil |
|
3747 |
type:nil |
|
3748 |
lineNumber:lineNr). |
|
3749 |
] |
|
3750 |
] |
|
3751 |
] |
|
3752 |
] |
|
3753 |
] |
|
3754 |
] |
|
3755 |
] |
|
3756 |
]. |
|
3757 |
s close |
|
3758 |
]. |
|
3759 |
^ targets |
|
9921 | 3760 |
|
3761 |
"Modified: / 08-05-2011 / 10:39:10 / cg" |
|
9891 | 3762 |
! |
3763 |
||
14345 | 3764 |
rubyTagFromLine:line lineNr:lineNr |
3765 |
"ruby tags: |
|
3766 |
naive, q&d scan for lines matching: |
|
3767 |
def any |
|
3768 |
" |
|
3769 |
||
3770 |
|l nm| |
|
3771 |
||
3772 |
l := line withoutSeparators. |
|
3773 |
||
3774 |
(l startsWith:'def ') ifTrue:[ |
|
3775 |
nm := l copyFrom:5. |
|
3776 |
^ (Tag::TFunction |
|
3777 |
label:nm |
|
3778 |
pattern:nil |
|
3779 |
type:nil |
|
3780 |
lineNumber:lineNr). |
|
3781 |
] ifFalse:[ |
|
3782 |
(l startsWith:'class ') ifTrue:[ |
|
14346 | 3783 |
self hideClasses == true ifFalse:[ |
14345 | 3784 |
nm := l copyFrom:6. |
3785 |
^ (Tag::TClass |
|
3786 |
label:nm |
|
3787 |
pattern:nil |
|
3788 |
type:nil |
|
3789 |
lineNumber:lineNr). |
|
3790 |
] |
|
3791 |
]. |
|
3792 |
]. |
|
3793 |
^ nil |
|
3794 |
||
3795 |
"Modified: / 08-05-2011 / 10:38:44 / cg" |
|
3796 |
! |
|
3797 |
||
9891 | 3798 |
rubyTagsInFile:aFilePath |
3799 |
"ruby tags: |
|
3800 |
naive, q&d scan for lines matching: |
|
3801 |
def any |
|
3802 |
" |
|
3803 |
||
14345 | 3804 |
^ self |
3805 |
linewiseNaiveTagsInFile:aFilePath |
|
3806 |
using:[:line :lineNr | |
|
3807 |
self rubyTagFromLine:line lineNr:lineNr |
|
3808 |
] |
|
9921 | 3809 |
|
3810 |
"Modified: / 08-05-2011 / 10:38:44 / cg" |
|
9891 | 3811 |
! |
3812 |
||
11050 | 3813 |
stTagsInFile:aFilePath in:aTempDirectory |
9891 | 3814 |
"smalltalk tags: |
11050 | 3815 |
not so naive: generate a changeList from the contents and convert it into a tag-list |
9891 | 3816 |
" |
3817 |
||
11050 | 3818 |
|targets s anyPrimitiveDefinitions shellCmd cTagsList| |
9891 | 3819 |
|
3820 |
Tag autoload. |
|
3821 |
||
11050 | 3822 |
anyPrimitiveDefinitions := false. |
9891 | 3823 |
targets := OrderedCollection new. |
3824 |
s := aFilePath asFilename readStream. |
|
3825 |
s notNil ifTrue:[ |
|
3826 |
s := LineNumberReadStream readingFrom:s. |
|
3827 |
s skipSeparators. |
|
3828 |
||
3829 |
"/ new interface: block-arg to #changesFromStream:do: gets 3 args |
|
3830 |
[ |
|
3831 |
ChangeSet::InvalidChangeChunkError handle:[:ex | |
|
15168 | 3832 |
Dialog warn:('TagList [info]: Error while processing changes in "%1":\\%2' withCRs |
3833 |
bindWith:aFilePath asFilename pathName |
|
3834 |
with: ex description). |
|
9891 | 3835 |
] do:[ |
3836 |
ChangeSet changesFromStream:s do:[:aChange :lNr :pos| |
|
3837 |
aChange isClassDefinitionChange ifTrue:[ |
|
14346 | 3838 |
self hideClasses == true ifFalse:[ |
9921 | 3839 |
targets add:(Tag::TClass |
9891 | 3840 |
label:(aChange className) |
3841 |
pattern:('/subclass:') |
|
3842 |
type:nil |
|
3843 |
lineNumber:lNr). |
|
9921 | 3844 |
] |
9891 | 3845 |
] ifFalse:[ |
3846 |
aChange isMethodChange ifTrue:[ |
|
14346 | 3847 |
self hideMethods == true ifFalse:[ |
13450 | 3848 |
targets add:((Tag::TMethod |
9891 | 3849 |
label:(aChange selector) |
3850 |
pattern:('/^' , aChange selector) |
|
3851 |
type:nil |
|
13450 | 3852 |
lineNumber:lNr) |
3853 |
isMeta:(aChange className endsWith:' class')). |
|
9921 | 3854 |
] |
11050 | 3855 |
] ifFalse:[ |
3856 |
aChange isPrimitiveChange ifTrue:[ |
|
3857 |
targets add:(Tag::TMacro |
|
3858 |
label:(aChange isPrimitiveDefinitionsChange |
|
11051 | 3859 |
ifTrue:['<< primitive definitions >>'] |
11050 | 3860 |
ifFalse:[ (aChange isPrimitiveFunctionsChange |
11051 | 3861 |
ifTrue:['<< primitive functions >>'] |
3862 |
ifFalse:['<< primitive variables >>'])]) |
|
11050 | 3863 |
pattern:('/^' , aChange source asStringCollection first) |
3864 |
type:nil |
|
3865 |
lineNumber:lNr). |
|
3866 |
anyPrimitiveDefinitions := true |
|
3867 |
] |
|
9891 | 3868 |
] |
3869 |
]. |
|
3870 |
] |
|
3871 |
] |
|
3872 |
] ensure:[ |
|
3873 |
s close. |
|
3874 |
]. |
|
3875 |
]. |
|
11050 | 3876 |
|
3877 |
anyPrimitiveDefinitions ifTrue:[ |
|
3878 |
"/ also invoke ctags on the file, merge those tags. |
|
3879 |
"/ sorry: not perfect, because ctags seems to get confused by the extra %{ %} nesting. |
|
3880 |
shellCmd := (self shellCommandTemplateFor:(aFilePath asFilename withSuffix:'c') pathName) |
|
3881 |
bindWith:aFilePath. |
|
3882 |
shellCmd notNil ifTrue:[ |
|
3883 |
cTagsList := self getTagListFromFile:aFilePath asFilename usingCommand:shellCmd mode:#c in:aTempDirectory. |
|
3884 |
cTagsList notEmptyOrNil ifTrue:[ |
|
3885 |
^ cTagsList , targets |
|
3886 |
]. |
|
3887 |
]. |
|
3888 |
]. |
|
3889 |
||
9891 | 3890 |
^ targets |
9921 | 3891 |
|
11050 | 3892 |
"Created: / 05-01-2012 / 10:56:26 / cg" |
9891 | 3893 |
! |
3894 |
||
14345 | 3895 |
tclTagFromLine:line lineNr:lineNr |
3896 |
"tcl tags: |
|
3897 |
naive, q&d scan for lines matching: |
|
3898 |
proc any |
|
3899 |
" |
|
3900 |
||
3901 |
|l nm words| |
|
3902 |
||
3903 |
l := line withoutSeparators. |
|
3904 |
||
3905 |
(l startsWith:'proc ') ifTrue:[ |
|
3906 |
nm := l withoutPrefix:'proc '. |
|
3907 |
^(Tag::TFunction |
|
3908 |
label:nm |
|
3909 |
pattern:nil |
|
3910 |
type:nil |
|
3911 |
lineNumber:lineNr). |
|
3912 |
] ifFalse:[ (l startsWith:'tixWidgetClass ') ifTrue:[ |
|
3913 |
nm := l copyFrom:'tixWidgetClass ' size + 1. |
|
3914 |
(nm endsWith:'{') ifTrue:[ |
|
14579 | 3915 |
nm := (nm copyButLast) withoutSeparators. |
14345 | 3916 |
]. |
3917 |
^(Tag::TClass |
|
3918 |
label:nm |
|
3919 |
pattern:nil |
|
3920 |
type:nil |
|
3921 |
lineNumber:lineNr). |
|
3922 |
] ifFalse:[ (l startsWith:'set ') ifTrue:[ |
|
14346 | 3923 |
self hideVariables ~~ true ifTrue:[ |
14345 | 3924 |
words := l asCollectionOfWords. |
3925 |
words size >= 2 ifTrue:[ |
|
3926 |
nm := words second. |
|
3927 |
^(Tag::TVariable |
|
3928 |
label:nm |
|
3929 |
pattern:nil |
|
3930 |
type:nil |
|
3931 |
lineNumber:lineNr). |
|
3932 |
] |
|
3933 |
]]]]. |
|
3934 |
^ nil |
|
3935 |
! |
|
3936 |
||
9891 | 3937 |
tclTagsInFile:aFilePath |
3938 |
"tcl tags: |
|
3939 |
naive, q&d scan for lines matching: |
|
3940 |
proc any |
|
3941 |
" |
|
3942 |
||
14345 | 3943 |
^ self |
3944 |
linewiseNaiveTagsInFile:aFilePath |
|
3945 |
using:[:line :lineNr | |
|
3946 |
self tclTagFromLine:line lineNr:lineNr |
|
3947 |
] |
|
9891 | 3948 |
! |
3949 |
||
3950 |
yaccTagsInFile:aFilePath |
|
3951 |
"yacc tags: |
|
3952 |
naive, q&d scan for lines matching: |
|
3953 |
<anything>: |
|
3954 |
" |
|
3955 |
||
11825 | 3956 |
^ self tagsForLinesStartingWithIdentifierAndColon:aFilePath |
3957 |
||
3958 |
"Modified: / 28-09-2012 / 14:45:52 / cg" |
|
9891 | 3959 |
! ! |
3960 |
||
3961 |
!TagList methodsFor:'testing'! |
|
3962 |
||
3963 |
supportsFile:aFile |
|
3964 |
"return true, if we can generate tags for a file" |
|
3965 |
||
3966 |
aFile isReadable ifFalse:[^ false]. |
|
3967 |
||
3968 |
"/ cg: now always return true - let generateTag run against the wall... |
|
3969 |
^ true. |
|
3970 |
||
13335 | 3971 |
"/ lcSuffix := aFile suffix asLowercase. |
9891 | 3972 |
"/ selfClass := self class. |
3973 |
"/ |
|
13335 | 3974 |
"/ lcSuffix size ~~ 0 ifTrue:[ |
9891 | 3975 |
"/ ((selfClass isCSuffix:lcSuffix) |
3976 |
"/ or:[(selfClass isJavaSuffix:lcSuffix) |
|
3977 |
"/ or:[(selfClass isEiffelSuffix:lcSuffix) |
|
3978 |
"/ or:[(selfClass isFortranSuffix:lcSuffix) |
|
3979 |
"/ or:[(selfClass isPythonSuffix:lcSuffix) |
|
3980 |
"/ or:[(selfClass isLispSuffix:lcSuffix) |
|
3981 |
"/ or:[(selfClass isPrologSuffix:lcSuffix) |
|
3982 |
"/ or:[(selfClass isTCLSuffix:lcSuffix) |
|
3983 |
"/ or:[(selfClass isAssemblerSuffix:lcSuffix) |
|
3984 |
"/ or:[(selfClass isSmalltalkSuffix:lcSuffix) |
|
3985 |
"/ or:[(selfClass isRubySuffix:lcSuffix)]]]]]]]]]]) |
|
3986 |
"/ ifTrue:[ |
|
3987 |
"/ ^ true |
|
3988 |
"/ ]. |
|
3989 |
"/ ]. |
|
3990 |
"/ |
|
3991 |
"/ lcName := aFile baseName asLowercase. |
|
13335 | 3992 |
"/ ^ selfClass makeFilePatterns contains:[:pattern | pattern match:lcName] |
9891 | 3993 |
! ! |
3994 |
||
3995 |
!TagList class methodsFor:'documentation'! |
|
3996 |
||
11051 | 3997 |
version |
15240 | 3998 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.69 2015-02-10 12:33:51 cg Exp $' |
11051 | 3999 |
! |
4000 |
||
9891 | 4001 |
version_CVS |
15240 | 4002 |
^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.69 2015-02-10 12:33:51 cg Exp $' |
10054 | 4003 |
! |
4004 |
||
4005 |
version_SVN |
|
15240 | 4006 |
^ '$Id: Tools__TagList.st,v 1.69 2015-02-10 12:33:51 cg Exp $' |
9891 | 4007 |
! ! |
12332 | 4008 |