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