Tools__TagList.st
branchjv
changeset 16145 d30891e2e694
parent 16053 85a1b78120ab
parent 16142 0ca65f0ed335
child 16213 f667b5b42a11
--- a/Tools__TagList.st	Sun Mar 06 07:04:45 2016 +0100
+++ b/Tools__TagList.st	Tue Mar 08 07:00:38 2016 +0100
@@ -1,3 +1,5 @@
+"{ Encoding: utf8 }"
+
 "
  COPYRIGHT (c) 2002 by eXept Software AG 
 	      All Rights Reserved
@@ -2225,8 +2227,6 @@
     rawList := nil.
     tagsValidForFile := nil.
 
-    list := OrderedCollection new.
-
     forceSimpleTagList := false.
     "/ the simple builtin tagList generator is actually better than the ctags output for makefiles
     (self class makeFilePatterns contains:[:aPattern | (aPattern match:aFile baseName asLowercase)]) ifTrue:[forceSimpleTagList := true].
@@ -2235,14 +2235,14 @@
         shellCmd := (self shellCommandFor:aFile pathName).
         shellCmd notNil ifTrue:[
             tagTypesPresent := false.     "/ will be set again, when ctags command provides types
-            list := self getTagListFromFile:aFile usingCommand:shellCmd mode:nil in:aTempDirectory.
+            list := ((self getTagListFromFile:aFile usingCommand:shellCmd mode:nil in:aTempDirectory) ? #()) asOrderedCollection.
             list addAll:(self getAdditionalCTagsInFile:aFile withList:list)
         ].
     ].
 
     "/ in case ctags could not find anything, try our own, naive fallback (not too bad either)
     list isEmptyOrNil ifTrue:[
-        list := self getSimpleTagListFromFile:aFile in:aTempDirectory.
+        list := ((self getSimpleTagListFromFile:aFile in:aTempDirectory) ? #()) asOrderedCollection.
     ].
     tagTypesPresent := true.