--- a/ProjectBrowser.st Mon Sep 20 08:57:51 1999 +0200
+++ b/ProjectBrowser.st Mon Sep 20 09:55:53 1999 +0200
@@ -3710,7 +3710,8 @@
!
loadProjectCode
- |project filesToLoad methodsFile ns anyPatchClassMissing anyPatches|
+ |project filesToLoad methodsFile ns anyPatchClassMissing anyPatches
+ nMissingSuper prevNMissingSuper|
project := self currentProject.
ns := project defaultNameSpace.
@@ -3780,15 +3781,26 @@
filesToLoad size == 0 ifTrue:[
self information:'Projects code is already loaded.'
] ifFalse:[
- "/ load twice to avoid load-order trouble with superclasses ..
- 2 timesRepeat:[
- Class packageQuerySignal answer:project package asSymbol
- do:[
- filesToLoad do:[:fileToLoad |
- Smalltalk fileIn:(project directory asFilename construct:fileToLoad) pathName
+ "/ load as long as superclasses are missing
+ "/ (since the load order could be incorrect)
+ prevNMissingSuper := nil.
+ nMissingSuper := 1.
+ [nMissingSuper > 0 and:[nMissingSuper ~~ prevNMissingSuper]]
+ whileTrue:[
+ nMissingSuper := 0.
+ Parser::UndefinedSuperclassError handle:[:ex |
+ nMissingSuper := nMissingSuper + 1.
+ ex proceed
+ ] do:[
+ Class packageQuerySignal answer:project package asSymbol
+ do:[
+ filesToLoad do:[:fileToLoad |
+ Smalltalk fileIn:(project directory asFilename construct:fileToLoad) pathName
+ ]
]
- ]
- ]
+ ].
+ prevNMissingSuper := nMissingSuper.
+ ].
].
project isLoaded:true.
self readAspectsFromProject