Smalltalk.st
changeset 18560 a37464a68e70
parent 18385 2d0a9c256e0e
child 18561 73656aba2c89
child 18572 b088a44b9681
equal deleted inserted replaced
18559:2f3d69fc53f0 18560:a37464a68e70
  6329 
  6329 
  6330     "Modified: / 08-10-2011 / 00:08:51 / cg"
  6330     "Modified: / 08-10-2011 / 00:08:51 / cg"
  6331 !
  6331 !
  6332 
  6332 
  6333 fileInSourceFile:filenameArg lazy:loadLazy silent:beSilent
  6333 fileInSourceFile:filenameArg lazy:loadLazy silent:beSilent
  6334     "Try all available programming languages"
  6334     "Try all available programming languages for a matching suffix"
  6335 
  6335 
  6336     |filename|
  6336     |filename|
  6337 
  6337 
  6338     filename := filenameArg asFilename.
  6338     filename := filenameArg asFilename.
  6339     ProgrammingLanguage allDo:[:lang| | f |
  6339     ProgrammingLanguage allDo:[:lang| 
  6340 	f := (filename hasSuffix:lang sourceFileSuffix)
  6340         | f |
  6341 		    ifTrue:[filename]
  6341 
  6342 		    ifFalse:[filename addSuffix:lang sourceFileSuffix].
  6342         "/ cg: changed: did try all languages to load (eg. wether suffix matched or not.
  6343 	(self fileIn:f lazy:loadLazy silent:beSilent)
  6343         "/ I don't think, that is a good idea, as all of them languages might start parsing...
  6344 		ifTrue:[^ true]
  6344         (filename hasSuffix:lang sourceFileSuffix) ifTrue:[
       
  6345             (self fileIn:f lazy:loadLazy silent:beSilent) ifTrue:[
       
  6346                 ^ true
       
  6347             ].
       
  6348         ]
  6345     ].
  6349     ].
  6346     ^ false
  6350     ^ false
  6347 
  6351 
  6348     "Created: / 16-08-2009 / 14:45:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
  6352     "Created: / 16-08-2009 / 14:45:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
  6349 !
  6353 !
  8282 ! !
  8286 ! !
  8283 
  8287 
  8284 !Smalltalk class methodsFor:'documentation'!
  8288 !Smalltalk class methodsFor:'documentation'!
  8285 
  8289 
  8286 version
  8290 version
  8287     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1133 2015-05-22 18:41:08 cg Exp $'
  8291     ^ '$Header$'
  8288 !
  8292 !
  8289 
  8293 
  8290 version_CVS
  8294 version_CVS
  8291     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1133 2015-05-22 18:41:08 cg Exp $'
  8295     ^ '$Header$'
  8292 !
  8296 !
  8293 
  8297 
  8294 version_SVN
  8298 version_SVN
  8295     ^ '$ Id: Smalltalk.st 10648 2011-06-23 15:55:10Z vranyj1  $'
  8299     ^ '$ Id: Smalltalk.st 10648 2011-06-23 15:55:10Z vranyj1  $'
  8296 ! !
  8300 ! !