Tools__TagList.st
changeset 11766 7c225017d764
parent 11762 ea51907fe36d
child 11771 c33eb1a7f489
equal deleted inserted replaced
11765:d27085cfa9cd 11766:7c225017d764
    81     TagsSuffixes at:#'text/html'                put:#( 'htm' 'html').
    81     TagsSuffixes at:#'text/html'                put:#( 'htm' 'html').
    82     TagsSuffixes at:#'text/java'                put:#( 'java' 'jav').
    82     TagsSuffixes at:#'text/java'                put:#( 'java' 'jav').
    83     TagsSuffixes at:#'text/javaScript'          put:#( 'js' ).
    83     TagsSuffixes at:#'text/javaScript'          put:#( 'js' ).
    84     TagsSuffixes at:#'text/javascript'          put:#( 'js' ).
    84     TagsSuffixes at:#'text/javascript'          put:#( 'js' ).
    85     TagsSuffixes at:#'application/x-javascript' put:#( 'js' ).
    85     TagsSuffixes at:#'application/x-javascript' put:#( 'js' ).
       
    86     TagsSuffixes at:#'text/dart'                put:#( 'dart' ).
       
    87     TagsSuffixes at:#'application/x-dart'       put:#( 'dart' ).
    86     TagsSuffixes at:#'text/make'                put:#( 'makefile' 'make.proto' 'makefile.*' '*.mak' '*.bpr').
    88     TagsSuffixes at:#'text/make'                put:#( 'makefile' 'make.proto' 'makefile.*' '*.mak' '*.bpr').
    87     TagsSuffixes at:#'text/prolog'              put:#( 'pl' ).
    89     TagsSuffixes at:#'text/prolog'              put:#( 'pl' ).
    88     TagsSuffixes at:#'text/python'              put:#( 'py' ).
    90     TagsSuffixes at:#'text/python'              put:#( 'py' ).
    89     TagsSuffixes at:#'text/php'                 put:#( 'php' ).
    91     TagsSuffixes at:#'text/php'                 put:#( 'php' ).
    90     TagsSuffixes at:#'text/lisp'                put:#( 'lisp' 'el' 'lsp' 'cl').
    92     TagsSuffixes at:#'text/lisp'                put:#( 'lisp' 'el' 'lsp' 'cl').
    95     TagsSuffixes at:#'text/tcl'                 put:#( 'tcl' ).
    97     TagsSuffixes at:#'text/tcl'                 put:#( 'tcl' ).
    96     TagsSuffixes at:#'text/ruby'                put:#( 'rb' ).
    98     TagsSuffixes at:#'text/ruby'                put:#( 'rb' ).
    97     TagsSuffixes at:#'text/yacc'                put:#( 'y' ).
    99     TagsSuffixes at:#'text/yacc'                put:#( 'y' ).
    98     ^ TagsSuffixes
   100     ^ TagsSuffixes
    99 
   101 
   100     "Modified: / 20-04-2011 / 19:27:53 / cg"
   102     "Modified: / 22-08-2012 / 21:05:15 / cg"
   101 ! !
   103 ! !
   102 
   104 
   103 !TagList class methodsFor:'defaults'!
   105 !TagList class methodsFor:'defaults'!
   104 
   106 
   105 arcLispSuffixes
   107 arcLispSuffixes
   128 
   130 
   129 commonLispSuffixes
   131 commonLispSuffixes
   130     "returns a list of supported common-lisp-suffixes"
   132     "returns a list of supported common-lisp-suffixes"
   131 
   133 
   132     ^ self tagsSuffixes at:#'text/lisp'
   134     ^ self tagsSuffixes at:#'text/lisp'
       
   135 !
       
   136 
       
   137 dartSuffixes
       
   138     "returns a list of supported dart-suffixes"
       
   139 
       
   140     ^ self tagsSuffixes at:#'text/dart'
       
   141 
       
   142     "Created: / 22-08-2012 / 21:01:32 / cg"
   133 !
   143 !
   134 
   144 
   135 eiffelSuffixes
   145 eiffelSuffixes
   136     "returns a list of supported eiffel-suffixes
   146     "returns a list of supported eiffel-suffixes
   137     "
   147     "
   271     ^ self isSuffix:suffix in:self cSuffixes
   281     ^ self isSuffix:suffix in:self cSuffixes
   272 !
   282 !
   273 
   283 
   274 isCommonLispSuffix:suffix
   284 isCommonLispSuffix:suffix
   275     ^ self isSuffix:suffix in:self commonLispSuffixes
   285     ^ self isSuffix:suffix in:self commonLispSuffixes
       
   286 !
       
   287 
       
   288 isDartSuffix:suffix
       
   289     ^ self isSuffix:suffix in:self dartSuffixes
       
   290 
       
   291     "Created: / 22-08-2012 / 21:01:10 / cg"
   276 !
   292 !
   277 
   293 
   278 isEiffelSuffix:suffix
   294 isEiffelSuffix:suffix
   279     ^ self isSuffix:suffix in:self eiffelSuffixes
   295     ^ self isSuffix:suffix in:self eiffelSuffixes
   280 !
   296 !
  2481             l := line withoutSeparators.
  2497             l := line withoutSeparators.
  2482             {
  2498             {
  2483                 { 'function '  . #functions  . hideFunctions . Tag::TFunction } .
  2499                 { 'function '  . #functions  . hideFunctions . Tag::TFunction } .
  2484                 { 'var '       . #variables  . hideVariables . Tag::TVariable } .
  2500                 { 'var '       . #variables  . hideVariables . Tag::TVariable } .
  2485                 { 'class '     . #classes    . hideClasses . Tag::TClass      } .
  2501                 { 'class '     . #classes    . hideClasses . Tag::TClass      } .
       
  2502                 { 'abstract class '     . #classes    . hideClasses . Tag::TClass      } .
  2486                 { 'interface ' . #interfaces . hideDartInterfaces . Tag::TInterface } .
  2503                 { 'interface ' . #interfaces . hideDartInterfaces . Tag::TInterface } .
       
  2504                 { 'factory '   . #methods .    hideMethods . Tag::TMethod } .
  2487             } tuplesDo:[:keywordSpace :showOnlyEnum :hideVariableValue :tagType|
  2505             } tuplesDo:[:keywordSpace :showOnlyEnum :hideVariableValue :tagType|
  2488                 (l startsWith:keywordSpace) ifTrue:[
  2506                 (l startsWith:keywordSpace) ifTrue:[
  2489                     (showOnly isNil or:[showOnly == showOnlyEnum]) ifTrue:[
  2507                     (showOnly isNil or:[showOnly == showOnlyEnum]) ifTrue:[
  2490                         hideVariableValue ~~ true ifTrue:[
  2508                         hideVariableValue ~~ true ifTrue:[
  2491                             nm := l copyFrom:(keywordSpace size + 1).
  2509                             nm := l copyFrom:(keywordSpace size + 1).
  2505         s close
  2523         s close
  2506     ].
  2524     ].
  2507     ^ targets
  2525     ^ targets
  2508 
  2526 
  2509     "Created: / 28-06-2010 / 12:44:25 / cg"
  2527     "Created: / 28-06-2010 / 12:44:25 / cg"
  2510     "Modified: / 08-05-2011 / 10:39:55 / cg"
  2528     "Modified: / 22-08-2012 / 21:32:33 / cg"
  2511 !
  2529 !
  2512 
  2530 
  2513 getSimpleTagListFromFile:aFileOrString in:aTempDirectory
  2531 getSimpleTagListFromFile:aFileOrString in:aTempDirectory
  2514     "fallback, if no ctags is present, or if the file is not a c-file.
  2532     "fallback, if no ctags is present, or if the file is not a c-file.
  2515      Implemented here for some other file types (Makefiles)
  2533      Implemented here for some other file types (Makefiles)
  2569         ^ self yaccTagsInFile:pathName
  2587         ^ self yaccTagsInFile:pathName
  2570     ].
  2588     ].
  2571     (self class isJavaScriptSuffix:suffix) ifTrue:[
  2589     (self class isJavaScriptSuffix:suffix) ifTrue:[
  2572         "/ js tags - simulated
  2590         "/ js tags - simulated
  2573         ^ self javaScriptTagsInFile:pathName
  2591         ^ self javaScriptTagsInFile:pathName
       
  2592     ].
       
  2593     (self class isDartSuffix:suffix) ifTrue:[
       
  2594         "/ dart tags - simulated
       
  2595         ^ self dartTagsInFile:pathName
  2574     ].
  2596     ].
  2575 
  2597 
  2576     (self class isHTMLSuffix:suffix) ifTrue:[
  2598     (self class isHTMLSuffix:suffix) ifTrue:[
  2577         "/ html tags - simulated
  2599         "/ html tags - simulated
  2578         ^ self htmlTagsInFile:pathName
  2600         ^ self htmlTagsInFile:pathName
  3480 ! !
  3502 ! !
  3481 
  3503 
  3482 !TagList class methodsFor:'documentation'!
  3504 !TagList class methodsFor:'documentation'!
  3483 
  3505 
  3484 version
  3506 version
  3485     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.14 2012-08-21 19:04:10 cg Exp $'
  3507     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.15 2012-08-22 19:50:36 cg Exp $'
  3486 !
  3508 !
  3487 
  3509 
  3488 version_CVS
  3510 version_CVS
  3489     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.14 2012-08-21 19:04:10 cg Exp $'
  3511     ^ '$Header: /cvs/stx/stx/libtool/Tools__TagList.st,v 1.15 2012-08-22 19:50:36 cg Exp $'
  3490 !
  3512 !
  3491 
  3513 
  3492 version_SVN
  3514 version_SVN
  3493     ^ '§Id§'
  3515     ^ '§Id§'
  3494 ! !
  3516 ! !