312 Project notNil ifTrue:[ |
312 Project notNil ifTrue:[ |
313 project := Project current. |
313 project := Project current. |
314 Project setProject:nil. |
314 Project setProject:nil. |
315 ]. |
315 ]. |
316 |
316 |
|
317 package := self package. |
317 Class nameSpaceQuerySignal answer:myNameSpace "Smalltalk" |
318 Class nameSpaceQuerySignal answer:myNameSpace "Smalltalk" |
318 do:[ |
319 do:[ |
319 package := self package. |
|
320 (Smalltalk |
320 (Smalltalk |
321 fileInClass:myName |
321 fileInClass:myName |
322 package:package |
322 package:package |
323 initialize:false |
323 initialize:false |
324 lazy:LazyLoading |
324 lazy:LazyLoading |
375 raiseRequestWith:self |
375 raiseRequestWith:self |
376 errorString:('autoload of ' , myName , ' failed'). |
376 errorString:('autoload of ' , myName , ' failed'). |
377 ^ nil |
377 ^ nil |
378 ]. |
378 ]. |
379 |
379 |
|
380 newClass setPackage:package. |
380 "/ |
381 "/ |
381 "/ autoloaded classes get their package from the revision (if present) |
382 "/ autoloaded classes get their package from the revision (if present) |
382 "/ this only happens with autoloaded sourceFiles which have no package |
383 "/ this only happens with autoloaded sourceFiles which have no package |
383 "/ info encoded. (binary classes have it) |
384 "/ info encoded. (binary classes have it) |
384 "/ If there is no such information, give it my package (if I have one) |
385 "/ If there is no such information, give it my package (if I have one) |
385 "/ |
386 "/ |
386 newClass setPackageFromRevision. |
387 "/ newClass setPackageFromRevision. |
387 |
388 "/ |
388 newPackage := newClass package. |
389 "/ newPackage := newClass package. |
389 (newPackage isNil or:[newPackage = 'no package']) ifTrue:[ |
390 "/ (newPackage isNil or:[newPackage = 'no package']) ifTrue:[ |
390 (package notNil and:[package ~= 'no package']) ifTrue:[ |
391 "/ (package notNil and:[package ~= 'no package']) ifTrue:[ |
391 newClass setPackage:package. |
392 "/ newClass setPackage:package. |
392 ]. |
393 "/ ]. |
393 ]. |
394 "/ ]. |
394 |
395 |
395 LoadedClasses isNil ifTrue:[ |
396 LoadedClasses isNil ifTrue:[ |
396 LoadedClasses := IdentitySet new. |
397 LoadedClasses := IdentitySet new. |
397 ]. |
398 ]. |
398 LoadedClasses add:newClass. |
399 LoadedClasses add:newClass. |