Smalltalk.st
branchjv
changeset 18561 73656aba2c89
parent 18389 387190d575f5
parent 18560 a37464a68e70
child 18562 d0cc0d0cfffd
equal deleted inserted replaced
18556:2c67b0fa6ff5 18561:73656aba2c89
  6333 
  6333 
  6334     "Modified: / 08-10-2011 / 00:08:51 / cg"
  6334     "Modified: / 08-10-2011 / 00:08:51 / cg"
  6335 !
  6335 !
  6336 
  6336 
  6337 fileInSourceFile:filenameArg lazy:loadLazy silent:beSilent
  6337 fileInSourceFile:filenameArg lazy:loadLazy silent:beSilent
  6338     "Try all available programming languages"
  6338     "Try all available programming languages for a matching suffix"
  6339 
  6339 
  6340     |filename|
  6340     |filename|
  6341 
  6341 
  6342     filename := filenameArg asFilename.
  6342     filename := filenameArg asFilename.
  6343     ProgrammingLanguage allDo:[:lang| | f |
  6343     ProgrammingLanguage allDo:[:lang| 
  6344 	f := (filename hasSuffix:lang sourceFileSuffix)
  6344         | f |
  6345 		    ifTrue:[filename]
  6345 
  6346 		    ifFalse:[filename addSuffix:lang sourceFileSuffix].
  6346         "/ cg: changed: did try all languages to load (eg. wether suffix matched or not.
  6347 	(self fileIn:f lazy:loadLazy silent:beSilent)
  6347         "/ I don't think, that is a good idea, as all of them languages might start parsing...
  6348 		ifTrue:[^ true]
  6348         (filename hasSuffix:lang sourceFileSuffix) ifTrue:[
       
  6349             (self fileIn:f lazy:loadLazy silent:beSilent) ifTrue:[
       
  6350                 ^ true
       
  6351             ].
       
  6352         ]
  6349     ].
  6353     ].
  6350     ^ false
  6354     ^ false
  6351 
  6355 
  6352     "Created: / 16-08-2009 / 14:45:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
  6356     "Created: / 16-08-2009 / 14:45:41 / Jan Vrany <vranyj1@fel.cvut.cz>"
  6353 !
  6357 !
  8286 ! !
  8290 ! !
  8287 
  8291 
  8288 !Smalltalk class methodsFor:'documentation'!
  8292 !Smalltalk class methodsFor:'documentation'!
  8289 
  8293 
  8290 version
  8294 version
  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_CVS
  8298 version_CVS
  8295     ^ '$Header: /cvs/stx/stx/libbasic/Smalltalk.st,v 1.1133 2015-05-22 18:41:08 cg Exp $'
  8299     ^ '$Header$'
  8296 !
  8300 !
  8297 
  8301 
  8298 version_HG
  8302 version_HG
  8299 
  8303 
  8300     ^ '$Changeset: <not expanded> $'
  8304     ^ '$Changeset: <not expanded> $'