ClassCategoryReader.st
author Claus Gittinger <cg@exept.de>
Wed, 15 Oct 1997 14:30:30 +0200
changeset 3028 3a05e7a72d2f
parent 2404 77c6111ce6ba
child 3089 0823aa17ac4d
permissions -rw-r--r--
comment
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     1
"
5
67342904af11 *** empty log message ***
claus
parents: 3
diff changeset
     2
 COPYRIGHT (c) 1989 by Claus Gittinger
167
f93304c133e3 support private, protected and ignored code
claus
parents: 135
diff changeset
     3
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     4
a27a279701f8 Initial revision
claus
parents:
diff changeset
     5
 This software is furnished under a license and may be used
a27a279701f8 Initial revision
claus
parents:
diff changeset
     6
 only in accordance with the terms of that license and with the
a27a279701f8 Initial revision
claus
parents:
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
a27a279701f8 Initial revision
claus
parents:
diff changeset
     8
 be provided or otherwise made available to, or used by, any
a27a279701f8 Initial revision
claus
parents:
diff changeset
     9
 other person.  No title to or ownership of the software is
a27a279701f8 Initial revision
claus
parents:
diff changeset
    10
 hereby transferred.
a27a279701f8 Initial revision
claus
parents:
diff changeset
    11
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
    12
3028
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
    13
'From Smalltalk/X, Version:3.2.1 on 14-oct-1997 at 11:17:15 pm'                 !
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
    14
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    15
Object subclass:#ClassCategoryReader
784
0811a8196743 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    16
	instanceVariableNames:'myClass myCategory privacy ignore primSpec'
2404
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
    17
	classVariableNames:'KeepSource SourceMode SkipUnchangedMethods'
784
0811a8196743 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    18
	poolDictionaries:''
0811a8196743 prints replaced by infoPrint
Claus Gittinger <cg@exept.de>
parents: 699
diff changeset
    19
	category:'Kernel-Support'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    20
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    21
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
    22
!ClassCategoryReader class methodsFor:'documentation'!
88
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    23
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    24
copyright
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    25
"
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    26
 COPYRIGHT (c) 1989 by Claus Gittinger
167
f93304c133e3 support private, protected and ignored code
claus
parents: 135
diff changeset
    27
	      All Rights Reserved
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    28
88
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    29
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    30
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    32
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    33
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    34
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    35
"
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    36
!
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    37
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    38
documentation
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    39
"
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    40
    a helper class for fileIn - keeps track of class and category to filein for.
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    41
    Instances of this are created by the #methodsFor: methods in Class, to
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    42
    read the next chunk(s) from a stream.
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    43
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    44
    ClassCategoryReaders allow different ways of keeping the sourceCode of its
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    45
    loaded code. This is controlled by the SourceMode class variable which may be:
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    46
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    47
        #discard         - forget the source code; no browsing/recompilation is possible
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    48
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    49
        #keep            - keep the source code as a string.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    50
                           any saved image will later be fully independent of any
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    51
                           source files.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    52
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    53
        #reference       - keep a reference to the loaded files basename
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    54
                           In order to be browsable, the original sourcefile should be
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    55
                           found along the sourcePath 
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    56
                           (i.e. typically a link in the source directory should be present)
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    57
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    58
        #absReference    - keep a reference to the loaded files absolute pathname
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    59
                           (this is ok in multiUser configurations, where all sourcefiles are mounted
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    60
                           on a common path; typically automounted systems)
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    61
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    62
        #sourceReference - append source to the `st.src' file,
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    63
                           and keep a reference to that file.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    64
                           if the image is later moved to another location,
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    65
                           this file should be moved along with it.
1295
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1176
diff changeset
    66
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1176
diff changeset
    67
    [author:]
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1176
diff changeset
    68
        Claus Gittinger
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1176
diff changeset
    69
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1176
diff changeset
    70
    [see also:]
83f594f05c52 documentation
Claus Gittinger <cg@exept.de>
parents: 1176
diff changeset
    71
        Class PositionableStream
88
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    72
"
81dacba7a63a *** empty log message ***
claus
parents: 68
diff changeset
    73
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    74
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
    75
!ClassCategoryReader class methodsFor:'initialization'!
425
claus
parents: 384
diff changeset
    76
claus
parents: 384
diff changeset
    77
initialize
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    78
    KeepSource := true.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    79
    SourceMode := #keep.
2404
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
    80
    SkipUnchangedMethods := true.
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    81
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    82
    "
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    83
     ClassCategoryReader initialize
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    84
    "
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
    85
2404
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
    86
    "Modified: 14.2.1997 / 18:26:52 / cg"
425
claus
parents: 384
diff changeset
    87
! !
claus
parents: 384
diff changeset
    88
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
    89
!ClassCategoryReader class methodsFor:'instance creation'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    90
a27a279701f8 Initial revision
claus
parents:
diff changeset
    91
class:aClass category:aCategory
a27a279701f8 Initial revision
claus
parents:
diff changeset
    92
    "return a new ClassCategoryReader to read methods for aClass with
a27a279701f8 Initial revision
claus
parents:
diff changeset
    93
     methodCategory aCategory"
a27a279701f8 Initial revision
claus
parents:
diff changeset
    94
a27a279701f8 Initial revision
claus
parents:
diff changeset
    95
    ^ self new class:aClass category:aCategory
167
f93304c133e3 support private, protected and ignored code
claus
parents: 135
diff changeset
    96
!
f93304c133e3 support private, protected and ignored code
claus
parents: 135
diff changeset
    97
216
a8abff749575 *** empty log message ***
claus
parents: 167
diff changeset
    98
class:aClass primitiveSpec:which
a8abff749575 *** empty log message ***
claus
parents: 167
diff changeset
    99
    "return a ClassCategoryReader to read a primitiveSpec chunk"
a8abff749575 *** empty log message ***
claus
parents: 167
diff changeset
   100
a8abff749575 *** empty log message ***
claus
parents: 167
diff changeset
   101
    ^ self new class:aClass primitiveSpec:which
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   102
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   103
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   104
!ClassCategoryReader class methodsFor:'defaults'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   105
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   106
keepSource
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   107
    ^ KeepSource
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   108
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   109
    "Created: 9.9.1995 / 15:22:27 / claus"
216
a8abff749575 *** empty log message ***
claus
parents: 167
diff changeset
   110
!
a8abff749575 *** empty log message ***
claus
parents: 167
diff changeset
   111
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   112
keepSource:aBoolean
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   113
    KeepSource := aBoolean.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   114
    SourceMode := (aBoolean ifTrue:[#keep] ifFalse:[#reference])
68
59faa75185ba *** empty log message ***
claus
parents: 12
diff changeset
   115
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   116
    "Created: 9.9.1995 / 15:22:26 / claus"
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   117
    "Modified: 9.2.1996 / 17:23:04 / cg"
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   118
!
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   119
2404
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   120
skipUnchangedMethods
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   121
    "return true, if the default for unchanged methods is to skip them.
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   122
     The default is true."
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   123
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   124
    ^ SkipUnchangedMethods
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   125
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   126
    "Created: 14.2.1997 / 18:27:49 / cg"
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   127
    "Modified: 14.2.1997 / 18:28:13 / cg"
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   128
!
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   129
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   130
skipUnchangedMethods:aBoolean
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   131
    "return true, if the default for unchanged methods is to skip them.
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   132
     The default is true. Can be temporarily changed to false, if
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   133
     a forced fileIn is required."
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   134
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   135
    SkipUnchangedMethods := aBoolean
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   136
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   137
    "Created: 14.2.1997 / 18:27:43 / cg"
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   138
    "Modified: 14.2.1997 / 18:28:42 / cg"
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   139
!
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   140
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   141
sourceMode 
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   142
    "return the sourceMode, which controls how sources are to be handled.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   143
     Read #documentation for more info"
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   144
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   145
    ^ SourceMode
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   146
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   147
    "Created: 9.2.1996 / 17:22:58 / cg"
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   148
!
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   149
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   150
sourceMode:aSymbol 
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   151
    "set the sourceMode, which controls how sources are to be handled.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   152
     Read #documentation for more info"
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   153
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   154
    SourceMode := aSymbol
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   155
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   156
    "Created: 9.2.1996 / 17:23:00 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   157
! !
a27a279701f8 Initial revision
claus
parents:
diff changeset
   158
a27a279701f8 Initial revision
claus
parents:
diff changeset
   159
!ClassCategoryReader methodsFor:'fileIn'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   160
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   161
fileInFrom:aStream
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   162
    "read method-chunks from the input stream, aStream; compile them
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   163
     and add the methods to the class defined by the class-instance var"
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   164
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   165
    self fileInFrom:aStream notifying:nil passChunk:false
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   166
!
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   167
328
claus
parents: 249
diff changeset
   168
fileInFrom:aStream notifying:requestor passChunk:passChunk
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   169
    "read method-chunks from the input stream, aStream; compile them
a27a279701f8 Initial revision
claus
parents:
diff changeset
   170
     and add the methods to the class defined by the class-instance var;
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   171
     errors and notifications are passed to requestor.
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   172
     If passChunk is true, chunks are given to the requestor,
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   173
     via a #source: message, allowing it to open a view showing any
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   174
     arronous source code."
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   175
1644
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   176
    ^ self
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   177
        fileInFrom:aStream 
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   178
        notifying:requestor 
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   179
        passChunk:passChunk 
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   180
        single:false
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   181
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   182
    "Modified: 5.1.1997 / 03:01:26 / cg"
1644
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   183
!
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   184
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   185
fileInFrom:aStream notifying:requestor passChunk:passChunk single:oneChunkOnly
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   186
    "read method-chunks from the input stream, aStream; compile them
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   187
     and add the methods to the class defined by the class-instance var;
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   188
     errors and notifications are passed to requestor.
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   189
     If passChunk is true, chunks are given to the requestor,
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   190
     via a #source: message, allowing it to open a view showing any
3028
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
   191
     erronous source code.
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   192
     If oneChunkOnly is true, the fileIn is finished after the first chunk."
1644
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   193
1176
1c53fc7a69c0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 959
diff changeset
   194
    |aString done method compiler canMakeSourceRef sourceFile pos nm src s|
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   195
1565
63876d73db7d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1295
diff changeset
   196
    Smalltalk silentLoading == true ifFalse:[
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   197
        myClass isNil ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   198
            nm := '** UndefinedClass **'
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   199
        ] ifFalse:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   200
            nm := myClass name
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   201
        ].
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   202
        Transcript show:'  '; show:nm; show:' -> '; show:myCategory.
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   203
        ignore ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   204
            Transcript show:' (** ignored **)'.
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   205
        ] ifFalse:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   206
            privacy notNil ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   207
                Transcript show:' (** '; show:privacy; show:' **)'
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   208
            ]
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   209
        ].
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   210
        Transcript cr.
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   211
    ].
868
fc7ab02e0537 only keep sourceRef in methods if the sourceFIle is a '.st' file
Claus Gittinger <cg@exept.de>
parents: 784
diff changeset
   212
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   213
    canMakeSourceRef := false.
328
claus
parents: 249
diff changeset
   214
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   215
    "/
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   216
    "/ KeepSource controls if
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   217
    "/ the sourceString should be kept or
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   218
    "/ a reference to the fileStream should be placed into the
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   219
    "/ method intead.
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   220
    "/
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   221
    ((SourceMode ~~ #keep) 
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   222
    and:[SourceMode ~~ #discard]) ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   223
        aStream isFileStream ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   224
            sourceFile := aStream pathName.
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   225
            "/
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   226
            "/ only do it, if the sourceFiles name
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   227
            "/ ends with '.st'
3028
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
   228
            "/ this prevents methods from referencing the changes file.
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   229
            "/
3028
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
   230
            (sourceFile asFilename hasSuffix:'st') ifTrue:[
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   231
                canMakeSourceRef := true.
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   232
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   233
                SourceMode == #absReference ifFalse:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   234
                    SourceMode == #sourceReference ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   235
                        sourceFile := 'st.src'.
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   236
                    ] ifFalse:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   237
                        sourceFile := aStream pathName asFilename baseName
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   238
                    ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   239
                ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   240
            ]
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   241
        ]
425
claus
parents: 384
diff changeset
   242
    ].
claus
parents: 384
diff changeset
   243
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   244
    done := false.
a27a279701f8 Initial revision
claus
parents:
diff changeset
   245
    [done] whileFalse:[
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   246
        done := aStream atEnd.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   247
        done ifFalse:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   248
            canMakeSourceRef ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   249
                pos := aStream position
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   250
            ].
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   251
            aString := aStream nextChunk.
3028
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
   252
            done := aString size == 0.
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   253
            done ifFalse:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   254
                primSpec notNil ifTrue:[
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   255
                    ignore ifFalse:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   256
                        myClass perform:primSpec with:aString.
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   257
                        "
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   258
                         ignore rest
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   259
                        "
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   260
                        ignore := true
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   261
                    ]
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   262
                ] ifFalse:[
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   263
                    passChunk ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   264
                        requestor source:aString
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   265
                    ].
328
claus
parents: 249
diff changeset
   266
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   267
                    compiler := myClass compilerClass.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   268
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   269
                    "/
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   270
                    "/ kludge - for now;
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   271
                    "/ have to make ST/X's compiler protocol be compatible to ST-80's
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   272
                    "/ for other compilers to work ... (TGEN for example)
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   273
                    "/
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   274
                    (compiler respondsTo:#compile:forClass:inCategory:notifying:install:skipIfSame:)
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   275
                    ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   276
                        "/ ST/X's compiler
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   277
                        method :=compiler
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   278
                                     compile:aString
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   279
                                     forClass:myClass
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   280
                                     inCategory:myCategory
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   281
                                     notifying:requestor
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   282
                                     install:true
2404
77c6111ce6ba added access to skipIfSame default.
Claus Gittinger <cg@exept.de>
parents: 2065
diff changeset
   283
                                     skipIfSame:SkipUnchangedMethods.
350
claus
parents: 328
diff changeset
   284
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   285
                        (method notNil and:[method ~~ #Error]) ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   286
                            canMakeSourceRef ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   287
                                (src := method getSource) = aString ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   288
                                    "/ it was not corrected ...
350
claus
parents: 328
diff changeset
   289
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   290
                                    SourceMode == #sourceReference ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   291
                                        s := sourceFile asFilename appendingWriteStream.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   292
                                        s setToEnd.     
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   293
                                        pos := s position.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   294
                                        s nextChunkPut:src.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   295
                                        s close.
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   296
                                    ].
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   297
                                    method sourceFilename:sourceFile position:pos 
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   298
                                ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   299
                            ] ifFalse:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   300
                                SourceMode == #discard ifTrue:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   301
                                    method sourceFilename:nil position:nil
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   302
                                ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   303
                            ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   304
                        ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   305
                    ] ifFalse:[
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   306
                        "/ some generated (TGEN) compiler
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   307
                        method := compiler new
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   308
                                      compile:aString 
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   309
                                      in:myClass 
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   310
                                      notifying:requestor 
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   311
                                      ifFail:nil
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   312
                    ].
328
claus
parents: 249
diff changeset
   313
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   314
                    ignore ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   315
                        method setToIgnored
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   316
                    ] ifFalse:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   317
                        privacy notNil ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   318
                            privacy == #private ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   319
                                method setToPrivate
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   320
                            ] ifFalse:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   321
                                privacy == #protected ifTrue:[
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   322
                                    method setToProtected
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   323
                                ]
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   324
                            ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   325
                        ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   326
                    ]
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   327
                ]
1644
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   328
            ].
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   329
            oneChunkOnly ifTrue:[done := true].
955
6b5487deebfa more & better sourceHandling options
Claus Gittinger <cg@exept.de>
parents: 882
diff changeset
   330
        ]
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   331
    ]
425
claus
parents: 384
diff changeset
   332
claus
parents: 384
diff changeset
   333
    "Modified: 9.9.1995 / 15:29:08 / claus"
1644
db0810ccbd61 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1565
diff changeset
   334
    "Created: 5.9.1996 / 17:45:45 / cg"
3028
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
   335
    "Modified: 14.10.1997 / 16:15:38 / cg"
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   336
! !
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   337
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   338
!ClassCategoryReader methodsFor:'private'!
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   339
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   340
class:aClass category:aCategory
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   341
    "set the instance variables"
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   342
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   343
    myClass := aClass.
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   344
    myCategory := aCategory.
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   345
    ignore := false
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   346
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   347
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   348
class:aClass primitiveSpec:which
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   349
    "set the instance variables"
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   350
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   351
    myClass := aClass.
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   352
    primSpec := which.
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   353
    ignore := false
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   354
! !
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   355
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   356
!ClassCategoryReader methodsFor:'special'!
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   357
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   358
ignoredProtocol 
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   359
    ignore := true
959
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   360
dbf9d63b4a6c correctly handling ignoredMethods
Claus Gittinger <cg@exept.de>
parents: 955
diff changeset
   361
    "Created: 10.2.1996 / 12:54:15 / cg"
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   362
!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   363
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   364
privateProtocol
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   365
    privacy := #private
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   366
!
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   367
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   368
protectedProtocol
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   369
    privacy := #protected
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   370
! !
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   371
2065
a4f9b960a122 commentary
Claus Gittinger <cg@exept.de>
parents: 1644
diff changeset
   372
!ClassCategoryReader class methodsFor:'documentation'!
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   373
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   374
version
3028
3a05e7a72d2f comment
Claus Gittinger <cg@exept.de>
parents: 2404
diff changeset
   375
    ^ '$Header: /cvs/stx/stx/libbasic/ClassCategoryReader.st,v 1.35 1997-10-15 12:30:30 cg Exp $'
699
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   376
! !
12f456343eea checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   377
ClassCategoryReader initialize!