24 hideLispMethods hideLispConstants hideLocalLabels |
24 hideLispMethods hideLispConstants hideLocalLabels |
25 hideLocalLabels2 hideDataLabels hideTextLabels tagTypesPresent |
25 hideLocalLabels2 hideDataLabels hideTextLabels tagTypesPresent |
26 hidePythonClasses hidePythonMethods hidePythonFunctions |
26 hidePythonClasses hidePythonMethods hidePythonFunctions |
27 hideOzClasses hideOzMethods hideOzFunctions hideHTMLTextArea |
27 hideOzClasses hideOzMethods hideOzFunctions hideHTMLTextArea |
28 hideHTMLInput hideHTMLTable hideHTMLScript hideHTMLForm |
28 hideHTMLInput hideHTMLTable hideHTMLScript hideHTMLForm |
29 usingDefaultCTags ctagsCommand ctagsIsExCtags ctagsIsExCtags5x |
29 hideHTMLHeaders usingDefaultCTags ctagsCommand ctagsIsExCtags |
30 hideDocumentation remoteTarget hideLocalLabels3' |
30 ctagsIsExCtags5x hideDocumentation remoteTarget hideLocalLabels3' |
31 classVariableNames:'Sorted CachedTagListsPerFile DefaultSortCriteria DefaultShowOnly |
31 classVariableNames:'Sorted CachedTagListsPerFile DefaultSortCriteria DefaultShowOnly |
32 TagsSuffixes DefaultGroupBy' |
32 TagsSuffixes DefaultGroupBy' |
33 poolDictionaries:'' |
33 poolDictionaries:'' |
34 category:'Interface-Tools-File-Tags' |
34 category:'Interface-Tools-File-Tags' |
35 ! |
35 ! |
807 |
807 |
808 hideFunctions:aBoolean |
808 hideFunctions:aBoolean |
809 hideFunctions := aBoolean. |
809 hideFunctions := aBoolean. |
810 |
810 |
811 "Modified: / 05-05-2011 / 15:22:18 / cg" |
811 "Modified: / 05-05-2011 / 15:22:18 / cg" |
|
812 ! |
|
813 |
|
814 hideHTMLHeaders |
|
815 ^ hideHTMLHeaders ? false |
|
816 |
|
817 "Created: / 12-09-2012 / 12:29:45 / cg" |
|
818 ! |
|
819 |
|
820 hideHTMLHeaders:aBoolean |
|
821 hideHTMLHeaders := aBoolean. |
|
822 |
|
823 "Created: / 12-09-2012 / 12:29:52 / cg" |
812 ! |
824 ! |
813 |
825 |
814 hideHTMLInput |
826 hideHTMLInput |
815 ^ hideHTMLInput ? false |
827 ^ hideHTMLInput ? false |
816 |
828 |
2635 'textarea' hideHTMLTextArea |
2648 'textarea' hideHTMLTextArea |
2636 'input' hideHTMLInput |
2649 'input' hideHTMLInput |
2637 'table' hideHTMLTable |
2650 'table' hideHTMLTable |
2638 'script' hideHTMLScript |
2651 'script' hideHTMLScript |
2639 'form' hideHTMLForm |
2652 'form' hideHTMLForm |
|
2653 'h1' hideHTMLHeaders |
|
2654 'h2' hideHTMLHeaders |
|
2655 'h3' hideHTMLHeaders |
|
2656 'h4' hideHTMLHeaders |
|
2657 'h5' hideHTMLHeaders |
|
2658 'h6' hideHTMLHeaders |
2640 ) pairWiseDo:[:nm :hideInstVarName| |
2659 ) pairWiseDo:[:nm :hideInstVarName| |
2641 |type hideHolder idx tagText doc markup label| |
2660 |type hideHolder idx tagText doc markup label text markupName markupType| |
2642 |
2661 |
2643 type := hideHolder := nil. |
2662 type := hideHolder := nil. |
2644 |
2663 |
2645 idx := l indexOfSubCollection:('<',nm). |
2664 idx := l indexOfSubCollection:('<',nm). |
2646 idx ~~ 0 ifTrue:[ |
2665 idx ~~ 0 ifTrue:[ |
2648 hideHolder := self instVarNamed:hideInstVarName. |
2667 hideHolder := self instVarNamed:hideInstVarName. |
2649 |
2668 |
2650 tagText := line copyFrom:idx. |
2669 tagText := line copyFrom:idx. |
2651 doc := HTMLParser new parseText:tagText. |
2670 doc := HTMLParser new parseText:tagText. |
2652 markup := doc markup. |
2671 markup := doc markup. |
|
2672 markupName := markup name. |
|
2673 markupType := markup type. |
2653 markup id notEmptyOrNil ifTrue:[ |
2674 markup id notEmptyOrNil ifTrue:[ |
2654 label := nm , ' (',markup id,')' |
2675 label := nm , ' (',markup id,')' |
2655 ] ifFalse:[ |
2676 ] ifFalse:[ |
2656 markup name notEmptyOrNil ifTrue:[ |
2677 markupName notEmptyOrNil ifTrue:[ |
2657 label := nm , ' (',markup name,')' |
2678 label := nm , ' (',markupName,')' |
2658 ] ifFalse:[ |
2679 ] ifFalse:[ |
2659 (markup type == #input and:[ markup valueString notEmptyOrNil ]) ifTrue:[ |
2680 (markupType == #input and:[ markup valueString notEmptyOrNil ]) ifTrue:[ |
2660 label := nm , ' (',markup valueString,')' |
2681 label := nm , ' (',markup valueString,')' |
2661 ] ifFalse:[ |
2682 ] ifFalse:[ |
2662 (markup type == #script and:[ markup src notEmptyOrNil ]) ifTrue:[ |
2683 (markupType == #script and:[ markup src notEmptyOrNil ]) ifTrue:[ |
2663 label := nm , ' ("',markup src,'")' |
2684 label := nm , ' ("',markup src,'")' |
2664 ] ifFalse:[ |
2685 ] ifFalse:[ |
2665 label := nm |
2686 ( (#(h1 h2 h3 h4 h5 h6) includes:markupType) |
|
2687 and:[text := self plainTextBetweenHTMLElement:markup andElementWithTag:('/',markupType). |
|
2688 text notEmpty |
|
2689 ]) ifTrue:[ |
|
2690 label := '"',text,'" (',nm,')' |
|
2691 ] ifFalse:[ |
|
2692 label := nm |
|
2693 ] |
2666 ] |
2694 ] |
2667 ] |
2695 ] |
2668 ]. |
2696 ]. |
2669 ]. |
2697 ]. |
2670 |
|
2671 |
2698 |
2672 hideHolder value ~~ true ifTrue:[ |
2699 hideHolder value ~~ true ifTrue:[ |
2673 tag := type |
2700 tag := type |
2674 label:label |
2701 label:label |
2675 pattern:nil |
2702 pattern:nil |
3101 s close |
3128 s close |
3102 ]. |
3129 ]. |
3103 ^ targets |
3130 ^ targets |
3104 ! |
3131 ! |
3105 |
3132 |
|
3133 plainTextBetweenHTMLElement:startElement andElementWithTag:endTag |
|
3134 "applied to an <h1>-tag element, passing '/h1' as endTag, |
|
3135 this retrieves the plain text of the headline. Used by the tag list." |
|
3136 |
|
3137 |el collector hasSpace txt| |
|
3138 |
|
3139 collector := WriteStream on:(String new:100). |
|
3140 el := startElement next. |
|
3141 hasSpace := true. |
|
3142 [el tag ~= endTag] whileTrue:[ |
|
3143 el isTextElement ifTrue:[ |
|
3144 hasSpace ifFalse:[ |
|
3145 collector space. |
|
3146 hasSpace := true. |
|
3147 ]. |
|
3148 txt := el text withoutSeparators. |
|
3149 txt notEmpty ifTrue:[ |
|
3150 collector nextPutAll:txt. |
|
3151 hasSpace := txt endsWith:' '. |
|
3152 ] |
|
3153 ]. |
|
3154 el := el next |
|
3155 ]. |
|
3156 ^ collector contents |
|
3157 |
|
3158 "Created: / 12-09-2012 / 12:38:01 / cg" |
|
3159 ! |
|
3160 |
3106 prologTagsInFile:aFilePath |
3161 prologTagsInFile:aFilePath |
3107 "prolog tags: |
3162 "prolog tags: |
3108 naive, q&d scan for lines matching: |
3163 naive, q&d scan for lines matching: |
3109 <anything> :- |
3164 <anything> :- |
3110 " |
3165 " |