Tools__TagList.st
branchjv
changeset 12254 b1237f76f501
parent 12229 5c129972b1fd
child 12287 400a99059170
equal deleted inserted replaced
12253:6d3eedcdb4c1 12254:b1237f76f501
    23 		hideLocalLabels hideLocalLabels2 hideDataLabels hideTextLabels
    23 		hideLocalLabels hideLocalLabels2 hideDataLabels hideTextLabels
    24 		tagTypesPresent hidePythonClasses hidePythonMethods
    24 		tagTypesPresent hidePythonClasses hidePythonMethods
    25 		hidePythonFunctions hideOzClasses hideOzMethods hideOzFunctions
    25 		hidePythonFunctions hideOzClasses hideOzMethods hideOzFunctions
    26 		hideHTMLTextArea hideHTMLInput hideHTMLTable hideHTMLScript
    26 		hideHTMLTextArea hideHTMLInput hideHTMLTable hideHTMLScript
    27 		hideHTMLForm usingDefaultCTags ctagsCommand ctagsIsExCtags
    27 		hideHTMLForm usingDefaultCTags ctagsCommand ctagsIsExCtags
    28 		ctagsIsExCtags5x hideDocumentation remoteTarget'
    28 		ctagsIsExCtags5x hideDocumentation remoteTarget hideLocalLabels3'
    29 	classVariableNames:'Sorted CachedTagListsPerFile DefaultSortCriteria DefaultShowOnly
    29 	classVariableNames:'Sorted CachedTagListsPerFile DefaultSortCriteria DefaultShowOnly
    30 		TagsSuffixes DefaultGroupBy'
    30 		TagsSuffixes DefaultGroupBy'
    31 	poolDictionaries:''
    31 	poolDictionaries:''
    32 	category:'Interface-Tools-File-Tags'
    32 	category:'Interface-Tools-File-Tags'
    33 !
    33 !
   853 hideLocalLabels2:aBoolean
   853 hideLocalLabels2:aBoolean
   854     hideLocalLabels2 := aBoolean.
   854     hideLocalLabels2 := aBoolean.
   855 
   855 
   856     "Modified: / 05-05-2011 / 15:22:54 / cg"
   856     "Modified: / 05-05-2011 / 15:22:54 / cg"
   857     "Created: / 24-03-2012 / 23:23:20 / cg"
   857     "Created: / 24-03-2012 / 23:23:20 / cg"
       
   858 !
       
   859 
       
   860 hideLocalLabels3
       
   861     ^ hideLocalLabels3 ? false
       
   862 
       
   863     "Created: / 13-05-2012 / 11:12:37 / cg"
       
   864 !
       
   865 
       
   866 hideLocalLabels3:aBoolean
       
   867     hideLocalLabels3 := aBoolean.
       
   868 
       
   869     "Modified: / 05-05-2011 / 15:22:54 / cg"
       
   870     "Created: / 13-05-2012 / 11:12:42 / cg"
   858 !
   871 !
   859 
   872 
   860 hideLocalLabels:aBoolean
   873 hideLocalLabels:aBoolean
   861     hideLocalLabels := aBoolean.
   874     hideLocalLabels := aBoolean.
   862 
   875 
  1918 
  1931 
  1919     remoteTarget := aTarget.
  1932     remoteTarget := aTarget.
  1920 
  1933 
  1921     [ 
  1934     [ 
  1922         list := self fromFile:aFile in:aTempDirectory
  1935         list := self fromFile:aFile in:aTempDirectory
  1923     ] valueNowOrOnUnwindDo:[
  1936     ] ensure:[
  1924         remoteTarget := nil.
  1937         remoteTarget := nil.
  1925     ].
  1938     ].
  1926     ^ list
  1939     ^ list
  1927 !
  1940 !
  1928 
  1941 
  2253      CAVEAT:
  2266      CAVEAT:
  2254         the code below handles linux-i386 assembler only (for now)
  2267         the code below handles linux-i386 assembler only (for now)
  2255     "
  2268     "
  2256 
  2269 
  2257     |targets line l lineNr nm s words w directive
  2270     |targets line l lineNr nm s words w directive
  2258      hideLocals hideLocals2 hideData hideText currentSegment|
  2271      hideLocals hideLocals2 hideLocals3 hideData hideText currentSegment|
  2259 
  2272 
  2260     Tag autoload.
  2273     Tag autoload.
  2261 
  2274 
  2262     targets := OrderedCollection new.
  2275     targets := OrderedCollection new.
  2263     s := aFilePath asFilename readStream.
  2276     s := aFilePath asFilename readStream.
  2264     s notNil ifTrue:[
  2277     s notNil ifTrue:[
  2265         hideLocals := hideLocalLabels ? false.
  2278         hideLocals := hideLocalLabels ? false.
  2266         hideLocals2 := hideLocalLabels2 ? false.
  2279         hideLocals2 := hideLocalLabels2 ? false.
       
  2280         hideLocals3 := hideLocalLabels3 ? false.
  2267         hideData := hideDataLabels ? false.
  2281         hideData := hideDataLabels ? false.
  2268         hideText := hideTextLabels ? false.
  2282         hideText := hideTextLabels ? false.
  2269         currentSegment := #text.
  2283         currentSegment := #text.
  2270 
  2284 
  2271         s := LineNumberReadStream readingFrom:s.
  2285         s := LineNumberReadStream readingFrom:s.
  2279                 (w endsWith:$:) ifTrue:[
  2293                 (w endsWith:$:) ifTrue:[
  2280                     (hideText and:[currentSegment == #text]) ifFalse:[
  2294                     (hideText and:[currentSegment == #text]) ifFalse:[
  2281                         (hideData and:[currentSegment == #data]) ifFalse:[
  2295                         (hideData and:[currentSegment == #data]) ifFalse:[
  2282                             (hideLocals and:[(w startsWith:$.)]) ifFalse:[
  2296                             (hideLocals and:[(w startsWith:$.)]) ifFalse:[
  2283                                 (hideLocals2 and:[(w startsWith:$_) not]) ifFalse:[
  2297                                 (hideLocals2 and:[(w startsWith:$_) not]) ifFalse:[
  2284                                     nm := w copyWithoutLast:1.
  2298                                     (hideLocals3 
  2285                                     targets add:(Tag::TLabel 
  2299                                         and:[ (w startsWith:$L) 
  2286                                                     label:nm 
  2300                                         and:[ (w size > 1) 
  2287                                                     pattern:nil
  2301                                         and:[ ((w copyFrom:2 to:(w size-1)) conform:[:c | c isDigit])
  2288                                                     type:nil
  2302                                      ]]]) ifFalse:[
  2289                                                     lineNumber:lineNr).
  2303                                         nm := w copyWithoutLast:1.
       
  2304                                         targets add:(Tag::TLabel 
       
  2305                                                         label:nm 
       
  2306                                                         pattern:nil
       
  2307                                                         type:nil
       
  2308                                                         lineNumber:lineNr).
       
  2309                                     ].
  2290                                 ].
  2310                                 ].
  2291                             ].
  2311                             ].
  2292                         ].
  2312                         ].
  2293                     ].
  2313                     ].
  2294                     words size >= 2 ifTrue:[
  2314                     words size >= 2 ifTrue:[
  2314         ].
  2334         ].
  2315         s close
  2335         s close
  2316     ].
  2336     ].
  2317     ^ targets
  2337     ^ targets
  2318 
  2338 
  2319     "Modified: / 24-03-2012 / 23:24:22 / cg"
  2339     "Modified: / 13-05-2012 / 11:25:49 / cg"
  2320 !
  2340 !
  2321 
  2341 
  2322 getSimpleTagListFromFile:aFileOrString in:aTempDirectory
  2342 getSimpleTagListFromFile:aFileOrString in:aTempDirectory
  2323     "fallback, if no ctags is present, or if the file is not a c-file.
  2343     "fallback, if no ctags is present, or if the file is not a c-file.
  2324      Implemented here for some other file types (Makefiles)
  2344      Implemented here for some other file types (Makefiles)
  3289 ! !
  3309 ! !
  3290 
  3310 
  3291 !TagList class methodsFor:'documentation'!
  3311 !TagList class methodsFor:'documentation'!
  3292 
  3312 
  3293 version
  3313 version
  3294     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.10 2012/03/24 22:26:07 cg Exp $'
  3314     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.12 2012/05/13 09:28:08 cg Exp $'
  3295 !
  3315 !
  3296 
  3316 
  3297 version_CVS
  3317 version_CVS
  3298     ^ '§Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.10 2012/03/24 22:26:07 cg Exp §'
  3318     ^ '§Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.12 2012/05/13 09:28:08 cg Exp §'
  3299 !
  3319 !
  3300 
  3320 
  3301 version_SVN
  3321 version_SVN
  3302     ^ '$Id: Tools__TagList.st 7978 2012-04-13 13:15:47Z vranyj1 $'
  3322     ^ '$Id: Tools__TagList.st 8007 2012-06-05 14:49:00Z vranyj1 $'
  3303 ! !
  3323 ! !