*** empty log message ***
authorClaus Gittinger <cg@exept.de>
Mon, 23 Oct 2000 16:08:33 +0200
changeset 5670 5e1a1a8ab2a6
parent 5669 b3b9daefb6b6
child 5671 25efda9c2677
*** empty log message ***
Project.st
--- a/Project.st	Mon Oct 23 13:43:47 2000 +0200
+++ b/Project.st	Mon Oct 23 16:08:33 2000 +0200
@@ -22,15 +22,15 @@
 	category:'System-Support'
 !
 
-Object subclass:#ClassInfo
-	instanceVariableNames:'conditionForInclusion className classFileName'
+Object subclass:#MethodInfo
+	instanceVariableNames:'conditionForInclusion methodName className fileName'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:Project
 !
 
-Object subclass:#MethodInfo
-	instanceVariableNames:'conditionForInclusion methodName className fileName'
+Object subclass:#ClassInfo
+	instanceVariableNames:'conditionForInclusion className classFileName'
 	classVariableNames:''
 	poolDictionaries:''
 	privateIn:Project
@@ -1989,15 +1989,11 @@
      of the project - this loadAll file is supposed to be located
      in the projects source directory."
 
-    |d f out in topName classes classInfo myPackage   
-     methodsFile prerequisitePackages transcript notEmpty|
+    |d f out in classes transcript |
 
     classes := self classesInOrderFor:'generate ''loadAll''-file.'.
     classes isNil ifTrue:[^ self].
 
-    methodsFile := self propertyAt:#methodsFile.
-    notEmpty := (classes size > 0 or:[methodsFile size > 0]).
-
     transcript := Transcript current.
     transcript showCR:'creating loadAll file'.
 
@@ -2012,15 +2008,32 @@
         (d construct:'loadAll.bak') renameTo:f.
         ^ self
     ].
+    self createLoadAllFileOn:out.
+    out close
+!
+
+createLoadAllFileOn:outStream
+    "creates a 'loadAll' file, which will load all classes
+     of the project - this loadAll file is supposed to be located
+     in the projects source directory."
+
+    |in classes classInfo myPackage   
+     methodsFile prerequisitePackages transcript notEmpty|
+
+    classes := self classesInOrderFor:'generate ''loadAll''-file.'.
+    classes isNil ifTrue:[^ self].
+
+    methodsFile := self propertyAt:#methodsFile.
+    notEmpty := (classes size > 0 or:[methodsFile size > 0]).
 
     myPackage := self package.
 
-    out nextPutLine:'"/
+    outStream nextPutLine:'"/
 "/ $' , 'Header' , '$'.
-    out nextPutLine:'"/
+    outStream nextPutLine:'"/
 "/ loadAll-file to fileIn code for: ' , myPackage.
     
-    out nextPutAll:'"/
+    outStream nextPutAll:'"/
 "/ Automatically generated from project definition.
 "/ DO NOT MODIFY THIS fILE;
 "/ modify the .prj file instead, and regenerate this file
@@ -2046,20 +2059,20 @@
                                 ].
 
     prerequisitePackages size == 0 ifTrue:[
-        out nextPutLine:''.
-        out nextPutLine:'"/ Smalltalk loadPackage:''module:directory''.'.
-        out nextPutLine:'"/ Smalltalk loadPackage:''....''.'.
+        outStream nextPutLine:''.
+        outStream nextPutLine:'"/ Smalltalk loadPackage:''module:directory''.'.
+        outStream nextPutLine:'"/ Smalltalk loadPackage:''....''.'.
     ] ifFalse:[
-        out cr.
+        outStream cr.
         prerequisitePackages do:[:packName |
-            out nextPutLine:'Smalltalk loadPackage:''' , packName , '''.'.
+            outStream nextPutLine:'Smalltalk loadPackage:''' , packName , '''.'.
         ]
     ].
 
     methodsFile := self propertyAt:#methodsFile.
     notEmpty ifTrue:[
 
-        out nextPutAll:'!!
+        outStream nextPutAll:'!!
 
 "{ package:''' , myPackage , ''' }"!!
 
@@ -2076,7 +2089,7 @@
             clsInfo := self classInfoFor:cls.
             cond := clsInfo conditionForInclusion.
             (cond == #always or:[cond == #autoload]) ifTrue:[
-                out nextPutAll:'  '''.
+                outStream nextPutAll:'  '''.
                 fileName := clsInfo classFileName.
                 fileName isNil ifTrue:[
                     cls isBehavior ifFalse:[
@@ -2088,19 +2101,19 @@
                 (fileName endsWith:'.st') ifFalse:[
                     fileName := fileName , '.st'
                 ].
-                fileName printOn:out.
-                out nextPutAll:''''; cr.
+                fileName printOn:outStream.
+                outStream nextPutAll:''''; cr.
             ]
         ].
         methodsFile size > 0 ifTrue:[
-             out 
+             outStream 
                 nextPutAll:'  ''';
                 nextPutAll:methodsFile;
                 nextPutAll:'''';
                 cr.
         ].
 
-        out nextPutAll:') asOrderedCollection.
+        outStream nextPutAll:') asOrderedCollection.
 
 "/ see if there is a classLibrary
 (Smalltalk fileInClassLibrary:''' , self libraryName , ''') ifTrue:[
@@ -2114,9 +2127,9 @@
 '.
     
         methodsFile size > 0 ifTrue:[
-            out nextPutLine:('        loaded add:''' , methodsFile , '''.').
+            outStream nextPutLine:('        loaded add:''' , methodsFile , '''.').
         ].
-        out nextPutAll:'        files := files asOrderedCollection select:[:f| (loaded includes:f) not].
+        outStream nextPutAll:'        files := files asOrderedCollection select:[:f| (loaded includes:f) not].
     ].
 ].
 
@@ -2136,7 +2149,6 @@
 '.
 
     ].
-    out close
 !
 
 createMacMakefile
@@ -3746,56 +3758,6 @@
     "Modified: 14.2.1997 / 15:38:47 / cg"
 ! !
 
-!Project::ClassInfo methodsFor:'accessing'!
-
-classFileName
-    "return the value of the instance variable 'classFileName' (automatically generated)"
-
-    ^ classFileName!
-
-classFileName:something
-    "set the value of the instance variable 'classFileName' (automatically generated)"
-
-    classFileName := something.!
-
-className
-    "return the value of the instance variable 'className' (automatically generated)"
-
-    ^ className!
-
-className:something
-    "set the value of the instance variable 'className' (automatically generated)"
-
-    className := something.!
-
-conditionForInclusion
-    "return the value of the instance variable 'conditionForInclusion' (automatically generated)"
-
-    ^ conditionForInclusion!
-
-conditionForInclusion:something
-    "set the value of the instance variable 'conditionForInclusion' (automatically generated)"
-
-    conditionForInclusion := something.! !
-
-!Project::ClassInfo methodsFor:'printing & storing'!
-
-displayString
-    ^ 'ClassInfo: ' , className
-! !
-
-!Project::ClassInfo methodsFor:'queries'!
-
-theClass
-    |cls|
-
-    cls := Smalltalk classNamed:className.
-    cls isNil ifTrue:[ ^ nil].
-    ^ cls
-
-    "Created: / 26.9.1999 / 13:39:00 / cg"
-! !
-
 !Project::MethodInfo methodsFor:'accessing'!
 
 className
@@ -3865,9 +3827,59 @@
     "Created: / 26.9.1999 / 13:39:07 / cg"
 ! !
 
+!Project::ClassInfo methodsFor:'accessing'!
+
+classFileName
+    "return the value of the instance variable 'classFileName' (automatically generated)"
+
+    ^ classFileName!
+
+classFileName:something
+    "set the value of the instance variable 'classFileName' (automatically generated)"
+
+    classFileName := something.!
+
+className
+    "return the value of the instance variable 'className' (automatically generated)"
+
+    ^ className!
+
+className:something
+    "set the value of the instance variable 'className' (automatically generated)"
+
+    className := something.!
+
+conditionForInclusion
+    "return the value of the instance variable 'conditionForInclusion' (automatically generated)"
+
+    ^ conditionForInclusion!
+
+conditionForInclusion:something
+    "set the value of the instance variable 'conditionForInclusion' (automatically generated)"
+
+    conditionForInclusion := something.! !
+
+!Project::ClassInfo methodsFor:'printing & storing'!
+
+displayString
+    ^ 'ClassInfo: ' , className
+! !
+
+!Project::ClassInfo methodsFor:'queries'!
+
+theClass
+    |cls|
+
+    cls := Smalltalk classNamed:className.
+    cls isNil ifTrue:[ ^ nil].
+    ^ cls
+
+    "Created: / 26.9.1999 / 13:39:00 / cg"
+! !
+
 !Project class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.162 2000-10-06 20:11:48 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.163 2000-10-23 14:08:33 cg Exp $'
 ! !
 Project initialize!