# HG changeset patch # User Claus Gittinger # Date 937814153 -7200 # Node ID 0bcf1df24277f2e441156d2c2351710533ca4417 # Parent 8e2fa160357feecd4c5f84a5a6140bcaeda85e5b checkin from browser diff -r 8e2fa160357f -r 0bcf1df24277 ProjectBrowser.st --- 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