ProjectDefinition.st
changeset 9551 b85eead6b4ac
parent 9549 cb6f689fcbd4
child 9553 0ba9e1ed1aee
--- a/ProjectDefinition.st	Thu Aug 17 09:50:08 2006 +0200
+++ b/ProjectDefinition.st	Thu Aug 17 09:50:24 2006 +0200
@@ -281,12 +281,13 @@
 
 autoloaded_classNames
     "classes listed here will NOT be compiled, but remain autoloaded.
-     to be excluded from the build process can be user-defined in my subclasses"
+     (i.e. excluded from the build process). Can be user-defined in my subclasses"
 
     ^#()
 
     "Created: / 07-08-2006 / 19:02:57 / fm"
     "Modified: / 07-08-2006 / 21:25:25 / fm"
+    "Modified: / 17-08-2006 / 08:48:13 / cg"
 !
 
 classNames            
@@ -635,6 +636,59 @@
     "Modified: / 09-08-2006 / 15:10:57 / fm"
 ! !
 
+!BuildDefinition class methodsFor:'loading'!
+
+load
+    self loadExtensions.
+    self loadAllClasses.
+
+    "Created: / 17-08-2006 / 01:01:41 / cg"
+!
+
+loadAllClasses
+    |loadedClasses|
+
+    loadedClasses := OrderedCollection new.
+
+    self allClassNames do:[:className |
+        |cls|
+
+        cls := Smalltalk at:className asSymbol.
+        (cls isNil or:[cls isLoaded not]) ifTrue:[
+            cls := Smalltalk
+                fileInClass:className 
+                package:self package 
+                initialize:false 
+                lazy:false 
+                silent:false.
+            cls notNil ifTrue:[
+                loadedClasses add:cls
+            ].
+        ].
+    ].
+    loadedClasses do:[:each |
+        (each theMetaclass implements:#initialize) ifTrue:[
+            each initialize
+        ].
+    ].
+
+    "Created: / 17-08-2006 / 01:01:14 / cg"
+!
+
+loadExtensions
+    Smalltalk loadExtensionsForPackage:self package.
+
+    "Created: / 17-08-2006 / 00:21:39 / cg"
+!
+
+postAutoload
+    self extensionMethodNames notEmptyOrNil ifTrue:[
+        self loadExtensions
+    ].
+
+    "Created: / 17-08-2006 / 00:21:29 / cg"
+! !
+
 !BuildDefinition class methodsFor:'mappings'!
 
 bc_dot_def_mappings
@@ -709,6 +763,34 @@
     ^'0.1.1.1'
 ! !
 
+!BuildDefinition class methodsFor:'queries'!
+
+hasAllClassesLoaded
+    self allClassNames do:[:nm |
+        |cls|
+
+        cls := Smalltalk classNamed:nm.
+        (cls isNil or:[cls isLoaded not]) ifTrue:[^ false ].
+    ].
+    ^ true.
+
+    "Created: / 17-08-2006 / 00:50:01 / cg"
+    "Modified: / 17-08-2006 / 08:49:44 / cg"
+!
+
+hasAllExtensionsLoaded
+    self extensionMethodNames pairWiseDo:[:className :selector |
+        |cls|
+
+        cls := Smalltalk at:className asSymbol.
+        (cls isNil or:[cls isLoaded not]) ifTrue:[^ false ].
+        (cls compiledMethodAt:selector) isNil ifTrue:[^ false ].
+    ].
+    ^ true.
+
+    "Created: / 17-08-2006 / 00:50:01 / cg"
+! !
+
 !BuildDefinition class methodsFor:'testing'!
 
 isProjectDefinition
@@ -864,5 +946,5 @@
 !BuildDefinition class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.7 2006-08-16 17:02:17 fm Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ProjectDefinition.st,v 1.8 2006-08-17 07:50:24 cg Exp $'
 ! !