checkin from browser
authorClaus Gittinger <cg@exept.de>
Wed, 22 Sep 1999 10:11:02 +0200
changeset 4785 4ced52c817e6
parent 4784 8616fba1e9e3
child 4786 2375c3d2bffc
checkin from browser
Project.st
--- a/Project.st	Wed Sep 22 09:13:30 1999 +0200
+++ b/Project.st	Wed Sep 22 10:11:02 1999 +0200
@@ -1348,7 +1348,7 @@
      of the project - this loadAll file is supposed to be located
      in the projects source directory."
 
-    |d f out in topName classes classInfo numBad firstBad msg|
+    |d f out in topName classes classInfo numBad firstBad msg methodsFile|
 
     classes := self classes.
     numBad := 0.
@@ -1373,6 +1373,7 @@
                                             clsOrSymbol
                                         ]
                               ].
+
     numBad ~~ 0 ifTrue:[
         msg := 'Cannot generate ''loadAll''-file.\\'.
         msg := msg , 'Reason: Class ''' , firstBad asText allBold
@@ -1384,6 +1385,8 @@
         ^ self.
     ].
 
+    "/ to not list private classes
+    classes := classes select:[:cls | cls owningClass isNil].
     classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a].
 
     Transcript showCR:'creating loadAll file'.
@@ -1403,7 +1406,7 @@
     out nextPutAll:'"/
 "/ $' , 'Header' , '$
 "/
-"/ load-file to load code for: ' , self package , '
+"/ loadAll-file to fileIn code for: ' , self package , '
 "/
 "/ Automatically generated from project definition.
 "/
@@ -1411,12 +1414,16 @@
 "/
 "/ Prerequisites:
 "/
+"/ Smalltalk loadPackage:''module:directory''.
+"/ Smalltalk loadPackage:''....''.
+"/ Smalltalk loadPackage:''....''.
+!!
 
 "{ package:''' , self package , ''' }"!!
 
 |files|
 
-''loading package ' , self package , ' ...'' printCR.
+''loading package ' , self package , ' ...'' infoPrintCR.
 
 files := #(
 '.
@@ -1427,30 +1434,39 @@
          out nextPutAll:'.st'''.
          out cr.
     ].
+    (methodsFile := self propertyAt:#methodsFile) notNil ifTrue:[
+         out 
+            nextPutAll:'  ''';
+            nextPutAll:methodsFile;
+            nextPutAll:''''.
+    ].
 
     out nextPutAll:') asOrderedCollection.
 
 (Smalltalk loadClassLibraryIfAbsent:''' , self name , ''') ifTrue:[
     |handle loaded|
 
-    handle := ObjectFileLoader loadedObjectHandles detect:[:h | |cls|
-        cls := h classes firstIfEmpty:nil.
-        cls notNil and:[cls package = ''' , self package , ''']
-    ] ifNone:[].
-
+    handle := ObjectFileLoader loadedObjectHandles 
+                    detect:[:h | h package = ''' , self package , '''] ifNone:nil.
     handle ifNotNil:[
         loaded := Set new:(handle classes size).
         handle classes do:[:c| c isMeta ifFalse:[loaded add:c classFilename]].
+'.
+    methodsFile notNil ifTrue:[
+    out nextPutAll:
+'        loaded add:''' , methodsFile , '''.'.
+    ].
+    out nextPutAll:'
         files := files asOrderedCollection select:[:f| (loaded includes:f) not].
     ].
 ]. 
 
 files do:[:s |
-    ''.'' print.
+    ''.'' infoPrint.
     Smalltalk fileIn:s.
 ].
-'' '' printCR.
-'' done (' , self package , ').'' printCR.
+'' '' infoPrintCR.
+'' done (' , self package , ').'' infoPrintCR.
 '.
 
     out close
@@ -1495,7 +1511,7 @@
     "creates a Make.proto file"
 
     |d f s type appName libName startUpClass startUpSelector
-     topName classes numBad firstBad msg|
+     topName classes numBad firstBad msg methodsFile|
 
     classes := self classes.
     numBad := 0.
@@ -1531,6 +1547,8 @@
         ^ self.
     ].
 
+    "/ to not list private classes
+    classes := classes select:[:cls | cls owningClass isNil].
     classes := classes copy topologicalSort:[:a :b | b isSubclassOf:a].
 
     topName := self findTopFrom:directoryName.
@@ -1703,6 +1721,12 @@
         abbrev := Smalltalk fileNameForClass:aClass name.
         s nextPutAll:'  '; nextPutAll:abbrev; nextPutAll:'.$(O)'.
     ].
+    (methodsFile := self propertyAt:#methodsFile) notNil ifTrue:[
+         s nextPutAll:' \'. s cr.
+         s nextPutAll:'  '; 
+           nextPutAll:(methodsFile asFilename withoutSuffix baseName);
+           nextPutAll:'.$(O)'.
+    ].
     s cr.
 
     s nextPutAll:'
@@ -1799,6 +1823,8 @@
                 aClass autoload.
             ].
         ].
+        "/ to not list private classes
+        classes := classes select:[:cls | cls owningClass isNil].
         classes := classes topologicalSort:[:a :b | a isSubclassOf:b].
 
         classes do:[:aClass |
@@ -2571,6 +2597,6 @@
 !Project class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.99 1999-09-20 14:36:21 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Project.st,v 1.100 1999-09-22 08:11:02 cg Exp $'
 ! !
 Project initialize!