comments
authorClaus Gittinger <cg@exept.de>
Thu, 14 May 2009 12:03:29 +0200
changeset 11700 18628a1e8a59
parent 11699 36f3cff10f30
child 11701 b52763115eb1
comments
ClassDescription.st
--- a/ClassDescription.st	Thu May 14 12:01:39 2009 +0200
+++ b/ClassDescription.st	Thu May 14 12:03:29 2009 +0200
@@ -1983,6 +1983,8 @@
      If the current project is not nil, create the file in the projects
      directory."
 
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     |aStream fileName|
 
     fileName := (self name , '-' , aCategory , '.st') asFilename.
@@ -2025,6 +2027,8 @@
      If both are nil, all are saved. See version-method handling in
      fileOut for what this is needed."
 
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     |source sortedSelectors first privacy interestingMethods cat|
 
     interestingMethods := self methodsInCategory:aCategory forWhich:methodFilter.
@@ -2107,12 +2111,14 @@
      If both are nil, all are saved. See version-method handling in
      fileOut for what this is needed."
 
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     self
-	fileOutCategory:aCategory
-	except:skippedMethods
-	only:savedMethods
-	methodFilter:nil
-	on:aStream
+        fileOutCategory:aCategory
+        except:skippedMethods
+        only:savedMethods
+        methodFilter:nil
+        on:aStream
 
     "Modified: 28.8.1995 / 14:30:41 / claus"
     "Modified: 12.6.1996 / 11:37:33 / stefan"
@@ -2123,6 +2129,8 @@
 fileOutCategory:aCategory methodFilter:methodFilter on:aStream
     "file out all methods belonging to aCategory, aString onto aStream"
 
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     self fileOutCategory:aCategory except:nil only:nil methodFilter:methodFilter on:aStream
 
     "Created: 1.4.1997 / 16:04:44 / stefan"
@@ -2131,11 +2139,13 @@
 fileOutCategory:aCategory on:aStream
     "file out all methods belonging to aCategory, aString onto aStream"
 
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     "/
     "/ must use the classes full name
     "/
     Class fileOutNameSpaceQuerySignal answer:true do:[
-	self fileOutCategory:aCategory except:nil only:nil methodFilter:nil on:aStream
+        self fileOutCategory:aCategory except:nil only:nil methodFilter:nil on:aStream
     ]
 
     "Created: 1.4.1997 / 16:04:44 / stefan"
@@ -2146,36 +2156,38 @@
      If the current project is not nil, create the file in the projects
      directory."
 
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     |aStream fileName selector|
 
     selector := self selectorAtMethod:aMethod.
     selector notNil ifTrue:[
-	fileName := (self name , '-' , selector, '.st') asFilename.
-	fileName makeLegalFilename.
-
-	"
-	 this test allows a smalltalk to be built without Projects/ChangeSets
-	"
-	Project notNil ifTrue:[
-	    fileName := Project currentProjectDirectory asFilename construct:fileName name.
-	].
-
-	"
-	 if file exists, save original in a .sav file
-	"
-	fileName exists ifTrue:[
-	    fileName copyTo:(fileName withSuffix: 'sav')
-	].
-
-	[
-	    aStream := fileName newReadWriteStream.
-	] on:FileStream openErrorSignal do:[:ex|
-	    ^ FileOutErrorSignal
-		    raiseRequestWith:fileName name
-		    errorString:(' - cannot create file:', fileName name)
-	].
-	self fileOutMethod:aMethod on:aStream.
-	aStream close
+        fileName := (self name , '-' , selector, '.st') asFilename.
+        fileName makeLegalFilename.
+
+        "
+         this test allows a smalltalk to be built without Projects/ChangeSets
+        "
+        Project notNil ifTrue:[
+            fileName := Project currentProjectDirectory asFilename construct:fileName name.
+        ].
+
+        "
+         if file exists, save original in a .sav file
+        "
+        fileName exists ifTrue:[
+            fileName copyTo:(fileName withSuffix: 'sav')
+        ].
+
+        [
+            aStream := fileName newReadWriteStream.
+        ] on:FileStream openErrorSignal do:[:ex|
+            ^ FileOutErrorSignal
+                    raiseRequestWith:fileName name
+                    errorString:(' - cannot create file:', fileName name)
+        ].
+        self fileOutMethod:aMethod on:aStream.
+        aStream close
     ]
 
     "Modified: / 1.4.1997 / 16:00:57 / stefan"
@@ -2186,6 +2198,8 @@
 fileOutMethod:aMethod on:aStream
     "file out aMethod onto aStream. Used for example to write individual changeChunks"
 
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     |cat source privacy|
 
     aStream nextPutChunkSeparator.
@@ -2223,12 +2237,31 @@
 !
 
 fileOutMethods:methods on:aStream
+    "/ WARNING: will be obsoleted by SmalltalkChunkFileSourceWriter
+
     methods do:[:aMethod |
-	self fileOutMethod:aMethod on:aStream
+        self fileOutMethod:aMethod on:aStream
     ].
 
     "Created: / 29.1.2000 / 16:39:53 / cg"
     "Modified: / 29.1.2000 / 16:40:59 / cg"
+!
+
+methodsInCategory:aCategory forWhich:methodFilter
+    "helper for fileOut"
+
+    |interestingMethods|
+
+    interestingMethods := OrderedCollection new.
+    self methodsDo:[:aMethod |
+        (methodFilter isNil
+        or:[methodFilter value:aMethod]) ifTrue:[
+            (aCategory = aMethod category) ifTrue:[
+                interestingMethods add:aMethod.
+            ]
+        ]
+    ].
+    ^ interestingMethods
 ! !
 
 !ClassDescription methodsFor:'fileOut-xml'!
@@ -2236,6 +2269,8 @@
 fileOutXMLCategory:aCategory methodFilter:methodFilter on:aStream
     "file out all methods belonging to aCategory, aString in xml format onto aStream."
 
+    "/ WARNING: will be obsoleted by XMLChunkFileWriter (or similar)
+
     |source sortedSelectors first privacy interestingMethods cat|
 
     interestingMethods := self methodsInCategory:aCategory forWhich:methodFilter.
@@ -2296,6 +2331,8 @@
 fileOutXMLMethod:aMethod on:aStream
     "file out a method in xml format onto aStream."
 
+    "/ WARNING: will be obsoleted by XMLChunkFileWriter (or similar)
+
     |source privacy|
 
     privacy := aMethod privacy.
@@ -2309,20 +2346,20 @@
     aStream nextPutLine:'</category>'.
 
     privacy ~~ #public ifTrue:[
-	aStream nextPutAll:'  <privacy>'.
-	aStream nextPutAll:privacy.
-	aStream nextPutLine:'</privacy>'.
+        aStream nextPutAll:'  <privacy>'.
+        aStream nextPutAll:privacy.
+        aStream nextPutLine:'</privacy>'.
     ].
 
     source := aMethod source.
     source isNil ifTrue:[
-	FileOutErrorSignal
-	    raiseRequestWith:self
-	    errorString:' - no source for method: ', (aMethod displayString)
+        FileOutErrorSignal
+            raiseRequestWith:self
+            errorString:' - no source for method: ', (aMethod displayString)
     ] ifFalse:[
-	aStream nextPutAll:'  <body>'.
-	self fileOutXMLString:source on:aStream.
-	aStream nextPutLine:'  </body>'.
+        aStream nextPutAll:'  <body>'.
+        self fileOutXMLString:source on:aStream.
+        aStream nextPutLine:'  </body>'.
     ].
     aStream nextPutLine:'</methods>'.
 !
@@ -2331,23 +2368,6 @@
     "append an xml-escaped string to aStream."
 
     XMLCoder putQuotedString:someString on:aStream
-!
-
-methodsInCategory:aCategory forWhich:methodFilter
-    "helper for fileOut"
-
-    |interestingMethods|
-
-    interestingMethods := OrderedCollection new.
-    self methodsDo:[:aMethod |
-        (methodFilter isNil
-        or:[methodFilter value:aMethod]) ifTrue:[
-            (aCategory = aMethod category) ifTrue:[
-                interestingMethods add:aMethod.
-            ]
-        ]
-    ].
-    ^ interestingMethods
 ! !
 
 !ClassDescription methodsFor:'printOut'!
@@ -4040,7 +4060,7 @@
 !ClassDescription class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.201 2009-05-14 09:39:44 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.202 2009-05-14 10:03:29 cg Exp $'
 ! !
 
 ClassDescription initialize!