equal
deleted
inserted
replaced
13 |
13 |
14 "{ NameSpace: Tools }" |
14 "{ NameSpace: Tools }" |
15 |
15 |
16 ApplicationModel subclass:#TagsBrowser |
16 ApplicationModel subclass:#TagsBrowser |
17 instanceVariableNames:'editedFileHolder commonAspects tagView tagList action tagsMenu |
17 instanceVariableNames:'editedFileHolder commonAspects tagView tagList action tagsMenu |
18 menus tagsValid' |
18 menus tagsValid tagListGenerator' |
19 classVariableNames:'' |
19 classVariableNames:'' |
20 poolDictionaries:'' |
20 poolDictionaries:'' |
21 category:'Interface-Tools-File-Tags' |
21 category:'Interface-Tools-File-Tags' |
22 ! |
22 ! |
23 |
23 |
2220 |
2220 |
2221 tagForFunction:functionName |
2221 tagForFunction:functionName |
2222 ^ tagList tagForFunction:functionName |
2222 ^ tagList tagForFunction:functionName |
2223 ! ! |
2223 ! ! |
2224 |
2224 |
|
2225 !TagsBrowser methodsFor:'hooks for embedding'! |
|
2226 |
|
2227 tagListGenerator:aBlockOrValueHolder |
|
2228 "to use a tagsBrowser as a component in another application, |
|
2229 this hook allows for the tag list to be provided by that application. |
|
2230 If non-nil, it will be evaluated to generate the tagList instead of |
|
2231 reading the tags from the editedFile" |
|
2232 |
|
2233 tagListGenerator := aBlockOrValueHolder. |
|
2234 ! ! |
|
2235 |
2225 !TagsBrowser methodsFor:'menu actions'! |
2236 !TagsBrowser methodsFor:'menu actions'! |
2226 |
2237 |
2227 keepingSelectionDo:aBlock |
2238 keepingSelectionDo:aBlock |
2228 |oldSelection oldLabel| |
2239 |oldSelection oldLabel| |
2229 |
2240 |
2319 updateTagList |
2330 updateTagList |
2320 "regenerate tags |
2331 "regenerate tags |
2321 " |
2332 " |
2322 |
2333 |
2323 |file target oldSelection| |
2334 |file target oldSelection| |
|
2335 |
|
2336 tagListGenerator notNil ifTrue:[ |
|
2337 tagList setRawList:(tagListGenerator value). |
|
2338 "/ tagView list:(tagListGenerator value). |
|
2339 tagsValid := true. |
|
2340 ^ self. |
|
2341 ]. |
2324 |
2342 |
2325 tagsValid := false. |
2343 tagsValid := false. |
2326 (true "(self tagsVisibilityHolder value == true)" |
2344 (true "(self tagsVisibilityHolder value == true)" |
2327 and:[(file := self editedFile) notNil |
2345 and:[(file := self editedFile) notNil |
2328 and:[tagList supportsFile:file]] |
2346 and:[tagList supportsFile:file]] |
2541 |
2559 |
2542 !TagsBrowser::TagView methodsFor:'generating tags'! |
2560 !TagsBrowser::TagView methodsFor:'generating tags'! |
2543 |
2561 |
2544 generateTagsFor:aFile onTarget:aTarget finally:aBlock |
2562 generateTagsFor:aFile onTarget:aTarget finally:aBlock |
2545 "generate tags for a file (optionally on a remote target) |
2563 "generate tags for a file (optionally on a remote target) |
2546 " |
2564 return true, if a background job for generation has been started" |
|
2565 |
2547 |tagFile| |
2566 |tagFile| |
2548 |
2567 |
2549 "/ ugly hack |
2568 "/ ugly hack to suppress generation if the taglist is externally provided |
2550 (list isKindOf:Tools::TagList) ifFalse:[^ false]. |
2569 (list isKindOf:Tools::TagList) ifFalse:[^ false]. |
2551 |
2570 |
2552 Tag autoload. |
2571 Tag autoload. |
2553 |
2572 |
2554 self stopGeneratingTags. |
2573 self stopGeneratingTags. |
2659 ! ! |
2678 ! ! |
2660 |
2679 |
2661 !TagsBrowser class methodsFor:'documentation'! |
2680 !TagsBrowser class methodsFor:'documentation'! |
2662 |
2681 |
2663 version |
2682 version |
2664 ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.41 2013-10-12 13:47:01 cg Exp $' |
2683 ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.42 2013-10-13 17:56:37 cg Exp $' |
2665 ! |
2684 ! |
2666 |
2685 |
2667 version_CVS |
2686 version_CVS |
2668 ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.41 2013-10-12 13:47:01 cg Exp $' |
2687 ^ '$Header: /cvs/stx/stx/libtool/Tools__TagsBrowser.st,v 1.42 2013-10-13 17:56:37 cg Exp $' |
2669 ! |
2688 ! |
2670 |
2689 |
2671 version_SVN |
2690 version_SVN |
2672 ^ '$Id: Tools__TagsBrowser.st,v 1.41 2013-10-12 13:47:01 cg Exp $' |
2691 ^ '$Id: Tools__TagsBrowser.st,v 1.42 2013-10-13 17:56:37 cg Exp $' |
2673 ! ! |
2692 ! ! |
2674 |
2693 |