correctly handling ignoredMethods
authorClaus Gittinger <cg@exept.de>
Sat, 10 Feb 1996 13:27:13 +0100
changeset 959 dbf9d63b4a6c
parent 958 50ae31c8deca
child 960 e3b75f50d0cd
correctly handling ignoredMethods
CCReader.st
ClassCategoryReader.st
--- a/CCReader.st	Sat Feb 10 13:22:40 1996 +0100
+++ b/CCReader.st	Sat Feb 10 13:27:13 1996 +0100
@@ -90,12 +90,6 @@
     "return a ClassCategoryReader to read a primitiveSpec chunk"
 
     ^ self new class:aClass primitiveSpec:which
-!
-
-skippingChunks
-    "return a class categoryReader which skips chunks up to the next empty one"
-
-    ^ self new ignoreMethods
 ! !
 
 !ClassCategoryReader class methodsFor:'defaults'!
@@ -148,46 +142,52 @@
 
     |aString done method compiler canMakeSourceRef sourceFile pos nm fn src s|
 
-    ignore ifFalse:[
-        Smalltalk silentLoading ifFalse:[
-            myClass isNil ifTrue:[
-                nm := '** UndefinedClass **'
-            ] ifFalse:[
-                nm := myClass name
-            ].
-            Transcript show:'  '; show:nm; show:' -> '; showCr:myCategory.
+    Smalltalk silentLoading ifFalse:[
+        myClass isNil ifTrue:[
+            nm := '** UndefinedClass **'
+        ] ifFalse:[
+            nm := myClass name
         ].
+        Transcript show:'  '; show:nm; show:' -> '; show:myCategory.
+        ignore ifTrue:[
+            Transcript show:' (** ignored **)'.
+        ] ifFalse:[
+            privacy notNil ifTrue:[
+                Transcript show:' (** '; show:privacy; show:' **)'
+            ]
+        ].
+        Transcript cr.
+    ].
 
-        canMakeSourceRef := false.
+    canMakeSourceRef := false.
 
-        "/
-        "/ KeepSource controls if
-        "/ the sourceString should be kept or
-        "/ a reference to the fileStream should be placed into the
-        "/ method intead.
-        "/
-        ((SourceMode ~~ #keep) 
-        and:[SourceMode ~~ #discard]) ifTrue:[
-            aStream isFileStream ifTrue:[
-                sourceFile := aStream pathName.
-                "/
-                "/ only do it, if the sourceFiles name
-                "/ ends with '.st'
-                "/ this prevents methods to reference the changes file.
-                "/
-                (sourceFile endsWith:'.st') ifTrue:[
-                    canMakeSourceRef := true.
+    "/
+    "/ KeepSource controls if
+    "/ the sourceString should be kept or
+    "/ a reference to the fileStream should be placed into the
+    "/ method intead.
+    "/
+    ((SourceMode ~~ #keep) 
+    and:[SourceMode ~~ #discard]) ifTrue:[
+        aStream isFileStream ifTrue:[
+            sourceFile := aStream pathName.
+            "/
+            "/ only do it, if the sourceFiles name
+            "/ ends with '.st'
+            "/ this prevents methods to reference the changes file.
+            "/
+            (sourceFile endsWith:'.st') ifTrue:[
+                canMakeSourceRef := true.
 
-                    SourceMode == #absReference ifFalse:[
-                        SourceMode == #sourceReference ifTrue:[
-                            sourceFile := 'st.src'.
-                        ] ifFalse:[
-                            sourceFile := aStream pathName asFilename baseName
-                        ]
+                SourceMode == #absReference ifFalse:[
+                    SourceMode == #sourceReference ifTrue:[
+                        sourceFile := 'st.src'.
+                    ] ifFalse:[
+                        sourceFile := aStream pathName asFilename baseName
                     ]
                 ]
             ]
-        ].
+        ]
     ].
 
     done := false.
@@ -201,13 +201,14 @@
             done := aString isNil or:[aString isEmpty].
             done ifFalse:[
                 primSpec notNil ifTrue:[
-                    myClass perform:primSpec with:aString.
-                    "
-                     ignore rest
-                    "
-                    ignore := true
-                ].
-                ignore ifFalse:[
+                    ignore ifFalse:[
+                        myClass perform:primSpec with:aString.
+                        "
+                         ignore rest
+                        "
+                        ignore := true
+                    ]
+                ] ifFalse:[
                     passChunk ifTrue:[
                         requestor source:aString
                     ].
@@ -259,12 +260,16 @@
                                       ifFail:nil
                     ].
 
-                    privacy notNil ifTrue:[
-                        privacy == #private ifTrue:[
-                            method setToPrivate
-                        ] ifFalse:[
-                            privacy == #protected ifTrue:[
-                                method setToProtected
+                    ignore ifTrue:[
+                        method setToIgnored
+                    ] ifFalse:[
+                        privacy notNil ifTrue:[
+                            privacy == #private ifTrue:[
+                                method setToPrivate
+                            ] ifFalse:[
+                                privacy == #protected ifTrue:[
+                                    method setToProtected
+                                ]
                             ]
                         ]
                     ]
@@ -274,7 +279,7 @@
     ]
 
     "Modified: 9.9.1995 / 15:29:08 / claus"
-    "Modified: 9.2.1996 / 17:46:20 / cg"
+    "Modified: 10.2.1996 / 13:24:04 / cg"
 ! !
 
 !ClassCategoryReader methodsFor:'private'!
@@ -297,8 +302,10 @@
 
 !ClassCategoryReader methodsFor:'special'!
 
-ignoreMethods 
+ignoredProtocol 
     ignore := true
+
+    "Created: 10.2.1996 / 12:54:15 / cg"
 !
 
 privateProtocol
@@ -312,6 +319,6 @@
 !ClassCategoryReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/Attic/CCReader.st,v 1.27 1996-02-09 17:29:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/Attic/CCReader.st,v 1.28 1996-02-10 12:27:13 cg Exp $'
 ! !
 ClassCategoryReader initialize!
--- a/ClassCategoryReader.st	Sat Feb 10 13:22:40 1996 +0100
+++ b/ClassCategoryReader.st	Sat Feb 10 13:27:13 1996 +0100
@@ -90,12 +90,6 @@
     "return a ClassCategoryReader to read a primitiveSpec chunk"
 
     ^ self new class:aClass primitiveSpec:which
-!
-
-skippingChunks
-    "return a class categoryReader which skips chunks up to the next empty one"
-
-    ^ self new ignoreMethods
 ! !
 
 !ClassCategoryReader class methodsFor:'defaults'!
@@ -148,46 +142,52 @@
 
     |aString done method compiler canMakeSourceRef sourceFile pos nm fn src s|
 
-    ignore ifFalse:[
-        Smalltalk silentLoading ifFalse:[
-            myClass isNil ifTrue:[
-                nm := '** UndefinedClass **'
-            ] ifFalse:[
-                nm := myClass name
-            ].
-            Transcript show:'  '; show:nm; show:' -> '; showCr:myCategory.
+    Smalltalk silentLoading ifFalse:[
+        myClass isNil ifTrue:[
+            nm := '** UndefinedClass **'
+        ] ifFalse:[
+            nm := myClass name
         ].
+        Transcript show:'  '; show:nm; show:' -> '; show:myCategory.
+        ignore ifTrue:[
+            Transcript show:' (** ignored **)'.
+        ] ifFalse:[
+            privacy notNil ifTrue:[
+                Transcript show:' (** '; show:privacy; show:' **)'
+            ]
+        ].
+        Transcript cr.
+    ].
 
-        canMakeSourceRef := false.
+    canMakeSourceRef := false.
 
-        "/
-        "/ KeepSource controls if
-        "/ the sourceString should be kept or
-        "/ a reference to the fileStream should be placed into the
-        "/ method intead.
-        "/
-        ((SourceMode ~~ #keep) 
-        and:[SourceMode ~~ #discard]) ifTrue:[
-            aStream isFileStream ifTrue:[
-                sourceFile := aStream pathName.
-                "/
-                "/ only do it, if the sourceFiles name
-                "/ ends with '.st'
-                "/ this prevents methods to reference the changes file.
-                "/
-                (sourceFile endsWith:'.st') ifTrue:[
-                    canMakeSourceRef := true.
+    "/
+    "/ KeepSource controls if
+    "/ the sourceString should be kept or
+    "/ a reference to the fileStream should be placed into the
+    "/ method intead.
+    "/
+    ((SourceMode ~~ #keep) 
+    and:[SourceMode ~~ #discard]) ifTrue:[
+        aStream isFileStream ifTrue:[
+            sourceFile := aStream pathName.
+            "/
+            "/ only do it, if the sourceFiles name
+            "/ ends with '.st'
+            "/ this prevents methods to reference the changes file.
+            "/
+            (sourceFile endsWith:'.st') ifTrue:[
+                canMakeSourceRef := true.
 
-                    SourceMode == #absReference ifFalse:[
-                        SourceMode == #sourceReference ifTrue:[
-                            sourceFile := 'st.src'.
-                        ] ifFalse:[
-                            sourceFile := aStream pathName asFilename baseName
-                        ]
+                SourceMode == #absReference ifFalse:[
+                    SourceMode == #sourceReference ifTrue:[
+                        sourceFile := 'st.src'.
+                    ] ifFalse:[
+                        sourceFile := aStream pathName asFilename baseName
                     ]
                 ]
             ]
-        ].
+        ]
     ].
 
     done := false.
@@ -201,13 +201,14 @@
             done := aString isNil or:[aString isEmpty].
             done ifFalse:[
                 primSpec notNil ifTrue:[
-                    myClass perform:primSpec with:aString.
-                    "
-                     ignore rest
-                    "
-                    ignore := true
-                ].
-                ignore ifFalse:[
+                    ignore ifFalse:[
+                        myClass perform:primSpec with:aString.
+                        "
+                         ignore rest
+                        "
+                        ignore := true
+                    ]
+                ] ifFalse:[
                     passChunk ifTrue:[
                         requestor source:aString
                     ].
@@ -259,12 +260,16 @@
                                       ifFail:nil
                     ].
 
-                    privacy notNil ifTrue:[
-                        privacy == #private ifTrue:[
-                            method setToPrivate
-                        ] ifFalse:[
-                            privacy == #protected ifTrue:[
-                                method setToProtected
+                    ignore ifTrue:[
+                        method setToIgnored
+                    ] ifFalse:[
+                        privacy notNil ifTrue:[
+                            privacy == #private ifTrue:[
+                                method setToPrivate
+                            ] ifFalse:[
+                                privacy == #protected ifTrue:[
+                                    method setToProtected
+                                ]
                             ]
                         ]
                     ]
@@ -274,7 +279,7 @@
     ]
 
     "Modified: 9.9.1995 / 15:29:08 / claus"
-    "Modified: 9.2.1996 / 17:46:20 / cg"
+    "Modified: 10.2.1996 / 13:24:04 / cg"
 ! !
 
 !ClassCategoryReader methodsFor:'private'!
@@ -297,8 +302,10 @@
 
 !ClassCategoryReader methodsFor:'special'!
 
-ignoreMethods 
+ignoredProtocol 
     ignore := true
+
+    "Created: 10.2.1996 / 12:54:15 / cg"
 !
 
 privateProtocol
@@ -312,6 +319,6 @@
 !ClassCategoryReader class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.27 1996-02-09 17:29:16 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.28 1996-02-10 12:27:13 cg Exp $'
 ! !
 ClassCategoryReader initialize!