ClassDescription.st
author ca
Fri, 12 Mar 2004 10:14:09 +0100
changeset 8161 30b8f55fdff1
parent 8116 a463cc9f1572
child 8166 013547f35faa
permissions -rw-r--r--
changes-stream is now utf-8 encoded. All ST/X users should now rename their old changes file, and start with a new changes file.
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
     1
"
a27a279701f8 Initial revision
claus
parents:
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
155
edd7fc34e104 *** empty log message ***
claus
parents: 92
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
5346
271481acda40 halt with message arg
Claus Gittinger <cg@exept.de>
parents: 5339
diff changeset
    13
"{ Package: 'stx:libbasic' }"
271481acda40 halt with message arg
Claus Gittinger <cg@exept.de>
parents: 5339
diff changeset
    14
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    15
Behavior subclass:#ClassDescription
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    16
	instanceVariableNames:'instvars'
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    17
	classVariableNames:'UpdatingChanges LockChangesFile FileOutErrorSignal
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    18
		CatchMethodRedefinitions CatchClassRedefinitions
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
    19
		UpdateChangeFileQuerySignal UpdateChangeListQuerySignal
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
    20
		TryLocalSourceFirst ChangeFileAccessLock NameSpaceQuerySignal
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
    21
		PackageQuerySignal UsedNameSpaceQuerySignal
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
    22
		CreateNameSpaceQuerySignal FileOutNameSpaceQuerySignal
6521
64a3b7f0365b new querySignal
Claus Gittinger <cg@exept.de>
parents: 6423
diff changeset
    23
		ForceNoNameSpaceQuerySignal
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
    24
		ChangeDefaultApplicationNotificationSignal
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
    25
		DefaultApplicationQuerySignal
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
    26
		ClassConventionViolationConfirmationQuerySignal MethodHistory
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
    27
		MethodHistorySize'
1091
2c5955064bbd added #isObsolete
ca
parents: 905
diff changeset
    28
	poolDictionaries:''
2c5955064bbd added #isObsolete
ca
parents: 905
diff changeset
    29
	category:'Kernel-Classes'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    30
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    31
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    32
Notification subclass:#PackageRedefinition
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    33
	instanceVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    34
	classVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    35
	poolDictionaries:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    36
	privateIn:ClassDescription
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    37
!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    38
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
    39
ClassDescription::PackageRedefinition subclass:#MethodRedefinitionNotification
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    40
	instanceVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    41
	classVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    42
	poolDictionaries:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    43
	privateIn:ClassDescription
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    44
!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    45
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
    46
ClassDescription::PackageRedefinition subclass:#ClassRedefinitionNotification
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    47
	instanceVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    48
	classVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    49
	poolDictionaries:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    50
	privateIn:ClassDescription
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    51
!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    52
1740
baa0d76a9c68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
    53
!ClassDescription class methodsFor:'documentation'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    54
88
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    55
copyright
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    56
"
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    57
 COPYRIGHT (c) 1993 by Claus Gittinger
155
edd7fc34e104 *** empty log message ***
claus
parents: 92
diff changeset
    58
	      All Rights Reserved
88
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    59
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    60
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    61
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    62
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    63
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    64
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    65
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    66
"
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    67
!
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    68
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
    69
documentation
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
    70
"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    71
    ClassDescription conceptually adds some descriptive information to the basic
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    72
    Behavior class. It is an abstract class used as a common superclass
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    73
    for Metaclass and Class.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    74
    Subclasses must define the #name, #category and #comment methods.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    75
1292
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
    76
    [Instance variables:]
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
    77
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    78
        instvars        <String>            the names of the instance variables
905
75bf79eb2314 commentary
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
    79
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    80
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    81
    [Class variables:]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    82
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    83
        UpdatingChanges <Boolean>       true if the changes-file shall be updated
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    84
                                        (except during startup and when filing in, this flag
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    85
                                         is usually true)
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
    86
                                        Please do no longer use this - see the two queries
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
    87
                                        below.
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    88
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    89
        UpdateChangeFileQuerySignal     used as an upQuery from the change management.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    90
                                        Whenever a changeRecord is to be written,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    91
                                        this signal is raised and a handler (if present)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    92
                                        is supposed to return true or false.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    93
                                        If unhandled, the value of the global
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    94
                                        UpdatingChanges is returned for backward
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    95
                                        compatibility (which means that the old
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    96
                                        mechanism is used if no query-handler
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    97
                                        is present).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    98
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
    99
        UpdateChangeListQuerySignal     used as an upQuery from the change management.
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   100
                                        Whenever a change is to be added to the changeSet,
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   101
                                        this signal is raised and a handler (if present)
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   102
                                        is supposed to return true or false.
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   103
                                        If unhandled, the value of the global
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   104
                                        UpdatingChanges is returned for backward
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   105
                                        compatibility (which means that the old
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   106
                                        mechanism is used if no query-handler
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   107
                                        is present).
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   108
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   109
        LockChangesFile <Boolean>       if true, the change file is locked for updates.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   110
                                        Required when multiple users operate on a common
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   111
                                        change file.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   112
                                        This is an experimental new feature, being evaluated.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   113
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   114
        FileOutErrorSignal              raised when an error occurs during fileOut
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   115
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   116
        CatchMethodRedefinitions        if true, classes protect themself 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   117
        MethodRedefinitionSignal        (by raising MethodRedefinitionSignal)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   118
                                        from redefining any existing methods,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   119
                                        which are defined in another package.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   120
                                        (i.e. a signal will be raised, if you
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   121
                                         fileIn something which redefines an
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   122
                                         existing method and the packages do not
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   123
                                         match).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   124
                                        The default is (currently) true.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   125
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   126
        TryLocalSourceFirst             If true, local source files are tried
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   127
                                        first BEFORE the sourceCodeManager is
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   128
                                        consulted. If false, the sourceCodeManager
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   129
                                        is asked first.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   130
                                        Should be turned on, if you run an image from
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   131
                                        local sources which have not yet been checked in.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   132
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   133
        NameSpaceQuerySignal            used as an upQuery to ask for a namespace into
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   134
                                        which new classes are to be installed.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   135
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   136
        PackageQuerySignal              used as an upQuery to ask for a packageSymbol with
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   137
                                        which new classes/methods are to be marked.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   138
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   139
        CreateNameSpaceQuerySignal      used as an upQuery to ask if unknown namespaces
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   140
                                        should be silently created (without asking the user)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   141
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   142
        MethodHistory                   if nonNil, this must be an OrderedCollection,
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   143
                                        which is filled with method->previousversionMethod
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   144
                                        associations. Can be used for undo-last-method-change
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   145
                                        The number of remembered methods is controlled via the
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   146
                                        UserPreferences.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   147
                                        Notice: this may fillup your memory over time,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   148
                                        the preferences are set too high.
1292
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
   149
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   150
        MethodHistorySize               the size of the methodHistory
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   151
                                        (nil: unlimited)
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   152
1292
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
   153
    [author:]
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   154
        Claus Gittinger
1669
4951596746f7 comments & code cleanup
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
   155
4951596746f7 comments & code cleanup
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
   156
    [see also:]
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   157
        Behavior Class Metaclass
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
   158
"
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
   159
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   160
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   161
!ClassDescription class methodsFor:'initialization'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   162
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   163
initialize
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   164
    "the classvariable 'UpdatingChanges' controls if changes are put
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   165
     into the changes-file; normally this variable is set to true, but
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   166
     (for example) during fileIn or when changes are applied, it is set to false
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   167
     to avoid putting too much junk into the changes-file."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   168
     
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   169
    UpdatingChanges := true.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   170
    LockChangesFile := false.
3603
ba736c503cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   171
    CatchMethodRedefinitions := CatchClassRedefinitions := true.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   172
    TryLocalSourceFirst := false.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   173
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   174
    FileOutErrorSignal isNil ifTrue:[
7098
da1902967f1d Convert Object>>errorSignal -> Error
Stefan Vogel <sv@exept.de>
parents: 7086
diff changeset
   175
        FileOutErrorSignal := Error newSignalMayProceed:true.
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   176
        FileOutErrorSignal nameClass:self message:#fileOutErrorSignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   177
        FileOutErrorSignal notifierString:'error during fileOut'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   178
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   179
"/        MethodRedefinitionSignal := QuerySignal new.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   180
"/        MethodRedefinitionSignal nameClass:self message:#methodRedefinitionSignal.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   181
"/        MethodRedefinitionSignal notifierString:'attempt to redefine method from different package'.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   182
"/        MethodRedefinitionSignal defaultAnswer:#keep.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   183
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   184
"/        ClassRedefinitionSignal := QuerySignal new.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   185
"/        ClassRedefinitionSignal nameClass:self message:#classRedefinitionSignal.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   186
"/        ClassRedefinitionSignal notifierString:'attempt to redefine class from different package'.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   187
"/        ClassRedefinitionSignal defaultAnswer:#keep.
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   188
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   189
        UpdateChangeFileQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   190
        UpdateChangeFileQuerySignal nameClass:self message:#updateChangeFileQuerySignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   191
        UpdateChangeFileQuerySignal notifierString:'asking if changeFile update is wanted'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   192
        UpdateChangeFileQuerySignal handlerBlock:[:ex | ex proceedWith:UpdatingChanges].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   193
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   194
        UpdateChangeListQuerySignal := QuerySignal new.
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   195
        UpdateChangeListQuerySignal nameClass:self message:#updateChangeListQuerySignal.
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   196
        UpdateChangeListQuerySignal notifierString:'asking if changeList update is wanted'.
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   197
        UpdateChangeListQuerySignal handlerBlock:[:ex | ex proceedWith:UpdatingChanges].
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   198
5832
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   199
        NameSpaceQuerySignal isNil ifTrue:[
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   200
            NameSpaceQuerySignal := QuerySignal new.
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   201
            NameSpaceQuerySignal nameClass:self message:#nameSpaceQuerySignal.
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   202
            NameSpaceQuerySignal notifierString:'asking for nameSpace'.
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   203
            NameSpaceQuerySignal handlerBlock:[:ex | ex proceedWith:Smalltalk defaultNameSpace].
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   204
        ].
5833
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   205
        UsedNameSpaceQuerySignal isNil ifTrue:[
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   206
            UsedNameSpaceQuerySignal := QuerySignal new.
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   207
            UsedNameSpaceQuerySignal nameClass:self message:#usedNameSpaceQuerySignal.
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   208
            UsedNameSpaceQuerySignal notifierString:'asking for used nameSpaced'.
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   209
        ].
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   210
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   211
        CreateNameSpaceQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   212
        CreateNameSpaceQuerySignal nameClass:self message:#createNameSpaceQuerySignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   213
        CreateNameSpaceQuerySignal notifierString:'asking for nameSpace creation'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   214
        CreateNameSpaceQuerySignal defaultAnswer:false.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   215
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   216
        ClassConventionViolationConfirmationQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   217
        ClassConventionViolationConfirmationQuerySignal nameClass:self message:#classConventionViolationConfirmationQuerySignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   218
        ClassConventionViolationConfirmationQuerySignal notifierString:'asking for class convention'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   219
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   220
        PackageQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   221
        PackageQuerySignal nameClass:self message:#packageQuerySignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   222
        PackageQuerySignal notifierString:'asking for package'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   223
        PackageQuerySignal handlerBlock:[:ex | ex proceedWith:(Project isNil 
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   224
                                                                    ifTrue:[
4112
5ee841c34b10 return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents: 4110
diff changeset
   225
                                                                        nil
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   226
                                                                    ] ifFalse:[
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   227
                                                                        Project currentPackageName
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   228
                                                                    ])].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   229
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   230
        FileOutNameSpaceQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   231
        FileOutNameSpaceQuerySignal defaultAnswer:false.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   232
6521
64a3b7f0365b new querySignal
Claus Gittinger <cg@exept.de>
parents: 6423
diff changeset
   233
        ForceNoNameSpaceQuerySignal := QuerySignal new.
64a3b7f0365b new querySignal
Claus Gittinger <cg@exept.de>
parents: 6423
diff changeset
   234
        ForceNoNameSpaceQuerySignal defaultAnswer:false.
64a3b7f0365b new querySignal
Claus Gittinger <cg@exept.de>
parents: 6423
diff changeset
   235
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   236
        ChangeFileAccessLock := Semaphore forMutualExclusion name:'ChangeFileAccessLock'.
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   237
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   238
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   239
    DefaultApplicationQuerySignal isNil ifTrue:[
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   240
        DefaultApplicationQuerySignal := QuerySignal new defaultAnswer:nil.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   241
        DefaultApplicationQuerySignal nameClass:self message:#defaultApplicationQuerySignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   242
        DefaultApplicationQuerySignal notifierString:'query for default application'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   243
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   244
        ChangeDefaultApplicationNotificationSignal := QuerySignal new defaultAnswer:nil.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   245
        ChangeDefaultApplicationNotificationSignal nameClass:self message:#changeDefaultApplicationNotificationSignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   246
        ChangeDefaultApplicationNotificationSignal notifierString:'change default application'.
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   247
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   248
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   249
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   250
     ClassDescription initialize
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   251
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   252
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   253
    "Created: / 2.4.1997 / 17:27:40 / stefan"
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   254
    "Modified: / 3.2.1999 / 11:23:08 / cg"
4049
9ae11122b8a2 FileoutErrorSignal is proceedable.
Stefan Vogel <sv@exept.de>
parents: 3977
diff changeset
   255
    "Modified: / 17.3.1999 / 16:52:41 / stefan"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   256
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   257
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   258
!ClassDescription class methodsFor:'Signal constants'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   259
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   260
changeDefaultApplicationNotificationSignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   261
    "return the signal used as an up-Info to change the current application to which
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   262
     new classes/methods will be added.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   263
     Will is only used when filing in V'Age code"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   264
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   265
    ^ ChangeDefaultApplicationNotificationSignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   266
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   267
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   268
     Transcript showCR:Class changeDefaultApplicationNotificationSignal raise
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   269
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   270
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   271
    "Modified: / 5.11.1996 / 20:08:38 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   272
    "Created: / 15.6.1998 / 18:29:57 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   273
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   274
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   275
classConventionViolationConfirmationQuerySignal
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   276
    "return the query signal raised when a class is about to be installed
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   277
     (or changed) which violates conventions (such as upper case instVars).
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   278
     This is raised in subclass creation and can be handled to suppress
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   279
     dialog boxes popping up during fileIn"
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   280
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   281
    ^ ClassConventionViolationConfirmationQuerySignal
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   282
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   283
    "Created: / 3.2.1999 / 11:22:07 / cg"
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   284
!
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   285
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   286
classRedefinitionSignal
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   287
    "return the signal raised when a class is about to be redefined
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   288
     differently from an existing class and the packages are not
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   289
     equal. This helps when filing in alien code, to prevent existing
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   290
     classes from being redefined by incompatible classes
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   291
     (classVars, classInstVars or inheritance)."
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   292
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   293
    ^ ClassDescription::ClassRedefinitionNotification
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   294
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   295
    "Created: / 17.6.1998 / 10:13:44 / cg"
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   296
!
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   297
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   298
createNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   299
    "return the signal used as an upQuery if a new nameSpace should be
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   300
     silently created without user confirmation.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   301
     Only used when installing autoloaded classes"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   302
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   303
    ^ CreateNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   304
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   305
    "Created: 2.4.1997 / 17:27:54 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   306
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   307
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   308
defaultApplicationQuerySignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   309
    "return the signal used as an upQuery for the current application to which
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   310
     new classes/methods are to be added.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   311
     Will is only used when filing in V'Age code"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   312
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   313
    ^ DefaultApplicationQuerySignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   314
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   315
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   316
     Transcript showCR:Class defaultApplicationQuerySignal raise
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   317
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   318
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   319
    "Modified: / 5.11.1996 / 20:08:38 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   320
    "Created: / 15.6.1998 / 18:28:54 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   321
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   322
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   323
fileOutErrorSignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   324
    "return the signal raised when an error occurs while fileing out.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   325
     This is signalled to allow browsers some user feed back in case
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   326
     a fileout fails (for example due to disk-full errors)"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   327
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   328
    ^ FileOutErrorSignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   329
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   330
    "Created: 2.4.1997 / 17:28:03 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   331
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   332
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   333
fileOutNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   334
    "return the signal used as an upQuery wether the current
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   335
     namespace should be prepended on fileOut."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   336
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   337
    ^ FileOutNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   338
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   339
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   340
     Transcript showCR:Class fileOutNameSpaceQuerySignal raise
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   341
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   342
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   343
    "Modified: 5.11.1996 / 20:08:38 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   344
    "Created: 2.4.1997 / 17:28:41 / stefan"
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   345
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   346
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   347
methodRedefinitionSignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   348
    "return the signal raised when a method is about to be installed
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   349
     which redefines an existing method and the methods packages are not
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   350
     equal. This helps when filing in alien code, to prevent existing
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   351
     methods to be overwritten or redefined by incompatible methods"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   352
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   353
    ^ ClassDescription::MethodRedefinitionNotification
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   354
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   355
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   356
nameSpaceQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   357
    "return the signal used as an upQuery for the current nameSpace.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   358
     Will be used when filing in code"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   359
5832
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   360
    NameSpaceQuerySignal isNil ifTrue:[
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   361
        NameSpaceQuerySignal := QuerySignal new.
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   362
        NameSpaceQuerySignal nameClass:self message:#nameSpaceQuerySignal.
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   363
        NameSpaceQuerySignal notifierString:'asking for nameSpace'.
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   364
        NameSpaceQuerySignal handlerBlock:[:ex | ex proceedWith:Smalltalk defaultNameSpace].
c41bce6f3eb1 nameSpaceQuerySignal may be asked for BEFORE class is
Claus Gittinger <cg@exept.de>
parents: 5797
diff changeset
   365
    ].
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   366
    ^ NameSpaceQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   367
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   368
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   369
     Transcript showCR:Class nameSpaceQuerySignal raise
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   370
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   371
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   372
    "Modified: 5.11.1996 / 20:08:38 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   373
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   374
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   375
packageQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   376
    "return the signal used as an upQuery for the current packages name.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   377
     Will be used when filing in code"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   378
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   379
    ^ PackageQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   380
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   381
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   382
     Transcript showCR:Class packageQuerySignal raise
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   383
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   384
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   385
    "Created: 5.11.1996 / 20:07:22 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   386
    "Modified: 5.11.1996 / 20:08:35 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   387
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   388
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   389
updateChangeFileQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   390
    "return the signal used as an upQuery if the changeFile should be updated.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   391
     If unhandled, the value of UpdatingChanges is returned by the signals
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   392
     static handler."
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   393
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   394
    ^ UpdateChangeFileQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   395
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   396
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   397
     Transcript showCR:Class updateChangeFileQuerySignal raise
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   398
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   399
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   400
    "Modified: 5.11.1996 / 20:08:44 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   401
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   402
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   403
updateChangeListQuerySignal
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   404
    "return the signal used as an upQuery if the changeList should be updated.
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   405
     If unhandled, the value of UpdatingChanges is returned by the signals
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   406
     static handler."
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   407
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   408
    ^ UpdateChangeListQuerySignal
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   409
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   410
    "
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   411
     Transcript showCR:Class updateChangeListQuerySignal raise
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   412
    "
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   413
!
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
   414
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   415
usedNameSpaceQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   416
    "return the signal used as an upQuery for the used nameSpace.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   417
     Will be used when filing in code"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   418
5833
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   419
    UsedNameSpaceQuerySignal isNil ifTrue:[
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   420
        UsedNameSpaceQuerySignal := QuerySignal new.
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   421
        UsedNameSpaceQuerySignal nameClass:self message:#usedNameSpaceQuerySignal.
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   422
        UsedNameSpaceQuerySignal notifierString:'asking for used nameSpaced'.
d0d16acec4b7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5832
diff changeset
   423
    ].
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   424
    ^ UsedNameSpaceQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   425
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   426
    "Created: 19.12.1996 / 23:57:27 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   427
! !
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   428
7309
01113fb0770c category
Claus Gittinger <cg@exept.de>
parents: 7277
diff changeset
   429
!ClassDescription class methodsFor:'accessing-flags'!
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   430
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   431
catchClassRedefinitions
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   432
    "return the class-redefinition catching flag."
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   433
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   434
    ^ CatchClassRedefinitions
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   435
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   436
    "Created: / 17.6.1998 / 10:30:01 / cg"
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   437
!
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   438
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   439
catchClassRedefinitions:aBoolean
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   440
    "turn on/off class redefinition catching. 
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   441
     If on, redefining classes from another package will show a
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   442
     warning dialog. Useful, when filing in alien code to avoid defefinition
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   443
     of system methods.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   444
     Return the prior value of the flag."
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   445
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   446
    |prev|
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   447
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   448
    prev := CatchClassRedefinitions.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   449
    CatchClassRedefinitions := aBoolean.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   450
    ^ prev
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   451
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   452
    "Created: / 17.6.1998 / 10:31:19 / cg"
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   453
!
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   454
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   455
catchMethodRedefinitions
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   456
    "return the method-redefinition catching flag."
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   457
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   458
    ^ CatchMethodRedefinitions
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   459
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   460
    "Modified: / 17.6.1998 / 10:30:10 / cg"
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   461
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   462
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   463
catchMethodRedefinitions:aBoolean
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   464
    "turn on/off method redefinition catching. 
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   465
     If on, redefining methods from another package will show a
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   466
     warning dialog. Useful, when filing in alien code to avoid defefinition
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   467
     of system methods.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   468
     Return the prior value of the flag."
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   469
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   470
    |prev|
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   471
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   472
    prev := CatchMethodRedefinitions.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   473
    CatchMethodRedefinitions := aBoolean.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   474
    ^ prev
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   475
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   476
    "Modified: / 17.6.1998 / 10:31:02 / cg"
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   477
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   478
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   479
keepMethodHistory:aBoolean
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   480
    "turn on/off oldMethod remembering. If on, a methods previous version
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   481
     is kept locally, for later undo (or compare)."
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   482
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   483
    aBoolean ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   484
        MethodHistory isNil ifTrue:[
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   485
            MethodHistory := OrderedCollection new.
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   486
        ]
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   487
    ] ifFalse:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   488
        MethodHistory := nil
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   489
    ].
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   490
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   491
    "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   492
     Class keepMethodHistory:true
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   493
     Class keepMethodHistory:false
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   494
    "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   495
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   496
    "Modified: 7.11.1996 / 18:36:00 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   497
    "Created: 7.11.1996 / 19:05:57 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   498
!
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   499
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   500
lockChangesFile
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   501
    "return true, if the change file is locked during update"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   502
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   503
    ^ LockChangesFile
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   504
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   505
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   506
lockChangesFile:aBoolean
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   507
    "turn on/off change-file-locking. Return the previous value of the flag."
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   508
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   509
    |prev|
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   510
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   511
    prev := LockChangesFile.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   512
    LockChangesFile := aBoolean.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   513
    ^ prev
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   514
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   515
7309
01113fb0770c category
Claus Gittinger <cg@exept.de>
parents: 7277
diff changeset
   516
!ClassDescription class methodsFor:'accessing-history'!
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   517
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   518
flushMethodHistory
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   519
    "flush any method->previousVersion associations,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   520
     all method history is lost."
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   521
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   522
    MethodHistory notNil ifTrue:[
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   523
        MethodHistory := OrderedCollection new
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   524
    ].
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   525
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   526
    "Created: 7.11.1996 / 19:07:25 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   527
!
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   528
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   529
methodHistory
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   530
    "return a dictionary containing method->previousVersion associations,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   531
     nil if method remembering has been turned off"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   532
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   533
    ^ MethodHistory 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   534
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   535
    "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   536
     Class methodHistory
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   537
    "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   538
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   539
    "Modified: 7.11.1996 / 18:36:00 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   540
    "Created: 7.11.1996 / 19:06:28 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   541
! !
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   542
6099
d501d6a49a48 category included a space
Claus Gittinger <cg@exept.de>
parents: 6097
diff changeset
   543
!ClassDescription class methodsFor:'enumeration'!
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   544
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   545
allClassesInCategory:aCategory do:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   546
    "evaluate aBlock for all classes in aCategory;
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   547
     no specific order is defined."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   548
6216
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   549
    self obsoleteMethodWarning:'moved to Smalltalk'.
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   550
    Smalltalk allClassesInCategory:aCategory do:aBlock
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   551
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   552
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   553
     Class allClassesInCategory:'Kernel-Classes' 
5581
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   554
                             do:[:class |Transcript showCR:class name]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   555
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   556
6216
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   557
    "Created: / 1.4.1997 / 23:45:09 / stefan"
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   558
    "Modified: / 17.11.2001 / 12:28:50 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   559
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   560
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   561
allClassesInCategory:aCategory inOrderDo:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   562
    "evaluate aBlock for all classes in aCategory;
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   563
     superclasses come first - then subclasses."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   564
6216
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   565
    self obsoleteMethodWarning:'moved to Smalltalk'.
6114
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   566
    Smalltalk allClassesInCategory:aCategory inOrderDo:aBlock
6216
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   567
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   568
    "Created: / 1.4.1997 / 23:45:15 / stefan"
fbc90be5ce40 obsolete methods marked as such
Claus Gittinger <cg@exept.de>
parents: 6114
diff changeset
   569
    "Modified: / 17.11.2001 / 12:28:40 / cg"
356
claus
parents: 328
diff changeset
   570
! !
claus
parents: 328
diff changeset
   571
1740
baa0d76a9c68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
   572
!ClassDescription class methodsFor:'queries'!
1179
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   573
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   574
isBuiltInClass
1266
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   575
    "return true if this class is known by the run-time-system.
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   576
     Here, true is returned for myself, false for subclasses."
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   577
1179
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   578
    ^ self == ClassDescription class or:[self == ClassDescription]
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   579
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   580
    "Created: 15.4.1996 / 17:16:59 / cg"
1266
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   581
    "Modified: 23.4.1996 / 15:56:54 / cg"
1179
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   582
! !
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   583
7261
f35fc9cee675 method category rename
Claus Gittinger <cg@exept.de>
parents: 7258
diff changeset
   584
!ClassDescription methodsFor:'Compatibility-Dolphin'!
5515
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   585
6239
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   586
categoriesFor:aMethodSelector
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   587
    "this method allows fileIn of Dolphin methods -
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   588
     return a MethodCategoriesReader to read in a methods categories for me.
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   589
     Since Dolphin uses a different way to assign method categories,
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   590
     loaded methods are temporarily categorized as 'Dolphin methods'
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   591
     and later reassigned, when a categoriesFor: message arrives."
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   592
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   593
    ^ Dolphin::MethodCategoriesReader class:self selector:aMethodSelector
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   594
!
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   595
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   596
categoriesForClass
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   597
    "this method allows fileIn of Dolphin classes -
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   598
     return a ClassCategoriesReader to read in a classes categories for me.
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   599
     Since Dolphin uses a different way to assign class categories,
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   600
     the loaded classes are temporarily categorized as 'ST/V classes'
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   601
     and later reassigned, when a categoriesForClass message arrives."
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   602
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   603
    ^ Dolphin::ClassCategoriesReader class:self
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   604
!
cbb8d880fb25 support for dolphin fileIn
Claus Gittinger <cg@exept.de>
parents: 6229
diff changeset
   605
6817
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   606
guid:aUuid
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   607
    "/ ignored
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   608
!
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   609
5515
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   610
methodsFor
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   611
    "this method allows fileIn of Dolphin methods -
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   612
     return a ClassCategoryReader to read in and compile methods for me.
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   613
     Since Dolphin uses a different way to assign method categories,
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   614
     the loaded methods are temporarily categorized as 'Dolphin methods'
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   615
     and later reassigned, when a categoriesFor: message arrives."
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   616
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   617
    ^ ClassCategoryReader class:self category:'Dolphin methods'
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   618
6817
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   619
!
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   620
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   621
sourceManager
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   622
    "Answer the receiver's source manager."
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   623
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
   624
    ^ Dolphin::SourceManager default
5515
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   625
! !
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   626
7261
f35fc9cee675 method category rename
Claus Gittinger <cg@exept.de>
parents: 7258
diff changeset
   627
!ClassDescription methodsFor:'Compatibility-ST80'!
3047
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   628
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   629
addInstVarName:anotherInstVar
5689
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   630
    |sel newClass args newNames|
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   631
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   632
    newNames := self instanceVariableString , ' ' , anotherInstVar.
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   633
5688
cb6f36cb44f0 addInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5664
diff changeset
   634
    self isMeta ifTrue:[
5689
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   635
        ^ self instanceVariableNames:newNames.
5688
cb6f36cb44f0 addInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5664
diff changeset
   636
    ].
cb6f36cb44f0 addInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5664
diff changeset
   637
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   638
    sel := self definitionSelector.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   639
    Class nameSpaceQuerySignal answer:(self nameSpace)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   640
    do:[
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   641
        args := Array 
5711
d49686d3a048 addInstVarName/removeInstVarName fixed for private classes
Claus Gittinger <cg@exept.de>
parents: 5689
diff changeset
   642
                    with:(self nameWithoutPrefix asSymbol)
5689
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   643
                    with:newNames
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   644
                    with:(self classVariableString)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   645
                    with:''
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   646
                    with:(self category).
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   647
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   648
        sel numArgs == 6 ifTrue:[
5711
d49686d3a048 addInstVarName/removeInstVarName fixed for private classes
Claus Gittinger <cg@exept.de>
parents: 5689
diff changeset
   649
            args := args copyWith:(self owningClass).
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   650
        ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   651
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   652
        newClass := self superclass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   653
            perform:sel withArguments:args.
5797
f15edabfaf8c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
   654
        newClass isNil ifTrue:[
f15edabfaf8c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
   655
            self error:'oops - cannot compile newClass'.
f15edabfaf8c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
   656
        ] ifFalse:[
f15edabfaf8c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
   657
            newClass recompile.
f15edabfaf8c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5756
diff changeset
   658
        ]
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   659
    ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   660
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   661
    ^ newClass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   662
!
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   663
3047
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   664
organization
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   665
    "for ST80 compatibility; 
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   666
     read the documentation in ClassOrganizer for more info."
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   667
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   668
    ^ ClassOrganizer for:self
3344
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   669
!
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   670
6114
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   671
preSave: aParcel
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   672
        "Allow additional process of a Parcel before writing. This method works
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   673
        with the matching method postLoad:, to handle additional processing
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   674
        after loading a Parcel. The typical operation to do here is to save
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   675
        named objects to aParcel (and retrieve them in postLoad:)."
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   676
!
7b55e4c348d7 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6099
diff changeset
   677
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   678
removeInstVarName:anInstVar
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   679
    |sel newClass args newNames|
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   680
5711
d49686d3a048 addInstVarName/removeInstVarName fixed for private classes
Claus Gittinger <cg@exept.de>
parents: 5689
diff changeset
   681
    newNames := self instVarNames asOrderedCollection.
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   682
    newNames remove:anInstVar ifAbsent:[^ self].
5689
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   683
    newNames := newNames asStringWith:Character space.
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   684
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   685
    self isMeta ifTrue:[
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   686
        ^ self instanceVariableNames:newNames.
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   687
    ].
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   688
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   689
    sel := self definitionSelector.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   690
    Class nameSpaceQuerySignal answer:(self nameSpace)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   691
    do:[
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   692
        args := Array 
5711
d49686d3a048 addInstVarName/removeInstVarName fixed for private classes
Claus Gittinger <cg@exept.de>
parents: 5689
diff changeset
   693
                    with:(self nameWithoutPrefix asSymbol)
5689
320f0733e0f0 removeInstVarName for meta classes
Claus Gittinger <cg@exept.de>
parents: 5688
diff changeset
   694
                    with:newNames
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   695
                    with:(self classVariableString)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   696
                    with:''
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   697
                    with:(self category).
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   698
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   699
        sel numArgs == 6 ifTrue:[
5711
d49686d3a048 addInstVarName/removeInstVarName fixed for private classes
Claus Gittinger <cg@exept.de>
parents: 5689
diff changeset
   700
            args := args copyWith:(self owningClass).
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   701
        ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   702
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   703
        newClass := self superclass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   704
            perform:sel withArguments:args.
5664
fd376b4c0512 recompile after add/removeInstVar
Claus Gittinger <cg@exept.de>
parents: 5636
diff changeset
   705
        newClass recompile.
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   706
    ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   707
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   708
    ^ newClass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   709
!
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   710
5636
eab6a71fb3d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5631
diff changeset
   711
reorganize
eab6a71fb3d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5631
diff changeset
   712
    "for ST80 compatibility; 
eab6a71fb3d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5631
diff changeset
   713
     nothing done here."
eab6a71fb3d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5631
diff changeset
   714
!
eab6a71fb3d0 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5631
diff changeset
   715
3344
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   716
reorganizeFromString:orgString
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   717
    "for ST80 compatibility but without functionality"
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   718
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   719
    "Created: / 28.3.1998 / 21:21:52 / cg"
3047
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   720
! !
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   721
7261
f35fc9cee675 method category rename
Claus Gittinger <cg@exept.de>
parents: 7258
diff changeset
   722
!ClassDescription methodsFor:'Compatibility-V''Age'!
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   723
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   724
categoriesFor:aSelector are:listOfCategories
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   725
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   726
     Set the category of the method which is installed under aSelector.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   727
     Since ST/X only supports a single category, take the first one
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   728
     found in the listOfCategories."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   729
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   730
    |mthd|
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   731
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   732
    (mthd := self compiledMethodAt:aSelector) notNil ifTrue:[
5722
f49b0a847967 methods send category-change notifications themself
Claus Gittinger <cg@exept.de>
parents: 5711
diff changeset
   733
        mthd category:listOfCategories first.
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   734
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   735
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   736
    "Created: / 15.6.1998 / 17:11:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   737
    "Modified: / 15.6.1998 / 20:32:28 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   738
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   739
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   740
commentFor:aSelector is:aString
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   741
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   742
     Set the comment of the method which is installed under aSelector.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   743
     For now, this is ignored"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   744
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   745
    |mthd|
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   746
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   747
    (mthd := self compiledMethodAt:aSelector) notNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   748
	"/ mthd comment:aString
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   749
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   750
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   751
    "Created: / 15.6.1998 / 17:11:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   752
    "Modified: / 15.6.1998 / 20:34:39 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   753
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   754
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   755
description:aString in:anApplication
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   756
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   757
     Set the description of the class."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   758
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   759
    "/ since ST/X has no description, we could add it as a class-documentation
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   760
    "/ method under the selector #description.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   761
    "/ for now, this is ignored.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   762
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   763
    ^ self.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   764
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   765
    "Modified: / 15.6.1998 / 17:14:53 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   766
    "Created: / 15.6.1998 / 20:34:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   767
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   768
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   769
descriptionFor:aSelector is:aString
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   770
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   771
     Set the description of the method which is installed under aSelector."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   772
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   773
    "/ since ST/X has no description, we could add it as a class-documentation
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   774
    "/ method under the selector #description.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   775
    "/ for now, this is ignored.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   776
5943
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   777
"/    |newString code|
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   778
"/
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   779
"/
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   780
"/    newString := aString copy replaceAll:$" with:$'.
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   781
"/    code := 'description
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   782
"/"
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   783
"/ ' , aString , '
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   784
"/"'.
486397537382 avoid statements after return
Claus Gittinger <cg@exept.de>
parents: 5833
diff changeset
   785
"/    self compile:code forClass:self class inCategory:#documentation
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   786
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   787
    ^ self.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   788
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   789
    "Modified: / 15.6.1998 / 17:14:53 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   790
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   791
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   792
initializeAfterLoad
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   793
    "this message is sent after fileIn of a V'Age class"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   794
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   795
    self initialize
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   796
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   797
    "Modified: / 15.6.1998 / 20:35:58 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   798
    "Created: / 15.6.1998 / 20:36:49 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   799
! !
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   800
7261
f35fc9cee675 method category rename
Claus Gittinger <cg@exept.de>
parents: 7258
diff changeset
   801
!ClassDescription methodsFor:'Compatibility-VW5.4'!
6621
c919ffc9b646 defneStatic (starting VW compatibility)
Claus Gittinger <cg@exept.de>
parents: 6620
diff changeset
   802
7606
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   803
compile: aString classified: protocol attributes: attributes
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   804
    "compile some method-code"
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   805
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   806
    |mthd|
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   807
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   808
    mthd := self compile: aString classified: protocol.
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   809
    attributes notEmpty ifTrue:[
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   810
        attributes keysAndValuesDo:[:aK :aV |
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   811
            aK = 'package' ifTrue:[
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   812
                "/ mthd package:aV
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   813
            ] ifFalse:[
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   814
                self error:(aK , '-attribute not yet supported') mayProceed:true.
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   815
            ].
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   816
        ].
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   817
    ].
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   818
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   819
    ^ mthd.
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   820
!
5479f4699324 moved some stuff to Behavior
Claus Gittinger <cg@exept.de>
parents: 7330
diff changeset
   821
6621
c919ffc9b646 defneStatic (starting VW compatibility)
Claus Gittinger <cg@exept.de>
parents: 6620
diff changeset
   822
defineStatic:name private:private constant:constant category:category initializer:initializer attributes:annotations
c919ffc9b646 defneStatic (starting VW compatibility)
Claus Gittinger <cg@exept.de>
parents: 6620
diff changeset
   823
    self addClassVarName:name.
c919ffc9b646 defneStatic (starting VW compatibility)
Claus Gittinger <cg@exept.de>
parents: 6620
diff changeset
   824
    initializer notNil ifTrue:[
7209
790bd75579c0 #errorSignal -> #description
Stefan Vogel <sv@exept.de>
parents: 7163
diff changeset
   825
        self shouldImplement
6621
c919ffc9b646 defneStatic (starting VW compatibility)
Claus Gittinger <cg@exept.de>
parents: 6620
diff changeset
   826
    ].
c919ffc9b646 defneStatic (starting VW compatibility)
Claus Gittinger <cg@exept.de>
parents: 6620
diff changeset
   827
! !
c919ffc9b646 defneStatic (starting VW compatibility)
Claus Gittinger <cg@exept.de>
parents: 6620
diff changeset
   828
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   829
!ClassDescription methodsFor:'accessing'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   830
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   831
definition
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   832
    "return an expression-string to define myself"
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   833
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   834
    |s|
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   835
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   836
    s := WriteStream on:(String new).
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   837
    self fileOutDefinitionOn:s.
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   838
    ^ s contents
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   839
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   840
    "
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   841
     Object definition 
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   842
     Point definition  
3687
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   843
     Array definition  
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   844
     ByteArray definition  
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   845
     FloatArray definition  
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   846
    "
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   847
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   848
    "Created: / 19.6.1998 / 02:25:49 / cg"
3687
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   849
    "Modified: / 29.7.1998 / 12:13:44 / cg"
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   850
!
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   851
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   852
instVarAtOffset:index
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   853
    "return the name of the instance variable at index"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   854
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   855
    ^ self allInstanceVariableNames at:index
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   856
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   857
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   858
instVarNames
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   859
    "return a collection of the instance variable name-strings"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   860
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   861
    instvars isNil ifTrue:[
7277
72af0eb60c67 Store inst vars as symbols
Stefan Vogel <sv@exept.de>
parents: 7262
diff changeset
   862
        ^ #() 
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   863
    ].
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   864
    instvars isString ifTrue:[
7277
72af0eb60c67 Store inst vars as symbols
Stefan Vogel <sv@exept.de>
parents: 7262
diff changeset
   865
        instvars := instvars asCollectionOfWords asArray collect:[:varName| varName asSymbol].
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   866
    ].
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   867
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   868
    ^ instvars
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   869
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   870
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   871
     Point instVarNames  
6660
40795644eb57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6659
diff changeset
   872
     SortedCollection instVarNames  
40795644eb57 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6659
diff changeset
   873
     SortedCollection allInstVarNames  
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   874
    "
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   875
2889
66d5faa411fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
   876
    "Modified: 22.8.1997 / 17:43:05 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   877
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   878
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   879
instVarOffsetOf:aVariableName
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   880
    "return the index (as used in instVarAt:/instVarAt:put:) of a named instance
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   881
     variable. The returned number is 1..instSize for valid variable names, nil for
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   882
     illegal names."
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   883
2891
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   884
    |i cls vars|
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   885
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   886
    cls := self.
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   887
    [cls notNil] whileTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   888
	vars := cls instVarNames.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   889
	i := vars indexOf:aVariableName.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   890
	i ~~ 0 ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   891
	    ^ (cls superclass instSize) + i
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   892
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   893
	cls := cls superclass
2891
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   894
    ].
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   895
    ^ nil
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   896
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   897
    "
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   898
     Point instVarOffsetOf:'x' 
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   899
     View instVarOffsetOf:'paint'
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   900
     Button instVarOffsetOf:'logo' 
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   901
    "
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   902
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   903
    "Modified: 23.8.1997 / 16:59:15 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   904
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   905
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   906
instanceVariableOffsets
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   907
    "returns a dictionary containing the instance variable index
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   908
     for each instVar name"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   909
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   910
    |dict index|
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   911
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   912
    index := 0. dict := Dictionary new.
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   913
    self allInstVarNames do:[:nm | index := index + 1. dict at:nm put:index].
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   914
    ^ dict
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   915
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   916
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   917
     Point instanceVariableOffsets 
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   918
     GraphicsContext instanceVariableOffsets 
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   919
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   920
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   921
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   922
instanceVariableString
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   923
    "return a string of the instance variable names"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   924
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   925
    instvars isNil ifTrue:[^ ''].
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   926
    instvars isString ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   927
	^ instvars
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   928
    ].
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   929
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   930
    ^ instvars asStringWith:(Character space)
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   931
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   932
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   933
     Point instanceVariableString   
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   934
    "
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   935
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   936
    "Modified: 22.8.1997 / 14:59:14 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   937
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   938
7658
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
   939
nameSpace
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
   940
    "raise an error: must be redefined in concrete subclass(es)"
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
   941
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
   942
    ^ self subclassResponsibility
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
   943
!
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
   944
2671
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   945
renameCategory:oldCategory to:newCategory
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   946
    "{ Pragma: +optSpace }"
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   947
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   948
    "rename a category (changes category of those methods).
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   949
     Appends a change record and notifies dependents."
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   950
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   951
    |any|
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   952
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   953
    any := false.
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   954
    self methodDictionary do:[:aMethod |
5722
f49b0a847967 methods send category-change notifications themself
Claus Gittinger <cg@exept.de>
parents: 5711
diff changeset
   955
        aMethod category = oldCategory ifTrue:[
f49b0a847967 methods send category-change notifications themself
Claus Gittinger <cg@exept.de>
parents: 5711
diff changeset
   956
            aMethod category:newCategory.
f49b0a847967 methods send category-change notifications themself
Claus Gittinger <cg@exept.de>
parents: 5711
diff changeset
   957
            any := true.
f49b0a847967 methods send category-change notifications themself
Claus Gittinger <cg@exept.de>
parents: 5711
diff changeset
   958
        ]
2671
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   959
    ].
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   960
    any ifTrue:[
5722
f49b0a847967 methods send category-change notifications themself
Claus Gittinger <cg@exept.de>
parents: 5711
diff changeset
   961
        self addChangeRecordForRenameCategory:oldCategory to:newCategory.
2671
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   962
    ]
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   963
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   964
    "Modified: 12.6.1996 / 11:49:08 / stefan"
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   965
    "Created: 3.6.1997 / 11:55:05 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   966
! !
10
claus
parents: 3
diff changeset
   967
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
   968
!ClassDescription methodsFor:'adding & removing'!
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   969
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   970
addSelector:newSelector withMethod:newMethod
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   971
    "add the method given by 2nd argument under the selector given by
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   972
     1st argument to the methodDictionary. 
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   973
     Append a change record to the changes file and tell dependents."
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   974
3067
901055cb6c3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
   975
    |oldMethod oldPackage newPackage|
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   976
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   977
    oldMethod := self compiledMethodAt:newSelector.
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   978
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   979
    CatchMethodRedefinitions ifTrue:[
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   980
        "check for attempts to redefine a method
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   981
         in a different package. Signal a resumable error if so.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   982
         This allows tracing redefinitions of existing system methods
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   983
         when filing in alien code ....
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   984
         (which we may want to forbit sometimes)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   985
        "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   986
        oldMethod notNil ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   987
            oldPackage := oldMethod package.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   988
            newPackage := newMethod package.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   989
            oldPackage ~= newPackage ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   990
                "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   991
                 attempt to redefine an existing method, which was
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   992
                 defined in another package (see oldPackage vs. newPackage).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   993
                 If you continue in the debugger, the new method gets installed.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   994
                 Otherwise, the existing (old) method remains valid.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   995
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   996
                 This check was added to help prevent accidental modifications
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   997
                 of system code - especially, when alien code is filedIn. 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   998
                 After you became familiar with the system, may want to disable this
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   999
                 check if it becomes too annoying (and only turn it on
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1000
                 temporarily, when filing in unknown code-files).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1001
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1002
                 You can turn off the catching of redefinitions by setting
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1003
                 my classVariable
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1004
                          CatchMethodRedefinitions 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1005
                 to false.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1006
                 (also found in the Launchers 'settings-compilation' menu)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1007
                "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1008
                (Class methodRedefinitionSignal
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1009
                    raiseRequestWith:(oldMethod -> newMethod)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1010
                    errorString:('redefinition of method: ' , self name , '>>' , newSelector) 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1011
                ) == #keep ifTrue:[
5725
00c2d5e78792 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 5722
diff changeset
  1012
                    newMethod setPackage:oldMethod package
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1013
                ].
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1014
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1015
                "/ if proceeded, install as usual.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1016
            ]
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1017
        ]
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1018
    ].
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1019
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1020
    "/ remember new->old association in the MethodHistory dictionary (if non-nil)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1021
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1022
    MethodHistory notNil ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1023
        oldMethod notNil ifTrue:[
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1024
            MethodHistory add:(Array with:#methodChange with:oldMethod with:newMethod).
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1025
            (MethodHistorySize notNil and:[MethodHistory size > MethodHistorySize]) ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1026
                MethodHistory removeFirst.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1027
            ]
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1028
        ]
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1029
    ].
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1030
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1031
    "/ remember in the projects overwritten dictionary
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1032
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1033
    oldMethod notNil ifTrue:[
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1034
        oldMethod package ~= newMethod package ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1035
            Project notNil ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1036
                "/ allow configurations without Project
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1037
                Project rememberOverwrittenMethod:newMethod from:oldMethod
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1038
            ]
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
  1039
        ]
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1040
    ].
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1041
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1042
    (super addSelector:newSelector withMethod:newMethod) ifTrue:[
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1043
        self addChangeRecordForMethod:newMethod fromOld:oldMethod.
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1044
    ]
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1045
3065
bbf5a0fc865b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3050
diff changeset
  1046
    "Modified: / 9.9.1996 / 22:39:32 / stefan"
bbf5a0fc865b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3050
diff changeset
  1047
    "Created: / 4.6.1997 / 14:47:10 / cg"
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
  1048
    "Modified: / 17.6.1998 / 10:41:34 / cg"
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1049
!
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
  1050
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1051
basicAddSelector:newSelector withMethod:newMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1052
    "add the method given by 2nd argument under the selector given by
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1053
     1st argument to the methodDictionary. 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1054
     This does NOT append a change record to the changes file and tell 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1055
     dependents. Also, no methodHistory is kept or redefinition is checked."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1056
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1057
    super addSelector:newSelector withMethod:newMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1058
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1059
    "Created: 2.4.1997 / 01:01:08 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1060
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1061
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1062
removeSelector:aSelector
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1063
    "remove the selector, aSelector and its associated method 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1064
     from the methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1065
     Append a change record to the changes file and tell dependents."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1066
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1067
    |oldMethod|
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1068
6746
8bbd639df663 removeSelector change: remember methods previous version
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
  1069
    oldMethod := self compiledMethodAt:aSelector.
8bbd639df663 removeSelector change: remember methods previous version
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
  1070
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1071
    MethodHistory notNil ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1072
        oldMethod notNil ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1073
            MethodHistory add:(Array with:#methodRemove with:oldMethod).
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1074
            (MethodHistorySize notNil and:[MethodHistory size > MethodHistorySize]) ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1075
                MethodHistory removeFirst.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1076
            ]
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1077
        ]
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1078
    ].
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1079
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1080
    (super removeSelector:aSelector) ifTrue:[
6746
8bbd639df663 removeSelector change: remember methods previous version
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
  1081
        self addChangeRecordForRemoveSelector:aSelector fromOld:oldMethod.
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1082
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1083
        "/ also notify a change of mySelf;
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1084
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1085
        self changed:#methodDictionary with:aSelector.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1086
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1087
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1088
        "/ also notify a change of Smalltalk;
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1089
        "/ this allows a dependent of Smalltalk to watch all class
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1090
        "/ changes (no need for observing all classes)
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1091
        "/ - this allows for watchers to find out if its a new method or a method-change
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1092
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1093
        Smalltalk changed:#methodInClassRemoved with:(Array with:self with:aSelector).
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1094
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1095
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1096
    "Modified: 8.1.1997 / 23:03:49 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1097
    "Created: 2.4.1997 / 00:59:29 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1098
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1099
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1100
!ClassDescription methodsFor:'c function interfacing'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1101
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1102
cInterfaceFunction:selector calling:cFunctionNameString args:argTypeArray returning:returnType
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1103
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1104
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1105
    "create an interface to an existing (i.e. already linked in) c function.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1106
     The function can be called by sending selector to the receiver class.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1107
     The c-function has the name cFunctionNameString, and expects parameters as specified in
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1108
     argTypeArray. The functions return value has a type as specified by returnType.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1109
     WARNING: 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1110
	this interface is EXPERIMENTAL - it may change or even be removed."
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1111
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1112
    StubGenerator isNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1113
	^ self error:'this system does not support dynamic C Interface functions'.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1114
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1115
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1116
    StubGenerator 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1117
	createStubFor:selector 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1118
	calling:cFunctionNameString 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1119
	args:argTypeArray 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1120
	returning:returnType
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1121
	in:self                          
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1122
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1123
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1124
     Object subclass:#CInterface
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1125
	    instanceVariableNames:''
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1126
	    classVariableNames:''
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1127
	    poolDictionaries:''
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1128
	    category:'Examples'.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1129
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1130
     CInterface cInterfaceFunction:#printfOn:format:withFloat: 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1131
			   calling:'fprintf' 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1132
			      args:#(ExternalStream String Float) 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1133
			 returning:#SmallInteger.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1134
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1135
     CInterface printfOn:Stdout format:'this is a float: %g' withFloat:(Float pi). Stdout cr  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1136
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1137
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1138
    "Modified: 5.1.1997 / 19:58:22 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1139
    "Created: 2.4.1997 / 00:57:40 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1140
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1141
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1142
!ClassDescription methodsFor:'changes management'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1143
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1144
addChangeRecordForMethod:aMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1145
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1146
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1147
    "add a method-change-record to the changes file and to the current changeSet"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1148
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1149
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1150
        self writingChangePerform:#addChangeRecordForMethod:to: with:aMethod.
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1151
    ].
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1152
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1153
    "this test allows a smalltalk without Projects/ChangeSets"
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1154
    Project notNil ifTrue:[
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1155
        UpdateChangeListQuerySignal query ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1156
            Project addMethodChange:aMethod in:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1157
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1158
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1159
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1160
    "Modified: / 20.1.1997 / 12:36:02 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1161
    "Created: / 2.4.1997 / 01:02:16 / stefan"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1162
    "Modified: / 18.3.1999 / 18:16:41 / stefan"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1163
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1164
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1165
addChangeRecordForMethod:aMethod fromOld:oldMethod
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1166
    "{ Pragma: +optSpace }"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1167
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1168
    "add a method-change-record to the changes file and to the current changeSet"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1169
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1170
    UpdateChangeFileQuerySignal query ifTrue:[
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1171
        self writingChangePerform:#addChangeRecordForMethod:to: with:aMethod.
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1172
    ].
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1173
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1174
    "this test allows a smalltalk without Projects/ChangeSets"
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1175
    Project notNil ifTrue:[
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1176
        UpdateChangeListQuerySignal query ifTrue:[
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1177
            Project addMethodChange:aMethod fromOld:oldMethod in:self
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1178
        ]
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1179
    ]
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1180
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1181
    "Modified: / 20.1.1997 / 12:36:02 / cg"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1182
    "Created: / 2.4.1997 / 01:02:16 / stefan"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1183
    "Modified: / 18.3.1999 / 18:16:41 / stefan"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1184
!
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1185
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1186
addChangeRecordForMethodCategory:aMethodOrSelector category:aString
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1187
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1188
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1189
    |mthd|
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1190
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1191
    "add a methodCategory-change-record to the changes file and to the current changeSet"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1192
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1193
    UpdateChangeFileQuerySignal query ifTrue:[
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1194
        (mthd := aMethodOrSelector) isSymbol ifTrue:[
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1195
            mthd := self compiledMethodAt:aMethodOrSelector
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1196
        ].
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1197
        self writingChangeDo:[:aStream |
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1198
            self addChangeRecordForMethodCategory:mthd category:aString to:aStream.
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1199
        ].
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1200
    ].
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1201
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1202
    "this test allows a smalltalk without Projects/ChangeSets"
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1203
    Project notNil ifTrue:[
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1204
        UpdateChangeListQuerySignal query ifTrue:[
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1205
            Project addMethodCategoryChange:mthd category:aString in:self
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1206
        ]
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1207
    ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1208
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1209
    "Modified: / 18.3.1999 / 18:16:50 / stefan"
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1210
    "Modified: / 6.2.2000 / 17:35:01 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1211
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1212
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1213
addChangeRecordForMethodPrivacy:aMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1214
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1215
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1216
    "add a method-privacy-change-record to the changes file and to the current changeSet"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1217
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1218
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1219
        self writingChangePerform:#addChangeRecordForMethodPrivacy:to: with:aMethod.
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1220
    ].
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1221
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1222
    "this test allows a smalltalk without Projects/ChangeSets"
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1223
    Project notNil ifTrue:[
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1224
        UpdateChangeListQuerySignal query ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1225
            Project addMethodPrivacyChange:aMethod in:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1226
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1227
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1228
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1229
    "Modified: / 27.8.1995 / 22:47:32 / claus"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1230
    "Modified: / 20.1.1997 / 12:36:08 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1231
    "Created: / 2.4.1997 / 17:30:33 / stefan"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1232
    "Modified: / 18.3.1999 / 18:16:58 / stefan"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1233
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1234
6746
8bbd639df663 removeSelector change: remember methods previous version
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
  1235
addChangeRecordForRemoveSelector:aSelector fromOld:oldMethod
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1236
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1237
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1238
    "add a method-remove-record to the changes file and to the current changeSet"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1239
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1240
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1241
        self writingChangePerform:#addChangeRecordForRemoveSelector:to: with:aSelector.
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1242
    ].
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1243
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1244
    "this test allows a smalltalk without Projects/ChangeSets"
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1245
    Project notNil ifTrue:[
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1246
        UpdateChangeListQuerySignal query ifTrue:[
6746
8bbd639df663 removeSelector change: remember methods previous version
Claus Gittinger <cg@exept.de>
parents: 6732
diff changeset
  1247
            Project addRemoveSelectorChange:aSelector fromOld:oldMethod in:self
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1248
        ]
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1249
    ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1250
3288
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 3230
diff changeset
  1251
    "Created: / 2.4.1997 / 17:30:47 / stefan"
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 3230
diff changeset
  1252
    "Modified: / 16.2.1998 / 12:45:45 / cg"
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1253
    "Modified: / 18.3.1999 / 18:17:02 / stefan"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1254
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1255
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1256
addChangeRecordForRenameCategory:oldCategory to:newCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1257
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1258
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1259
    "add a category-rename record to the changes file and to the current changeSet"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1260
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1261
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1262
        self writingChangeDo:[:aStream |
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1263
            self addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream.
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1264
        ].
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1265
    ].
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1266
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1267
    "this test allows a smalltalk without Projects/ChangeSets"
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1268
    Project notNil ifTrue:[
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1269
        UpdateChangeListQuerySignal query ifTrue:[
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1270
            Project addRenameCategoryChangeIn:self from:oldCategory to:newCategory
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1271
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1272
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1273
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1274
    "Created: / 2.4.1997 / 17:31:03 / stefan"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1275
    "Modified: / 18.3.1999 / 18:17:08 / stefan"
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1276
    "Modified: / 6.2.2000 / 02:26:58 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1277
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1278
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1279
addChangeTimeStampTo:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1280
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1281
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1282
    "a timestamp - prepended to any change, except infoRecords"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1283
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1284
    |info|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1285
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1286
    info := 'timestamp ' , OperatingSystem getLoginName , '@' , OperatingSystem getHostName.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1287
    self addInfoRecord:info to:aStream. aStream cr.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1288
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1289
    "Modified: 22.3.1997 / 17:14:10 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1290
    "Created: 3.4.1997 / 19:18:27 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1291
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1292
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1293
addInfoRecord:aMessage
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1294
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1295
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1296
    "add an info-record (snapshot, class fileOut etc.) to the changes file"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1297
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1298
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1299
        self writingChangeWithTimeStamp:false 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1300
             perform:#addInfoRecord:to: 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1301
             with:aMessage.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1302
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1303
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1304
    "Modified: / 24.1.1997 / 19:13:14 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1305
    "Created: / 2.4.1997 / 17:34:18 / stefan"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1306
    "Modified: / 18.3.1999 / 18:17:13 / stefan"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1307
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1308
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1309
changesStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1310
    "return a Stream for the writing changes file.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1311
     This returns a regular stream or a locked stream - according to
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1312
     the LockChangesFile settings 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1313
     (recommended if multiple images operate on a common changes file)"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1314
8161
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1315
    |streamType changesStream fileName encoder changeFileIsNew|
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1316
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1317
    fileName := ObjectMemory nameForChanges.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1318
    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1319
    LockChangesFile ifTrue:[
5286
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1320
        streamType := LockedFileStream. 
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1321
    ] ifFalse:[
5286
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1322
        streamType := FileStream.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1323
    ].
7086
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1324
8161
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1325
    changeFileIsNew := fileName asFilename exists not.
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1326
7086
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1327
    [
8161
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1328
        changesStream := streamType fileNamed:fileName.
7086
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1329
    ] on:FileStream openErrorSignal do:[:ex| 
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1330
        self warn:'cannot create/update the changes file (check permissions)'.
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1331
        ^ nil
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1332
    ].
8161
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1333
    changesStream setToEnd.
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1334
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1335
    encoder := CharacterEncoder encoderFor:#'utf8'.
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1336
    changesStream := EncodedStream stream:changesStream encoder:encoder.
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1337
    changeFileIsNew ifTrue:[
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1338
        changesStream nextPutAll:'"{ Encoding: ' , encoder nameOfEncoding , ' }"'; cr; cr.
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1339
    ].
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1340
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  1341
    ^ changesStream
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1342
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1343
    "Modified: 24.1.1997 / 19:14:27 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1344
    "Created: 2.4.1997 / 17:34:13 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1345
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1346
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1347
withoutUpdatingChangesDo:aBlock
6545
eef9e5e8c487 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6521
diff changeset
  1348
    "turn off change file update while evaluating aBlock.
eef9e5e8c487 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6521
diff changeset
  1349
     Returns the blocks evaluated value."
eef9e5e8c487 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6521
diff changeset
  1350
eef9e5e8c487 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6521
diff changeset
  1351
    |retVal|
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1352
6097
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1353
    UpdateChangeFileQuerySignal answer:false
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1354
    do:[
276766efb318 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5994
diff changeset
  1355
        UpdateChangeListQuerySignal answer:false
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1356
        do:[
6545
eef9e5e8c487 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6521
diff changeset
  1357
           retVal := aBlock value
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1358
        ].
6545
eef9e5e8c487 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6521
diff changeset
  1359
    ].
eef9e5e8c487 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 6521
diff changeset
  1360
    ^ retVal
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1361
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1362
    "Modified: 17.1.1997 / 20:48:05 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1363
    "Created: 2.4.1997 / 17:34:35 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1364
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1365
5994
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1366
!ClassDescription methodsFor:'compiler interface'!
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1367
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1368
compiler
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1369
    "return the compiler to use for this class.
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1370
     OBSOLETE: This is the old ST/X interface, kept for migration. 
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1371
               Dont use it - it will vanish."
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1372
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1373
    <resource:#obsolete>
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1374
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1375
    self obsoleteMethodWarning:'use #compilerClass'.
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1376
    ^ self compilerClass
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1377
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1378
    "Modified: 31.7.1997 / 23:04:33 / cg"
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1379
! !
554530710162 allow metaclass to specify compiler, parser, evaluator etc.
Claus Gittinger <cg@exept.de>
parents: 5943
diff changeset
  1380
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1381
!ClassDescription methodsFor:'compiling'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1382
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1383
compile:code
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1384
    "compile code, aString for this class; 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1385
     if successful update the method dictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1386
     Returns the new method or nil (on failure)."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1387
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1388
    ^ self theNonMetaclass compilerClass 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1389
        compile:code 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1390
        forClass:self
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1391
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1392
    "Modified: 13.12.1995 / 10:56:00 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1393
    "Created: 1.4.1997 / 23:43:51 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1394
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1395
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1396
compile:code classified:category
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1397
    "compile code, aString for this class; 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1398
     if successful update the method dictionary. 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1399
     The method is classified under category.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1400
     Returns the new method or nil (on failure)."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1401
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1402
    ^ self compile:code classified:category logged:true
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1403
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1404
    "Modified: 20.4.1996 / 12:30:51 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1405
    "Created: 1.4.1997 / 23:43:57 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1406
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1407
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1408
compile:code classified:category logged:logged
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1409
    "compile code, aString for this class; 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1410
     if successful update the method dictionary. 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1411
     The method is classified under category.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1412
     If logged is true, a changeRecord is written.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1413
     Returns the new method or nil (on failure)."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1414
6623
ec87eed45ffa compilation
Claus Gittinger <cg@exept.de>
parents: 6621
diff changeset
  1415
    |compiler|
ec87eed45ffa compilation
Claus Gittinger <cg@exept.de>
parents: 6621
diff changeset
  1416
ec87eed45ffa compilation
Claus Gittinger <cg@exept.de>
parents: 6621
diff changeset
  1417
    compiler := self theNonMetaclass compilerClass.
ec87eed45ffa compilation
Claus Gittinger <cg@exept.de>
parents: 6621
diff changeset
  1418
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1419
    logged ifFalse:[
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1420
        self withoutUpdatingChangesDo:[
6623
ec87eed45ffa compilation
Claus Gittinger <cg@exept.de>
parents: 6621
diff changeset
  1421
            ^ compiler 
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1422
                compile:code 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1423
                forClass:self 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1424
                inCategory:category
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1425
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1426
    ] ifTrue:[
6623
ec87eed45ffa compilation
Claus Gittinger <cg@exept.de>
parents: 6621
diff changeset
  1427
        ^ compiler 
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1428
            compile:code 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1429
            forClass:self 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1430
            inCategory:category
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1431
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1432
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1433
    "Modified: 13.12.1995 / 11:02:34 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1434
    "Created: 1.4.1997 / 23:44:02 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1435
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1436
3606
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1437
compile:code classified:cat notifying:requestor
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1438
    "compile code, aString for this class; on any error, notify
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1439
     requestor, anObject with the error reason.
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1440
     Install the method under the category, cat.
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1441
     Returns the new method or nil (on failure)."
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1442
7617
a557bbe96ef1 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7610
diff changeset
  1443
    ^ self theMetaclass compilerClass 
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1444
        compile:code 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1445
        forClass:self
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1446
        inCategory:cat 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1447
        notifying:requestor
3606
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1448
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1449
    "Modified: / 13.12.1995 / 11:02:40 / cg"
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1450
    "Created: / 18.6.1998 / 15:52:15 / cg"
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1451
!
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1452
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1453
compile:code notifying:requestor
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1454
    "compile code, aString for this class; on any error, notify
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1455
     requestor, anObject with the error reason.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1456
     Returns the new method or nil (on failure)."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1457
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1458
    ^ self theNonMetaclass compilerClass 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1459
        compile:code 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1460
        forClass:self 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1461
        notifying:requestor
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1462
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1463
    "Modified: 13.12.1995 / 11:02:40 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1464
    "Created: 1.4.1997 / 23:43:43 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1465
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1466
3097
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1467
compile:code notifying:requestor ifFail:failBlock
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1468
    "compile code, aString for this class; on any error, notify
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1469
     requestor, anObject with the error reason.
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1470
     Returns the new method or nil (on failure)."
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1471
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1472
    |rslt|
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1473
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1474
    rslt := self theNonMetaclass compilerClass 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1475
        compile:code 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1476
        forClass:self 
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1477
        notifying:requestor.
6623
ec87eed45ffa compilation
Claus Gittinger <cg@exept.de>
parents: 6621
diff changeset
  1478
3097
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1479
    (rslt isNil or:[rslt == #Error]) ifTrue:[
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1480
        ^ failBlock value
3097
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1481
    ].
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1482
    ^ rslt
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1483
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1484
    "Modified: / 13.12.1995 / 11:02:40 / cg"
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1485
    "Created: / 8.11.1997 / 13:42:02 / cg"
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1486
!
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1487
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1488
recompile
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1489
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1490
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1491
    "recompile all methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1492
     used when a class changes instances and therefore all methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1493
     have to be recompiled"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1494
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1495
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1496
        self recompile:aSelector
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1497
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1498
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1499
    "Modified: 12.6.1996 / 11:51:15 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1500
    "Created: 1.4.1997 / 23:43:38 / stefan"
2893
8ba406da6b22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
  1501
    "Modified: 29.8.1997 / 07:56:49 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1502
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1503
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1504
recompile:aSelector
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1505
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1506
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1507
    "recompile the method associated with the argument, aSelector;
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1508
     used when a superclass changes instances and we have to recompile
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1509
     subclasses"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1510
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1511
    |cat code compiler oldMethod oldPackage newMethod|
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1512
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1513
    Class withoutUpdatingChangesDo:[
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1514
        oldMethod := self compiledMethodAt:aSelector.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1515
        oldPackage := oldMethod package.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1516
        cat := oldMethod category.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1517
        code := self sourceCodeAt:aSelector.
6393
6d4b7a7173b4 compilerClass: via theNonMetaclass
james
parents: 6239
diff changeset
  1518
        compiler := self theNonMetaclass compilerClass.
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1519
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1520
        Class methodRedefinitionSignal answer:#keep do:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1521
            (compiler respondsTo:#compile:forClass:inCategory:)
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1522
            ifTrue:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1523
                "/ ST/X's compiler
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1524
                compiler compile:code forClass:self inCategory:cat
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1525
            ] ifFalse:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1526
                "/ some other (TGEN) compiler
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1527
                compiler new
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1528
                        compile:code
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1529
                        in:self
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1530
                        notifying:nil
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1531
                        ifFail:[].
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1532
            ].
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1533
        ].
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1534
        newMethod := self compiledMethodAt:aSelector.
5756
45fff3f4294b *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 5750
diff changeset
  1535
        newMethod setPackage:oldPackage.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1536
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1537
3074
038bcaafe962 alien compiler support
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
  1538
    "Created: / 1.4.1997 / 23:43:34 / stefan"
038bcaafe962 alien compiler support
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
  1539
    "Modified: / 30.10.1997 / 17:12:50 / cg"
3329
5bd568fec8d1 Fix non-ST/X compiler interface in #recompile
Stefan Vogel <sv@exept.de>
parents: 3288
diff changeset
  1540
    "Modified: / 4.3.1998 / 13:01:55 / stefan"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1541
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1542
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1543
recompileAll
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1544
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1545
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1546
    "recompile this class and all subclasses"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1547
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1548
    |classes|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1549
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1550
    classes := self subclasses.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1551
    self recompile.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1552
    classes do:[:aClass |
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1553
	aClass recompileAll
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1554
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1555
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1556
    "Modified: 5.1.1997 / 19:56:29 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1557
    "Created: 1.4.1997 / 23:44:15 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1558
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1559
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1560
recompileForSpeed:aSelector
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1561
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1562
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1563
    "recompile the method associated with the argument, aSelector;
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1564
     for highest speed (i.e. using the stc compiler, if supported by
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1565
     the architecture)."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1566
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1567
    |cat code prev oldMethod oldPackage newMethod|
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1568
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1569
    Class withoutUpdatingChangesDo:[
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1570
        oldMethod := self compiledMethodAt:aSelector.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1571
        oldPackage := oldMethod package.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1572
        cat := oldMethod category.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1573
        code := self sourceCodeAt:aSelector.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1574
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1575
        Class methodRedefinitionSignal answer:#keep do:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1576
            prev := Compiler stcCompilation:#always.
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1577
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1578
            [
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1579
                self compilerClass compile:code forClass:self inCategory:cat
6423
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  1580
            ] ensure:[
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1581
                Compiler stcCompilation:prev.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1582
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1583
                (self compiledMethodAt:aSelector) isNil ifTrue:[
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1584
                    self primAddSelector:aSelector withMethod:oldMethod
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1585
                ]
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1586
            ]
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1587
        ].
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1588
        newMethod := self compiledMethodAt:aSelector.
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  1589
        newMethod package:oldPackage.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1590
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1591
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1592
    "Modified: 5.1.1997 / 19:55:33 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1593
    "Created: 1.4.1997 / 23:44:32 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1594
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1595
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1596
recompileInvalidatedMethods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1597
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1598
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1599
    "recompile all invalidated methods"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1600
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1601
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1602
        |trap trapCode trapByteCode|
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1603
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1604
        trap := aMethod trapMethodForNumArgs:aMethod numArgs.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1605
        trapCode := trap code.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1606
        trapByteCode := trap byteCode.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1607
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1608
        (aMethod code = trapCode
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1609
        or:[aMethod byteCode == trapByteCode]) ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1610
            self recompile:aSelector
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1611
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1612
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1613
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1614
    "Modified: 12.6.1996 / 11:52:09 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1615
    "Modified: 5.1.1997 / 19:56:59 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1616
    "Created: 1.4.1997 / 23:44:37 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1617
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1618
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1619
recompileMethodsAccessingAny:setOfNames
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1620
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1621
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1622
    "recompile all methods accessing a variable from setOfNames"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1623
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1624
    self recompileMethodsAccessingAny:setOfNames orSuper:false
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1625
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1626
    "Modified: 5.1.1997 / 19:57:05 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1627
    "Created: 1.4.1997 / 23:44:41 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1628
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1629
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1630
recompileMethodsAccessingAny:setOfNames orSuper:superBoolean
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1631
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1632
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1633
    "recompile all methods accessing a variable from setOfNames,
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1634
     or super (if superBoolean is true)"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1635
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1636
    |p|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1637
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1638
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1639
        |mustCompile lits source|
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1640
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1641
        mustCompile := nil.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1642
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1643
        source := aMethod source.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1644
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1645
        "/ avoid parsing, if possible
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1646
        superBoolean ifFalse:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1647
            setOfNames size == 1 ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1648
                (source findString:(setOfNames first)) == 0 ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1649
                    mustCompile := false.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1650
                ]
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1651
            ]
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1652
        ].
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1653
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1654
        mustCompile isNil ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1655
            p := Parser parseMethod:source in:self.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1656
            (p isNil 
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1657
             or:[(p usedVars includesAny:setOfNames)
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1658
             or:[superBoolean and:[p usesSuper]]]) ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1659
                mustCompile := true
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1660
            ]
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1661
        ].
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1662
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1663
        mustCompile == true ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1664
            self recompile:aSelector
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1665
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1666
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1667
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1668
    "Modified: 12.6.1996 / 11:52:35 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1669
    "Created: 1.4.1997 / 23:44:46 / stefan"
2893
8ba406da6b22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
  1670
    "Modified: 29.8.1997 / 07:58:32 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1671
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1672
3219
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1673
recompileMethodsAccessingAnyClassvarOrGlobal:aCollection
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1674
    "{ Pragma: +optSpace }"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1675
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1676
    "recompile all methods accessing a global or classvar in aCollection"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1677
4110
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1678
"/  Transcript showCR:self name , ' recompiling accesses to ' , aCollection printString.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1679
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1680
    self selectorsAndMethodsDo:[:aSelector :aMethod |
4110
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1681
        (aMethod literalsDetect:[ :lit | |i l|
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1682
            "classVars are named 'className:varName' in 
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1683
             the literal array"
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1684
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1685
            lit isSymbol and:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1686
                i := lit lastIndexOf:$:.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1687
                i == 0 ifTrue:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1688
                    l := lit.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1689
                ] ifFalse:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1690
                    l := lit copyFrom:(i + 1).
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1691
                ].
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1692
                aCollection includes:l
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1693
            ].
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1694
        ] ifNone:[]) notNil ifTrue:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1695
"/          Transcript showCR:self name , ' recompiling ' , aSelector.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1696
            self recompile:aSelector
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1697
        ]
3219
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1698
    ]
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1699
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1700
    "Modified: / 29.8.1997 / 07:59:24 / cg"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1701
    "Created: / 23.1.1998 / 12:13:32 / stefan"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1702
    "Modified: / 23.1.1998 / 16:13:45 / stefan"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1703
!
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1704
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1705
recompileMethodsAccessingGlobal:aGlobalKey
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1706
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1707
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1708
    "recompile all methods accessing the global variable aGlobalKey"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1709
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1710
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1711
        (aMethod literalsDetect:[:lit|
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1712
            lit = aGlobalKey
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1713
        ] ifNone:[]) notNil ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1714
            self recompile:aSelector.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1715
        ].
3219
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1716
    ].
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1717
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1718
    "Created: / 1.4.1997 / 23:44:53 / stefan"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1719
    "Modified: / 29.8.1997 / 07:59:24 / cg"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1720
    "Modified: / 23.1.1998 / 15:47:55 / stefan"
4750
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1721
!
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1722
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1723
recompileMethodsWithMachineCode
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1724
    "{ Pragma: +optSpace }"
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1725
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1726
    "recompile all methods which have non-dynamic machineCode 
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1727
     (i.e. those, which were loaded from a classLibrary)"
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1728
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1729
    self selectorsAndMethodsDo:[:aSelector :oldMethod |
4751
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1730
        |newMethod|
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1731
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1732
        oldMethod isLazyMethod ifFalse:[
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1733
            oldMethod byteCode isNil ifTrue:[
4750
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1734
                self recompile:aSelector.
4751
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1735
                newMethod := self compiledMethodAt:aSelector.
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1736
                oldMethod ~~ newMethod ifTrue:[
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1737
                    newMethod sourceFilename:(oldMethod getSource) position:(oldMethod getSourcePosition)
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1738
                ]
4750
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1739
            ].
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1740
        ].
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1741
    ].
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1742
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1743
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1744
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1745
!ClassDescription methodsFor:'fileIn interface'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1746
3520
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1747
commentStamp:aStamp prior:whatever
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1748
    "return a ClassCategoryReader to read in and compile methods for me.
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1749
     This was added to allow squeak code to be filedIn."
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1750
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1751
    ^ Squeak::ClassCommentReader new
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1752
	class:self 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1753
	category:#Comment
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1754
	changeStamp:aStamp
3520
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1755
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1756
    "Modified: / 6.6.1998 / 01:47:06 / cg"
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1757
!
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1758
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1759
ignoredMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1760
    "this is a speciality of ST/X - it allows quick commenting of methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1761
     from a source-file by replacing the 'methodsFor:' by 'ignoredMethodsFor:'.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1762
     Returns a ClassCategoryReader to read in and skip methods."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1763
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1764
    ^ (self methodsFor:aCategory) ignoredProtocol
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1765
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1766
    "Modified: 10.2.1996 / 12:53:25 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1767
    "Created: 1.4.1997 / 13:58:46 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1768
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1769
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1770
methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1771
    "this method allows fileIn of ST/V methods -
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1772
     return a ClassCategoryReader to read in and compile methods for me.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1773
     Since ST/V does not support method categories, the loaded methods are
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1774
     categorized as 'ST/V methods'."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1775
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1776
    ^ ClassCategoryReader class:self category:'ST/V methods'
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1777
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1778
    "Modified: 10.2.1996 / 12:44:21 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1779
    "Created: 1.4.1997 / 13:58:52 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1780
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1781
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1782
methodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1783
    "return a ClassCategoryReader to read in and compile methods for me."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1784
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1785
    ^ ClassCategoryReader class:self category:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1786
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1787
    "Modified: 10.2.1996 / 12:44:43 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1788
    "Created: 1.4.1997 / 13:57:37 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1789
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1790
3035
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1791
methodsFor:aCategory stamp:time
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1792
    "return a ClassCategoryReader to read in and compile methods for me.
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1793
     This was added to allow squeak code to be filedIn."
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1794
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1795
    ^ self methodsFor:aCategory
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1796
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1797
    "Modified: 15.10.1997 / 18:51:53 / cg"
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1798
!
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1799
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1800
methodsForUndefined:categoryString
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1801
    "ST-80 compatibility.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1802
     I dont yet know what this does - it was encountered by some tester.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1803
     For now, simply forward it."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1804
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1805
    ^ self methodsFor:categoryString
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1806
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1807
    "Created: 1.4.1997 / 13:59:14 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1808
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1809
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1810
privateMethods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1811
    "this method allows fileIn of V'Age methods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1812
     The privateMethods keyword is for documentation only; 
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1813
     by default, methods are public (for backward compatibility)
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1814
     (although, they could be made private here)."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1815
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1816
    "/ uncomment to install as real private methods ...
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1817
    "/ ^ (self methodsFor:'private') privateProtocol
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1818
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1819
    ^ self methodsFor:'private'
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1820
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1821
    "Created: / 15.6.1998 / 20:29:29 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1822
    "Modified: / 15.6.1998 / 20:30:38 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1823
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1824
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1825
privateMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1826
    "this method allows fileIn of ENVY and ST/X private methods.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1827
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1828
     The following methods are only allowed to be executed if sent from a method
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1829
     within the current class. Subclass sends or out-of-class sends will raise
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1830
     a privatMethodError exception."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1831
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1832
    ^ (self methodsFor:aCategory) privateProtocol
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1833
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1834
    "Modified: 10.2.1996 / 12:48:44 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1835
    "Created: 1.4.1997 / 14:01:07 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1836
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1837
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1838
protectedMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1839
    "this method allows fileIn of ENVY and ST/X protected methods. 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1840
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1841
     The following methods are only allowed to be executed if sent from a method
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1842
     within the current class or a subclass. Out-of-class sends will raise
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1843
     a privatMethodError exception."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1844
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1845
    ^ (self methodsFor:aCategory) protectedProtocol
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1846
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1847
    "Modified: 10.2.1996 / 12:49:18 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1848
    "Created: 1.4.1997 / 13:59:32 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1849
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1850
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1851
publicMethods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1852
    "this method allows fileIn of V'Age methods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1853
     The publicMethods keyword is for documentation only; 
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1854
     by default, methods are public anyway (for backward compatibility)."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1855
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1856
    ^ self methodsFor:'public'
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1857
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1858
    "Created: / 1.4.1997 / 13:59:39 / stefan"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1859
    "Modified: / 15.6.1998 / 20:29:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1860
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1861
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1862
publicMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1863
    "this method allows fileIn of ENVY methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1864
     The publicMethods keyword is for documentation only; my default, methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1865
     are public anyway (for backward compatibility)."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1866
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1867
    ^ self methodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1868
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1869
    "Modified: 10.2.1996 / 12:50:11 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1870
    "Created: 1.4.1997 / 13:59:39 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1871
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1872
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1873
!ClassDescription methodsFor:'fileOut'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1874
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1875
fileOutCategory:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1876
    "create a file 'class-category.st' consisting of all methods in aCategory.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1877
     If the current project is not nil, create the file in the projects
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1878
     directory."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1879
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1880
    |aStream fileName|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1881
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1882
    fileName := (self name , '-' , aCategory , '.st') asFilename.
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1883
    fileName makeLegalFilename.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1884
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1885
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1886
    "/ this test allows a smalltalk to be built without Projects/ChangeSets
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1887
    "/
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1888
    Project notNil ifTrue:[
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1889
        fileName := Project currentProjectDirectory asFilename construct:(fileName name).
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1890
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1891
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1892
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1893
    "/ if the file exists, save original in a .sav file
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1894
    "/
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1895
    fileName exists ifTrue:[
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1896
        fileName copyTo:(fileName withSuffix:'sav')
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1897
    ].
7086
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1898
    [
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1899
        aStream := fileName newReadWriteStream.
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1900
    ] on:FileStream openErrorSignal do:[:ex|
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1901
        ^ FileOutErrorSignal 
7086
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1902
                raiseRequestWith:fileName name
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  1903
                errorString:(' - cannot create file:', fileName name)
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1904
    ].
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1905
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1906
    self fileOutCategory:aCategory on:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1907
    aStream close
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1908
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1909
    "Modified: / 1.4.1997 / 16:00:24 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1910
    "Created: / 1.4.1997 / 16:04:18 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1911
    "Modified: / 28.10.1997 / 14:40:28 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1912
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1913
4733
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1914
fileOutCategory:aCategory except:skippedMethods only:savedMethods methodFilter:methodFilter on:aStream
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1915
    "file out all methods belonging to aCategory, aString onto aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1916
     If skippedMethods is nonNil, those are not saved.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1917
     If savedMethods is nonNil, only those are saved.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1918
     If both are nil, all are saved. See version-method handling in
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1919
     fileOut for what this is needed."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1920
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1921
    |dict source sortedSelectors first privacy interestingMethods cat|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1922
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1923
    dict := self methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1924
    dict notNil ifTrue:[
4733
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1925
        interestingMethods := OrderedCollection new.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1926
        dict do:[:aMethod |
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1927
            |wanted|
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1928
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1929
            (methodFilter isNil
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1930
            or:[methodFilter value:aMethod]) ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1931
                (aCategory = aMethod category) ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1932
                    skippedMethods notNil ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1933
                        wanted := (skippedMethods includesIdentical:aMethod) not
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1934
                    ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1935
                        savedMethods notNil ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1936
                            wanted := (savedMethods includesIdentical:aMethod).
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1937
                        ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1938
                            wanted := true
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1939
                        ]
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1940
                    ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1941
                    wanted ifTrue:[interestingMethods add:aMethod].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1942
                ]
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1943
            ]
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1944
        ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1945
        interestingMethods notEmpty ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1946
            first := true.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1947
            privacy := nil.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1948
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1949
            "/
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1950
            "/ sort by selector
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1951
            "/
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1952
            sortedSelectors := interestingMethods collect:[:m | self selectorAtMethod:m].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1953
            sortedSelectors sortWith:interestingMethods.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1954
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1955
            interestingMethods do:[:aMethod |
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1956
                first ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1957
                    privacy ~~ aMethod privacy ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1958
                        first := true.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1959
                        aStream space.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1960
                        aStream nextPutChunkSeparator.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1961
                    ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1962
                    aStream cr; cr
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1963
                ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1964
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1965
                privacy := aMethod privacy.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1966
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1967
                first ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1968
                    aStream nextPutChunkSeparator.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1969
                    self printClassNameOn:aStream.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1970
                    privacy ~~ #public ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1971
                        aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1972
                    ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1973
                        aStream nextPutAll:' methodsFor:'.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1974
                    ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1975
                    cat := aCategory.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1976
                    cat isNil ifTrue:[ cat := '' ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1977
                    aStream nextPutAll:aCategory asString storeString.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1978
                    aStream nextPutChunkSeparator; cr; cr.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1979
                    first := false.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1980
                ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1981
                source := aMethod source.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1982
                source isNil ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1983
                    FileOutErrorSignal 
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1984
                        raiseRequestWith:self
6664
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  1985
                        errorString:' - no source for method: ', (aMethod displayString)
4733
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1986
                ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1987
                    aStream nextChunkPut:source.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1988
                ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1989
            ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1990
            aStream space.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1991
            aStream nextPutChunkSeparator.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1992
            aStream cr
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1993
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1994
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1995
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1996
    "Modified: 28.8.1995 / 14:30:41 / claus"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1997
    "Modified: 12.6.1996 / 11:37:33 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1998
    "Modified: 15.11.1996 / 11:32:21 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1999
    "Created: 1.4.1997 / 16:04:33 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2000
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2001
4733
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2002
fileOutCategory:aCategory except:skippedMethods only:savedMethods on:aStream
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2003
    "file out all methods belonging to aCategory, aString onto aStream.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2004
     If skippedMethods is nonNil, those are not saved.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2005
     If savedMethods is nonNil, only those are saved.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2006
     If both are nil, all are saved. See version-method handling in
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2007
     fileOut for what this is needed."
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2008
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2009
    self
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2010
        fileOutCategory:aCategory 
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2011
        except:skippedMethods 
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2012
        only:savedMethods       
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2013
        methodFilter:nil
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2014
        on:aStream
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2015
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2016
    "Modified: 28.8.1995 / 14:30:41 / claus"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2017
    "Modified: 12.6.1996 / 11:37:33 / stefan"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2018
    "Modified: 15.11.1996 / 11:32:21 / cg"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2019
    "Created: 1.4.1997 / 16:04:33 / stefan"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2020
!
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2021
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2022
fileOutCategory:aCategory methodFilter:methodFilter on:aStream
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2023
    "file out all methods belonging to aCategory, aString onto aStream"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2024
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2025
    self fileOutCategory:aCategory except:nil only:nil methodFilter:methodFilter on:aStream
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2026
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2027
    "Created: 1.4.1997 / 16:04:44 / stefan"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2028
!
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  2029
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2030
fileOutCategory:aCategory on:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2031
    "file out all methods belonging to aCategory, aString onto aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2032
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  2033
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  2034
    "/ must use the classes full name
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  2035
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  2036
    Class fileOutNameSpaceQuerySignal answer:true do:[
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  2037
        self fileOutCategory:aCategory except:nil only:nil methodFilter:nil on:aStream
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  2038
    ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2039
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2040
    "Created: 1.4.1997 / 16:04:44 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2041
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2042
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2043
fileOutMethod:aMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2044
    "create a file 'class-method.st' consisting of the method, aMethod.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2045
     If the current project is not nil, create the file in the projects
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2046
     directory."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2047
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2048
    |aStream fileName selector|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2049
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2050
    selector := self selectorAtMethod:aMethod.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2051
    selector notNil ifTrue:[
6664
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2052
        fileName := (self name , '-' , selector, '.st') asFilename.
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2053
        fileName makeLegalFilename.
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2054
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2055
        "
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2056
         this test allows a smalltalk to be built without Projects/ChangeSets
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2057
        "
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2058
        Project notNil ifTrue:[
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2059
            fileName := Project currentProjectDirectory asFilename construct:fileName name.
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2060
        ].
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2061
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2062
        "
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2063
         if file exists, save original in a .sav file
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2064
        "
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2065
        fileName exists ifTrue:[
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2066
            fileName copyTo:(fileName withSuffix: 'sav')
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2067
        ].
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2068
7086
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  2069
        [
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  2070
            aStream := fileName newReadWriteStream.
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  2071
        ] on:FileStream openErrorSignal do:[:ex|
6664
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2072
            ^ FileOutErrorSignal 
7086
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  2073
                    raiseRequestWith:fileName name
40eea91992ec Handle openErrorSignal in preparition for change openErrorSignal
Stefan Vogel <sv@exept.de>
parents: 6930
diff changeset
  2074
                    errorString:(' - cannot create file:', fileName name)
6664
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2075
        ].
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2076
        self fileOutMethod:aMethod on:aStream.
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2077
        aStream close
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2078
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2079
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  2080
    "Modified: / 1.4.1997 / 16:00:57 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  2081
    "Created: / 2.4.1997 / 00:24:28 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  2082
    "Modified: / 28.10.1997 / 14:40:34 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2083
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2084
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2085
fileOutMethod:aMethod on:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2086
    "file out the method, aMethod onto aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2087
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2088
    |dict cat source privacy|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2089
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2090
    dict := self methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2091
    dict notNil ifTrue:[
5193
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2092
        aStream nextPutChunkSeparator.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2093
        self name printOn:aStream.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2094
"/        self printClassNameOn:aStream.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2095
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2096
        (privacy := aMethod privacy) ~~ #public ifTrue:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2097
            aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2098
        ] ifFalse:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2099
            aStream nextPutAll:' methodsFor:'.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2100
        ].
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2101
        cat := aMethod category.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2102
        cat isNil ifTrue:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2103
            cat := ''
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2104
        ].
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2105
        aStream nextPutAll:cat asString storeString.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2106
        aStream nextPutChunkSeparator; cr; cr.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2107
        source := aMethod source.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2108
        source isNil ifTrue:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2109
            FileOutErrorSignal 
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2110
                raiseRequestWith:self
6664
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2111
                errorString:(' - no source for method: ' ,
5193
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2112
                             self name , '>>' ,
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2113
                             (self selectorAtMethod:aMethod))
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2114
        ] ifFalse:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2115
            aStream nextChunkPut:source.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2116
        ].
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2117
        aStream space.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2118
        aStream nextPutChunkSeparator.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  2119
        aStream cr
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2120
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2121
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2122
    "Modified: 27.8.1995 / 01:23:19 / claus"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2123
    "Modified: 12.6.1996 / 11:44:41 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2124
    "Modified: 15.11.1996 / 11:32:43 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2125
    "Created: 2.4.1997 / 00:24:33 / stefan"
5216
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2126
!
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2127
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2128
fileOutMethods:methods on:aStream
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2129
    methods do:[:aMethod |
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2130
        self fileOutMethod:aMethod on:aStream
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2131
    ].
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2132
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2133
    "Created: / 29.1.2000 / 16:39:53 / cg"
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  2134
    "Modified: / 29.1.2000 / 16:40:59 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2135
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2136
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2137
!ClassDescription methodsFor:'fileOut-xml'!
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2138
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2139
fileOutXMLCategory:aCategory methodFilter:methodFilter on:aStream
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2140
    "file out all methods belonging to aCategory, aString in xml format onto aStream."
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2141
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2142
    |dict source sortedSelectors first privacy interestingMethods cat|
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2143
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2144
    dict := self methodDictionary.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2145
    dict notNil ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2146
        interestingMethods := OrderedCollection new.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2147
        dict do:[:aMethod |
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2148
            (methodFilter isNil
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2149
            or:[methodFilter value:aMethod]) ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2150
                (aCategory = aMethod category) ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2151
                    interestingMethods add:aMethod.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2152
                ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2153
            ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2154
        ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2155
        interestingMethods notEmpty ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2156
            first := true.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2157
            privacy := nil.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2158
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2159
            "/
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2160
            "/ sort by selector
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2161
            "/
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2162
            sortedSelectors := interestingMethods collect:[:m | self selectorAtMethod:m].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2163
            sortedSelectors sortWith:interestingMethods.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2164
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2165
            interestingMethods do:[:aMethod |
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2166
                first ifFalse:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2167
                    privacy ~~ aMethod privacy ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2168
                        first := true.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2169
                        aStream nextPutLine:'</methods>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2170
                    ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2171
                ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2172
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2173
                privacy := aMethod privacy.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2174
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2175
                first ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2176
                    cat := aCategory.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2177
                    cat isNil ifTrue:[ cat := '' ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2178
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2179
                    aStream nextPutLine:'<methods>'.
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2180
                    aStream nextPutAll:'  <class-id>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2181
                    aStream nextPutAll:self name.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2182
                    aStream nextPutLine:'</class-id>'.
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2183
                    aStream nextPutAll:'  <category>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2184
                    aStream nextPutAll:cat.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2185
                    aStream nextPutLine:'</category>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2186
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2187
                    privacy ~~ #public ifTrue:[
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2188
                        aStream nextPutAll:'  <privacy>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2189
                        aStream nextPutAll:privacy.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2190
                        aStream nextPutLine:'</privacy>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2191
                    ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2192
                    first := false.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2193
                ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2194
                source := aMethod source.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2195
                source isNil ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2196
                    FileOutErrorSignal 
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2197
                        raiseRequestWith:self
6664
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2198
                        errorString:' - no source for method: ', (aMethod displayString)
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2199
                ] ifFalse:[
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2200
                    aStream nextPutAll:'  <body>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2201
                    self fileOutXMLString:source on:aStream.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2202
                    aStream nextPutLine:'</body>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2203
                ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2204
            ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2205
            aStream nextPutLine:'</methods>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2206
        ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2207
    ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2208
!
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2209
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2210
fileOutXMLMethod:aMethod on:aStream
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2211
    "file out a method in xml format onto aStream."
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2212
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2213
    |source privacy|
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2214
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2215
    privacy := aMethod privacy.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2216
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2217
    aStream nextPutLine:'<methods>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2218
    aStream nextPutAll:'  <class-id>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2219
    aStream nextPutAll:self name.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2220
    aStream nextPutLine:'</class-id>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2221
    aStream nextPutAll:'  <category>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2222
    aStream nextPutAll:(aMethod category ?'').
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2223
    aStream nextPutLine:'</category>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2224
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2225
    privacy ~~ #public ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2226
        aStream nextPutAll:'  <privacy>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2227
        aStream nextPutAll:privacy.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2228
        aStream nextPutLine:'</privacy>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2229
    ].
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2230
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2231
    source := aMethod source.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2232
    source isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2233
        FileOutErrorSignal 
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2234
            raiseRequestWith:self
6664
82c7c849b9a9 errorStrings when raising exceptions.
Stefan Vogel <sv@exept.de>
parents: 6660
diff changeset
  2235
            errorString:' - no source for method: ', (aMethod displayString)
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2236
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2237
        aStream nextPutAll:'  <body>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2238
        self fileOutXMLString:source on:aStream.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2239
        aStream nextPutLine:'  </body>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2240
    ].
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2241
    aStream nextPutLine:'</methods>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2242
!
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2243
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2244
fileOutXMLString:someString on:aStream
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2245
    "append an xml-escaped string to aStream."
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2246
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2247
    aStream nextPutAll:(XMLRepresenter escapedString:someString)
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2248
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2249
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2250
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2251
! !
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2252
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2253
!ClassDescription methodsFor:'printOut'!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2254
4648
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2255
nameWithNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2256
    "return my names printString, 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2257
     with nameSpace prefix (even if its the Smalltalk namespace)"
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2258
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2259
    |nm owner|
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2260
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2261
    (owner := self owningClass) notNil ifTrue:[
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2262
        ^ (owner nameWithNameSpacePrefix , '::' , self nameWithoutPrefix)
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2263
    ]. 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2264
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2265
    nm := self name.
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2266
    self nameSpace == Smalltalk ifTrue:[
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2267
        nm := 'Smalltalk::' , nm
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2268
    ].
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2269
    ^ nm
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2270
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2271
    "a public class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2272
     Array name                 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2273
     Array nameWithoutPrefix    
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2274
     Array nameWithoutNameSpacePrefix  
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2275
     Array nameWithNameSpacePrefix     
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2276
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2277
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2278
    "a private class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2279
     Method::MethodWhoInfo name                         
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2280
     Method::MethodWhoInfo nameWithoutPrefix            
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2281
     Method::MethodWhoInfo nameWithoutNameSpacePrefix   
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2282
     Method::MethodWhoInfo nameWithNameSpacePrefix   
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2283
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2284
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2285
    "a namespace class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2286
     CodingExamples::TopClass name                      
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2287
     CodingExamples::TopClass nameWithoutPrefix         
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2288
     CodingExamples::TopClass nameWithoutNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2289
     CodingExamples::TopClass nameWithNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2290
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2291
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2292
    "a private class in a namespace class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2293
     CodingExamples::TopClass::SubClass name   
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2294
     CodingExamples::TopClass::SubClass nameWithoutPrefix 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2295
     CodingExamples::TopClass::SubClass nameWithoutNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2296
     CodingExamples::TopClass::SubClass nameWithNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2297
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2298
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2299
    "Modified: 5.1.1997 / 18:22:57 / cg"
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2300
    "Created: 1.4.1997 / 16:20:13 / stefan"
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2301
!
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2302
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2303
nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2304
    "helper for fileOut and others - return my names printString, 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2305
     without any nameSpace prefix (but with owningClasses prefix)"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2306
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2307
    |nm owner|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2308
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2309
    nm := self nameWithoutPrefix.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2310
    (owner := self owningClass) isNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2311
	^ nm
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2312
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2313
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2314
    ^ (owner nameWithoutNameSpacePrefix , '::' , nm)
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2315
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2316
    "a public class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2317
     Array name                 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2318
     Array nameWithoutPrefix    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2319
     Array nameWithoutNameSpacePrefix 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2320
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2321
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2322
    "a private class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2323
     Method::MethodWhoInfo name                         
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2324
     Method::MethodWhoInfo nameWithoutPrefix            
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2325
     Method::MethodWhoInfo nameWithoutNameSpacePrefix   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2326
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2327
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2328
    "a namespace class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2329
     CodingExamples::TopClass name                      
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2330
     CodingExamples::TopClass nameWithoutPrefix         
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2331
     CodingExamples::TopClass nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2332
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2333
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2334
    "a private class in a namespace class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2335
     CodingExamples::TopClass::SubClass name   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2336
     CodingExamples::TopClass::SubClass nameWithoutPrefix 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2337
     CodingExamples::TopClass::SubClass nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2338
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2339
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2340
    "Modified: 5.1.1997 / 18:22:57 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2341
    "Created: 1.4.1997 / 16:20:13 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2342
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2343
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2344
nameWithoutPrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2345
    "helper for fileOut and others - return my names printString, 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2346
     without any owningClass or nameSpace prefix"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2347
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2348
    |nm idx|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2349
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2350
    nm := self name.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2351
    idx := nm lastIndexOf:$:.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2352
    idx == 0 ifTrue:[
7330
814899ddc043 code motion to Behavior
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
  2353
        ^ nm
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2354
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2355
    ^ nm copyFrom:idx+1.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2356
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2357
    "a public class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2358
     Array name                 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2359
     Array nameWithoutPrefix    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2360
     Array nameWithoutNameSpacePrefix 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2361
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2362
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2363
    "a private class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2364
     Method::MethodWhoInfo name                         
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2365
     Method::MethodWhoInfo nameWithoutPrefix            
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2366
     Method::MethodWhoInfo nameWithoutNameSpacePrefix   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2367
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2368
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2369
    "a namespace class:
7330
814899ddc043 code motion to Behavior
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
  2370
     Demos::WalkingGirl name                           
814899ddc043 code motion to Behavior
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
  2371
     Demos::WalkingGirl nameWithoutPrefix              
814899ddc043 code motion to Behavior
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
  2372
     Demos::WalkingGirl nameWithoutNameSpacePrefix     
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2373
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2374
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2375
    "a private class in a namespace class:
7330
814899ddc043 code motion to Behavior
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
  2376
     Demos::WalkingGirl::AnimationView name                        
814899ddc043 code motion to Behavior
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
  2377
     Demos::WalkingGirl::AnimationView nameWithoutPrefix           
814899ddc043 code motion to Behavior
Claus Gittinger <cg@exept.de>
parents: 7309
diff changeset
  2378
     Demos::WalkingGirl::AnimationView nameWithoutNameSpacePrefix  
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2379
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2380
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2381
    "Modified: 5.1.1997 / 18:23:14 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2382
    "Created: 1.4.1997 / 16:20:34 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2383
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2384
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2385
printClassNameOn:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2386
    "helper for fileOut - print my name.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2387
     Private classes always print their owning-class as nameSpace
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2388
     prefix; non-private ones print without, except if the
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2389
     FileOutNameSpaceQuery returns true. The last feature is used
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2390
     with changefile updates - here, the full name is wanted."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2391
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2392
    |nm|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2393
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2394
    Class fileOutNameSpaceQuerySignal query == false ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2395
        nm := self nameWithoutNameSpacePrefix
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2396
    ] ifFalse:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2397
        nm := self name.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2398
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2399
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2400
    aStream nextPutAll:nm.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2401
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2402
    "Modified: / 3.1.1997 / 20:41:26 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2403
    "Created: / 1.4.1997 / 16:06:57 / stefan"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2404
    "Modified: / 18.3.1999 / 18:17:21 / stefan"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2405
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2406
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2407
printHierarchyAnswerIndentOn:aStream
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2408
    "print my class hierarchy on aStream - return indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2409
     recursively calls itself to print superclass and use returned indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2410
     for my description - used in the browser"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2411
6394
492964c0fd9b instance variables should only be accessed by getters/setters
Claus Gittinger <cg@exept.de>
parents: 6393
diff changeset
  2412
    |indent nm superclass|
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2413
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2414
    indent := 0.
6394
492964c0fd9b instance variables should only be accessed by getters/setters
Claus Gittinger <cg@exept.de>
parents: 6393
diff changeset
  2415
    superclass := self superclass.
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2416
    (superclass notNil) ifTrue:[
6394
492964c0fd9b instance variables should only be accessed by getters/setters
Claus Gittinger <cg@exept.de>
parents: 6393
diff changeset
  2417
        indent := (superclass printHierarchyAnswerIndentOn:aStream) + 2
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2418
    ].
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2419
    aStream spaces:indent.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2420
    nm := self printNameInHierarchy.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2421
    aStream nextPutAll:nm; nextPutAll:' ('.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2422
    self printInstVarNamesOn:aStream indent:(indent + nm size + 2).
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2423
    aStream nextPutLine:')'.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2424
    ^ indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2425
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2426
    "Created: 22.3.1997 / 14:11:29 / cg"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2427
    "Modified: 22.3.1997 / 14:15:42 / cg"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2428
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2429
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2430
printHierarchyOn:aStream
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2431
    "print my class hierarchy on aStream"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2432
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2433
    self printHierarchyAnswerIndentOn:aStream
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2434
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2435
    "Created: 22.3.1997 / 14:11:13 / cg"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2436
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2437
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2438
printInstVarNamesOn:aStream indent:indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2439
    "print the instance variable names indented and breaking at line end"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2440
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2441
    self printNameArray:(self instVarNames) on:aStream indent:indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2442
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2443
    "Created: 22.3.1997 / 14:12:00 / cg"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2444
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2445
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2446
printNameArray:anArray on:aStream indent:indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2447
    "print an array of strings separated by spaces; when the stream
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2448
     defines a lineLength, break when this limit is reached; indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2449
     every line; used to printOut instance variable names"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2450
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2451
    |thisName nextName arraySize lenMax pos mustBreak line spaces|
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2452
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2453
    arraySize := anArray size.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2454
    arraySize ~~ 0 ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2455
	pos := indent.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2456
	lenMax := aStream lineLength.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2457
	thisName := anArray at:1.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2458
	line := ''.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2459
	1 to:arraySize do:[:index |
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2460
	    line := line , thisName.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2461
	    pos := pos + thisName size.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2462
	    (index == arraySize) ifFalse:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2463
		nextName := anArray at:(index + 1).
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2464
		mustBreak := false.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2465
		(lenMax > 0) ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2466
		    ((pos + nextName size) > lenMax) ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2467
			mustBreak := true
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2468
		    ]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2469
		].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2470
		mustBreak ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2471
		    aStream nextPutLine:line withTabs.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2472
		    spaces isNil ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2473
			spaces := String new:indent
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2474
		    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2475
		    line := spaces.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2476
		    pos := indent
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2477
		] ifFalse:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2478
		    line := line , ' '.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2479
		    pos := pos + 1
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2480
		].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2481
		thisName := nextName
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2482
	    ]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2483
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2484
	aStream nextPutAll:line withTabs
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2485
    ]
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2486
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2487
    "Modified: 9.11.1996 / 00:12:06 / cg"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2488
    "Created: 22.3.1997 / 14:12:12 / cg"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2489
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2490
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2491
printNameInHierarchy
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2492
    "return my name as printed in the hierarchy"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2493
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2494
    ^ self name
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2495
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2496
    "Created: 22.3.1997 / 14:15:36 / cg"
3230
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2497
!
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2498
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2499
printOutCategory:aCategory on:aPrintStream
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2500
    "print out all methods in aCategory on aPrintStream should be a PrintStream"
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2501
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2502
    |dict any|
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2503
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2504
    dict := self methodDictionary.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2505
    dict notNil ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2506
	any := false.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2507
	dict do:[:aMethod |
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2508
	    (aCategory = aMethod category) ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2509
		any := true
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2510
	    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2511
	].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2512
	any ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2513
	     aPrintStream italic.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2514
	     aPrintStream nextPutAll:aCategory.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2515
	     aPrintStream normal.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2516
	     aPrintStream cr; cr.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2517
	     dict do:[:aMethod |
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2518
		 (aCategory = aMethod category) ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2519
		     self printOutSource:(aMethod source) on:aPrintStream.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2520
		     aPrintStream cr; cr
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2521
		 ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2522
	     ].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2523
	     aPrintStream cr
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2524
	 ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2525
    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2526
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2527
    "Modified: / 12.6.1996 / 11:47:36 / stefan"
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2528
    "Created: / 28.1.1998 / 00:27:03 / cg"
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2529
!
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2530
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2531
printOutSource:aString on:aPrintStream
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2532
    "print out a source-string; the message-specification is printed bold,
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2533
     comments are printed italic"
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2534
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2535
    |text textIndex textSize line lineIndex lineSize inComment aCharacter|
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2536
    text := aString asStringCollection.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2537
    aPrintStream bold.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2538
    aPrintStream nextPutAll:(text at:1).
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2539
    aPrintStream normal.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2540
    aPrintStream cr.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2541
    inComment := false.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2542
    textSize := text size.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2543
    textIndex := 2.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2544
    [textIndex <= textSize] whileTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2545
	line := text at:textIndex.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2546
	((line occurrencesOf:Character doubleQuote) == 0) ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2547
	    aPrintStream nextPutAll:line
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2548
	] ifFalse:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2549
	    lineSize := line size.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2550
	    lineIndex := 1.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2551
	    [lineIndex <= lineSize] whileTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2552
		aCharacter := line at:lineIndex.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2553
		(aCharacter == Character doubleQuote) ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2554
		    inComment ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2555
			aPrintStream normal.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2556
			aPrintStream nextPut:aCharacter.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2557
			inComment := false
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2558
		    ] ifFalse:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2559
			aPrintStream nextPut:aCharacter.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2560
			aPrintStream italic.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2561
			inComment := true
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2562
		    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2563
		] ifFalse:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2564
		    aPrintStream nextPut:aCharacter
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2565
		].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2566
		lineIndex := lineIndex + 1
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2567
	    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2568
	].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2569
	aPrintStream cr.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2570
	textIndex := textIndex + 1
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2571
    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2572
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2573
    "Created: / 28.1.1998 / 00:27:25 / cg"
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2574
! !
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2575
92
0c73b48551ac *** empty log message ***
claus
parents: 88
diff changeset
  2576
!ClassDescription methodsFor:'printing & storing'!
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
  2577
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
  2578
displayString
293
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2579
    "return a string for display in inspectors"
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2580
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2581
    |nm more cat|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2582
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2583
    cat := self category.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2584
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2585
    (cat = 'obsolete'
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2586
    or:[cat = '* obsolete *']) ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2587
	"add obsolete - to make life easier ..."
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2588
	more := ' (obsolete)'
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
  2589
    ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2590
    (cat = 'removed'
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2591
    or:[cat = '* removed *']) ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2592
	"add removed - to make life easier ..."
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2593
	more := ' (removed)'
155
edd7fc34e104 *** empty log message ***
claus
parents: 92
diff changeset
  2594
    ].
293
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2595
1745
179abaf65cd6 print private classes nicer
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  2596
    self isPrivate ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2597
	nm := self nameWithoutPrefix.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2598
	more := ' (private in ' , self owningClass name , ')'.
1745
179abaf65cd6 print private classes nicer
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  2599
    ] ifFalse:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2600
	nm := self name.
1745
179abaf65cd6 print private classes nicer
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  2601
    ].
293
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2602
    more isNil ifTrue:[^ nm].
1652
a22f878fd71f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  2603
    ^ nm , more
a22f878fd71f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  2604
1757
c153e56cbcad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1745
diff changeset
  2605
    "Modified: 15.10.1996 / 20:01:30 / cg"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2606
    "Modified: 1.4.1997 / 15:49:13 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2607
! !
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2608
7258
9ccdbee7d1ad method category rename
Claus Gittinger <cg@exept.de>
parents: 7209
diff changeset
  2609
!ClassDescription methodsFor:'private-changes management'!
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2610
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2611
addChangeRecordForMethod:aMethod to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2612
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2613
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2614
    "append a method-change-record to aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2615
8161
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  2616
    self fileOutMethod:aMethod on:aStream
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2617
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2618
    "Created: 2.4.1997 / 17:31:46 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2619
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2620
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2621
addChangeRecordForMethodCategory:aMethod category:newCategory to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2622
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2623
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2624
    "append a methodCategory-change-record to aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2625
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2626
    |selector|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2627
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2628
    selector := aMethod selector.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2629
    selector notNil ifTrue:[
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2630
	aStream nextPutAll:'('.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2631
	self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2632
	aStream nextPutAll:(' compiledMethodAt:' , selector storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2633
	aStream nextPutAll:(') category:' , newCategory storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2634
	aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2635
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2636
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2637
    "Created: 2.4.1997 / 17:31:56 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2638
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2639
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2640
addChangeRecordForMethodPrivacy:aMethod to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2641
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2642
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2643
    "append a method-privacy-change-record to aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2644
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2645
    |selector|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2646
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2647
    selector := aMethod selector.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2648
    selector notNil ifTrue:[
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2649
	aStream nextPutAll:'('.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2650
	self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2651
	aStream nextPutAll:(' compiledMethodAt:' , selector storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2652
	aStream nextPutAll:(') privacy:' , aMethod privacy storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2653
	aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2654
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2655
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2656
    "Modified: 27.8.1995 / 22:59:56 / claus"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2657
    "Created: 2.4.1997 / 17:32:04 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2658
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2659
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2660
addChangeRecordForRemoveSelector:aSelector to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2661
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2662
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2663
    "append a method-remove-record to aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2664
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2665
    self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2666
    aStream nextPutAll:(' removeSelector:' , aSelector asSymbol storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2667
    aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2668
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2669
    "Modified: 1.7.1996 / 21:27:55 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2670
    "Created: 2.4.1997 / 17:32:31 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2671
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2672
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2673
addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2674
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2675
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2676
    "append a category-rename record to aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2677
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2678
    self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2679
    aStream nextPutAll:(' renameCategory:' , oldCategory storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2680
    aStream nextPutAll:(' to:' , newCategory storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2681
    aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2682
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2683
    "Created: 2.4.1997 / 17:32:44 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2684
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2685
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2686
addInfoRecord:aMessage to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2687
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2688
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2689
    "append an info-record (snapshot, class fileOut etc.) to aStream"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2690
8116
a463cc9f1572 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7960
diff changeset
  2691
    aStream nextPutAll:'''---- '; nextPutAll:aMessage; nextPutAll:' '.
a463cc9f1572 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 7960
diff changeset
  2692
    Date today printOn:aStream language:#en.        "/ MUST be english !!!!
7960
4273391649c8 info record must use english date
Claus Gittinger <cg@exept.de>
parents: 7952
diff changeset
  2693
    aStream nextPutAll:' '.
4273391649c8 info record must use english date
Claus Gittinger <cg@exept.de>
parents: 7952
diff changeset
  2694
    Time now printOn:aStream.
4273391649c8 info record must use english date
Claus Gittinger <cg@exept.de>
parents: 7952
diff changeset
  2695
    aStream nextPutAll:' ----'''.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2696
    aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2697
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2698
    "Created: 2.4.1997 / 17:33:42 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2699
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2700
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2701
writingChangeDo:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2702
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2703
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2704
    "common helper to write a change record.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2705
     Opens the changefile and executes aBlock passing the stream
2689
ada9b102abcf typo fix
Claus Gittinger <cg@exept.de>
parents: 2676
diff changeset
  2706
     as argument. WriteErrors are caught and will lead to a warning.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2707
     The changefile is not kept open, to force the change to go to disk
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2708
     as soon as possible - thus, in case of a crash, no changes should
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2709
     be lost due to buffering."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2710
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2711
    self writingChangeWithTimeStamp:true do:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2712
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2713
    "Modified: 18.11.1995 / 15:43:36 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2714
    "Created: 2.4.1997 / 17:32:57 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2715
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2716
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2717
writingChangePerform:aSelector with:anArgument
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2718
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2719
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2720
    self writingChangeWithTimeStamp:true perform:aSelector with:anArgument
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2721
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2722
    "Modified: 18.11.1995 / 15:44:53 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2723
    "Created: 2.4.1997 / 17:33:03 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2724
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2725
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2726
writingChangeWithTimeStamp:doStampIt do:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2727
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2728
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2729
    "common helper to write a change record.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2730
     Opens the changefile and executes aBlock passing the stream
2689
ada9b102abcf typo fix
Claus Gittinger <cg@exept.de>
parents: 2676
diff changeset
  2731
     as argument. WriteErrors are caught and will lead to a warning.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2732
     The changefile is not kept open, to force the change to go to disk
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2733
     as soon as possible - thus, in case of a crash, no changes should
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2734
     be lost due to buffering.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2735
     Access to the change file is serialized via the accessLock;
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2736
     this prevents the changefile to be corrupted when multiple users
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2737
     accept in the browser in a multi-display (or timesliced) configuration"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2738
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2739
    ChangeFileAccessLock critical:[
6423
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2740
        |aStream|
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2741
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2742
        FileOutNameSpaceQuerySignal answer:true
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2743
        do:[
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2744
            aStream := self changesStream.
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2745
            aStream notNil ifTrue:[
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2746
                [
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2747
                    FileStream writeErrorSignal handle:[:ex |
7209
790bd75579c0 #errorSignal -> #description
Stefan Vogel <sv@exept.de>
parents: 7163
diff changeset
  2748
                        self warn:('could not update the changes-file\\' , ex description) withCRs.
6423
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2749
                        ex return
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2750
                    ] do:[
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2751
                        doStampIt ifTrue:[
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2752
                            self addChangeTimeStampTo:aStream
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2753
                        ].
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2754
                        aBlock value:aStream.
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2755
                        aStream cr.
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2756
                    ].
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2757
                ] ensure:[
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2758
                    aStream close
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2759
                ]
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2760
            ]
e43f6e61bfaa #valueNowOrOnUnwindDo: -> #ensure:
Claus Gittinger <cg@exept.de>
parents: 6394
diff changeset
  2761
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2762
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2763
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2764
    "Modified: 22.3.1997 / 17:12:40 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2765
    "Created: 2.4.1997 / 17:33:09 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2766
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2767
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2768
writingChangeWithTimeStamp:stampIt perform:aSelector with:anArgument
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2769
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2770
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2771
    self writingChangeWithTimeStamp:stampIt do:[:stream |
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2772
	self perform:aSelector with:anArgument with:stream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2773
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2774
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2775
    "Created: 2.4.1997 / 17:33:16 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2776
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2777
7258
9ccdbee7d1ad method category rename
Claus Gittinger <cg@exept.de>
parents: 7209
diff changeset
  2778
!ClassDescription methodsFor:'private-helpers'!
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2779
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2780
addAllCategoriesTo:aCollection
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2781
    "helper - add categories and all superclasses categories
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2782
     to the argument, aCollection"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2783
6394
492964c0fd9b instance variables should only be accessed by getters/setters
Claus Gittinger <cg@exept.de>
parents: 6393
diff changeset
  2784
    |superclass|
492964c0fd9b instance variables should only be accessed by getters/setters
Claus Gittinger <cg@exept.de>
parents: 6393
diff changeset
  2785
492964c0fd9b instance variables should only be accessed by getters/setters
Claus Gittinger <cg@exept.de>
parents: 6393
diff changeset
  2786
    superclass := self superclass.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2787
    (superclass notNil) ifTrue:[
6394
492964c0fd9b instance variables should only be accessed by getters/setters
Claus Gittinger <cg@exept.de>
parents: 6393
diff changeset
  2788
        superclass addAllCategoriesTo:aCollection
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2789
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2790
    self addCategoriesTo:aCollection
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2791
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2792
    "Created: 1.4.1997 / 23:52:27 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2793
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2794
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2795
addCategoriesTo:aCollection
7163
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2796
    "helper - add categories to the argument, aCollection.
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2797
     aCollection should be a set."
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2798
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2799
    aCollection addAll:(self categories).
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2800
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2801
"/ no need for tuning;
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2802
"/ its only used in the browsers new-protocol function.
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2803
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2804
"/    |prevCat|
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2805
"/
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2806
"/    self methodDictionary do:[:aMethod |
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2807
"/        |cat|
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2808
"/
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2809
"/        cat := aMethod category.
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2810
"/        cat ~~ prevCat ifTrue:[
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2811
"/            aCollection add:cat.
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2812
"/            prevCat := cat.
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2813
"/        ].
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2814
"/    ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2815
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2816
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2817
!ClassDescription methodsFor:'protocol printOut'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2818
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2819
printOutCategoryProtocol:aCategory on:aPrintStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2820
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2821
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2822
    |dict any|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2823
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2824
    dict := self methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2825
    dict notNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2826
	any := false.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2827
	dict do:[:aMethod |
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2828
	    (aCategory = aMethod category) ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2829
		any := true
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2830
	    ]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2831
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2832
	any ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2833
	    aPrintStream italic.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2834
	    aPrintStream nextPutAll:aCategory.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2835
	    aPrintStream normal.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2836
	    aPrintStream cr; cr.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2837
	    dict do:[:aMethod |
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2838
		(aCategory = aMethod category) ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2839
		    self printOutMethodProtocol:aMethod on:aPrintStream.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2840
		    aPrintStream cr; cr
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2841
		]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2842
	    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2843
	    aPrintStream cr
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2844
	]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2845
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2846
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2847
    "Modified: 20.4.1996 / 18:20:26 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2848
    "Modified: 12.6.1996 / 11:48:46 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2849
    "Created: 2.4.1997 / 01:10:40 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2850
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2851
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2852
printOutMethodProtocol:aMethod on:aPrintStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2853
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2854
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2855
    "given the source in aString, print the methods message specification
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2856
     and any method comments - without source; used to generate documentation
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2857
     pages"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2858
7610
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2859
    |source comment|
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2860
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2861
    source := aMethod source asStringCollection.
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2862
    (source size < 1) ifTrue:[^self].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2863
    aPrintStream bold.
7610
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2864
    aPrintStream nextPutLine:(source at:1).
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2865
    (source size >= 2) ifTrue:[
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2866
        (comment := aMethod comment) notNil ifTrue:[
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2867
            aPrintStream italic.
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2868
            aPrintStream spaces:((source at:2) indexOfNonSeparatorStartingAt:1).
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2869
            aPrintStream nextPutLine:comment.
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2870
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2871
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2872
    aPrintStream normal
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2873
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2874
    "
7610
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2875
      Float printOutProtocolOn:Stdout
3d1547a93d91 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7606
diff changeset
  2876
      Float printOutMethodProtocol:(Float compiledMethodAt:#coerce:) on:Transcript
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2877
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2878
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2879
    "Modified: 9.11.1996 / 00:13:54 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2880
    "Created: 2.4.1997 / 01:11:00 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2881
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2882
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2883
!ClassDescription methodsFor:'queries'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2884
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2885
allCategories
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2886
    "Return a collection of all method-categories known in class
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2887
     and all superclasses. This does NOT include the metaclass categories.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2888
     The returned collection is not sorted by any order."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2889
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2890
    |coll|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2891
6930
0747e20bbdb0 faster allCategories
Claus Gittinger <cg@exept.de>
parents: 6827
diff changeset
  2892
    coll := Set new.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2893
    self addAllCategoriesTo:coll.
6930
0747e20bbdb0 faster allCategories
Claus Gittinger <cg@exept.de>
parents: 6827
diff changeset
  2894
    ^ coll asOrderedCollection
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2895
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2896
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2897
     Point categories  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2898
     Point allCategories 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2899
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2900
     Point class categories   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2901
     Point class allCategories  
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2902
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2903
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2904
    "Modified: 21.3.1996 / 16:28:57 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2905
    "Created: 1.4.1997 / 15:57:41 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2906
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2907
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2908
categories
7163
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2909
    "Return a collection of the method-categories known in the receiver class.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2910
     This does NOT include the metaclasses categories or the superclass categories.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2911
     The returned collection is not sorted by any order."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2912
5384
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2913
    |newList|
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2914
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2915
    newList := Set new.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2916
    self methodDictionary do:[:aMethod |
7163
5c0898fc5a36 code cleanup
Claus Gittinger <cg@exept.de>
parents: 7098
diff changeset
  2917
        newList add:(aMethod category ? '* no category *')
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2918
    ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2919
    ^ newList
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2920
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2921
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2922
     Point categories    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2923
     Point class categories  
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2924
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2925
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2926
    "Modified: 16.4.1996 / 18:06:11 / cg"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2927
    "Modified: 12.6.1996 / 11:25:59 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2928
    "Created: 1.4.1997 / 15:57:18 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2929
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2930
5554
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2931
isObsolete 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2932
    "return true, if the receiver is obsolete 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2933
     (i.e. has been replaced by a different class or was removed, 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2934
      but is still referenced by instanced)"
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2935
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2936
    |cat|
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2937
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2938
    cat := self category.
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2939
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2940
    ^ cat = 'obsolete' 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2941
      or:[cat = 'removed'
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2942
      or:[cat = '* removed *'
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2943
      or:[cat = '* obsolete *']]]
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2944
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2945
    "Modified: 10.9.1996 / 14:02:07 / cg"
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2946
    "Modified: 1.4.1997 / 15:49:49 / stefan"
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2947
!
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2948
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2949
sourceCodeForMethod:aMethod at:aSelector
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2950
    ^ aMethod source
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2951
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2952
    "Created: / 19.6.1998 / 02:28:09 / cg"
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2953
!
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2954
7658
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
  2955
topNameSpace
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
  2956
    "return the nameSpace of my topOwningClass (if private) or my own nameSpace."
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
  2957
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
  2958
    self isPrivate ifTrue:[^ self topOwningClass topNameSpace].
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
  2959
    ^ self nameSpace
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
  2960
!
b009bc99dd47 oops - Metaclass needs topNameSpace
Claus Gittinger <cg@exept.de>
parents: 7657
diff changeset
  2961
3616
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2962
whichCategoryIncludesSelector:aSelector
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2963
    "return the category under which the method for aSelector is
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2964
     classified"
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2965
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2966
    ^ (self compiledMethodAt:aSelector) category
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2967
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2968
    "Created: / 19.6.1998 / 00:25:48 / cg"
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2969
    "Modified: / 19.6.1998 / 01:00:07 / cg"
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2970
!
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2971
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2972
whichClassDefinesInstVar:aVariableName
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2973
    "return the class which defines the instance variable
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2974
     named aVariableName. This method should not be used for
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2975
     repeated searches (i.e. in the compiler/parser), since it creates
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2976
     many throw away intermediate objects."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2977
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2978
    |cls|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2979
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2980
    cls := self.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2981
    [cls notNil] whileTrue:[
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2982
	(cls instVarNames includes:aVariableName) ifTrue:[ ^ cls].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2983
	cls := cls superclass
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2984
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2985
    ^ nil
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2986
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2987
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2988
     StandardSystemView whichClassDefinesInstVar:'label'  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2989
     StandardSystemView whichClassDefinesInstVar:'paint'  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2990
     StandardSystemView whichClassDefinesInstVar:'foo'  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2991
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2992
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2993
    "Created: 2.4.1997 / 01:12:27 / stefan"
2701
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2994
!
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2995
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2996
whichSelectorsAccess:instVarName
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2997
    "return a collection of selectors for methods which access
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2998
     an instance variable"
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2999
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  3000
    |set|
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  3001
6229
e79f4aeff134 dont search in whichSelectorsAccess,
Claus Gittinger <cg@exept.de>
parents: 6216
diff changeset
  3002
    (self instVarNames includes:instVarName) ifFalse:[
e79f4aeff134 dont search in whichSelectorsAccess,
Claus Gittinger <cg@exept.de>
parents: 6216
diff changeset
  3003
        ^ #()
e79f4aeff134 dont search in whichSelectorsAccess,
Claus Gittinger <cg@exept.de>
parents: 6216
diff changeset
  3004
    ].
e79f4aeff134 dont search in whichSelectorsAccess,
Claus Gittinger <cg@exept.de>
parents: 6216
diff changeset
  3005
2701
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  3006
    set := IdentitySet new.
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  3007
    self selectorsAndMethodsDo:[:sel :mthd |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  3008
        (mthd accessedInstVars includes:instVarName) ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  3009
            set add:sel
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  3010
        ]
2701
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  3011
    ].
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  3012
    ^ set.
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  3013
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  3014
    "Created: 19.6.1997 / 17:51:50 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3015
! !
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3016
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3017
!ClassDescription methodsFor:'special accessing'!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3018
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3019
setInstanceVariableString:aString
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3020
    "set the classes instvarnames string - no recompilation
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3021
     or updates are done and no changeList records are written.
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3022
     This is NOT for general use."
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3023
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3024
    instvars := aString.
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3025
! !
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  3026
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3027
!ClassDescription methodsFor:'subclass creation'!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3028
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3029
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3030
    "create a new class as a subclass of an existing class (the receiver).
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3031
     The subclass will have indexed variables if the receiving-class has."
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3032
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3033
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3034
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3035
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3036
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3037
    self isVariable ifFalse:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3038
        ^ self class
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3039
            name:nameSymbol  
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3040
            inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3041
            subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3042
            instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3043
            variable:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3044
            words:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3045
            pointers:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3046
            classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3047
            poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3048
            category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3049
            comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3050
            changed:true 
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3051
    ].
2435
08f60d7c2c11 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  3052
    ^ self 
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3053
        perform:(self definitionSelector)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3054
        withArguments:(Array with:nameSymbol 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3055
                           with:instVarNameString 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3056
                           with:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3057
                           with:pool 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3058
                           with:cat).
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3059
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3060
    "Modified: / 8.3.1997 / 00:41:08 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3061
    "Modified: / 18.3.1999 / 18:18:25 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3062
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3063
6817
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3064
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat classInstanceVariableNames:classInstanceVariableNames
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3065
    "create a new class as a subclass of an existing class (the receiver).
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3066
     The subclass will have indexed variables if the receiving-class has."
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3067
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3068
    self isLoaded ifFalse:[
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3069
        ^ self loadAndResendMessage
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3070
    ].
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3071
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3072
    ^ self class
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3073
        name:nameSymbol  
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3074
        inEnvironment:(Class nameSpaceQuerySignal query)
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3075
        subclassOf:self
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3076
        instanceVariableNames:instVarNameString
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3077
        variable:false
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3078
        words:true
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3079
        pointers:true
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3080
        classVariableNames:classVarString
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3081
        poolDictionaries:pool
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3082
        category:cat
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3083
        comment:nil
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3084
        changed:true 
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3085
        classInstanceVariableNames:classInstanceVariableNames
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3086
!
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3087
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3088
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat inEnvironment:aNameSpace
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3089
    "create a new class as a subclass of an existing class (the receiver).
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3090
     The subclass will have indexed variables if the receiving-class has."
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3091
3977
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3092
    |rslt|
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3093
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3094
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3095
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3096
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3097
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3098
    self isVariable ifTrue:[
3977
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3099
        Class nameSpaceQuerySignal answer:aNameSpace
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3100
        do:[
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3101
            rslt := self
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3102
                subclass:nameSymbol 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3103
                instanceVariableNames:instVarNameString 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3104
                classVariableNames:classVarString 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3105
                poolDictionaries:pool 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3106
                category:cat 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3107
        ].
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3108
        ^ rslt
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3109
    ].
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3110
    ^ self class
3977
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3111
        name:nameSymbol  
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3112
        inEnvironment:aNameSpace
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3113
        subclassOf:self
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3114
        instanceVariableNames:instVarNameString
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3115
        variable:false
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3116
        words:true
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3117
        pointers:true
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3118
        classVariableNames:classVarString
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3119
        poolDictionaries:pool
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3120
        category:cat
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3121
        comment:nil
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  3122
        changed:true
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3123
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3124
    "Created: 8.2.1997 / 19:41:44 / cg"
2893
8ba406da6b22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
  3125
    "Modified: 31.8.1997 / 07:48:14 / cg"
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3126
!
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  3127
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3128
variableByteSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3129
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3130
     in which the subclass has indexable byte-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3131
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3132
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3133
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3134
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3135
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3136
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3137
        self isBytes ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3138
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3139
                'cannot make a variable byte subclass of a variable non-byte class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3140
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3141
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3142
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3143
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3144
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3145
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3146
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3147
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3148
        variable:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3149
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3150
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3151
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3152
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3153
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3154
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3155
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3156
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3157
    "Created: / 12.10.1996 / 19:18:18 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3158
    "Modified: / 6.11.1996 / 22:48:18 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3159
    "Modified: / 18.3.1999 / 18:18:38 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3160
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3161
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3162
variableDoubleSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3163
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3164
     in which the subclass has indexable double-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3165
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3166
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3167
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3168
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3169
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3170
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3171
        self isDoubles ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3172
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3173
                'cannot make a variable double subclass of a variable non-double class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3174
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3175
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3176
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3177
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3178
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3179
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3180
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3181
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3182
        variable:#double 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3183
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3184
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3185
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3186
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3187
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3188
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3189
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3190
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3191
    "Created: / 12.10.1996 / 19:18:21 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3192
    "Modified: / 6.11.1996 / 22:48:22 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3193
    "Modified: / 18.3.1999 / 18:18:54 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3194
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3195
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3196
variableFloatSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3197
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3198
     in which the subclass has indexable float-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3199
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3200
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3201
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3202
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3203
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3204
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3205
        self isFloats ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3206
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3207
                'cannot make a variable float subclass of a variable non-float class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3208
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3209
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3210
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3211
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3212
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3213
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3214
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3215
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3216
        variable:#float 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3217
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3218
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3219
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3220
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3221
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3222
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3223
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3224
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3225
    "Created: / 12.10.1996 / 19:18:24 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3226
    "Modified: / 6.11.1996 / 22:48:26 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3227
    "Modified: / 18.3.1999 / 18:19:02 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3228
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3229
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3230
variableLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3231
    "create a new class as a subclass of an existing class (the receiver) 
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3232
     in which the subclass has indexable unsigned long-long-sized nonpointer variables"
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3233
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3234
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3235
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3236
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3237
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3238
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3239
        self isLongLongs ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3240
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3241
                'cannot make a variable long-long subclass of a variable non-long-long class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3242
        ].
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3243
    ].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3244
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3245
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3246
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3247
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3248
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3249
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3250
        variable:#longLong
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3251
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3252
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3253
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3254
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3255
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3256
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3257
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3258
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3259
    "Modified: / 18.3.1999 / 18:19:17 / stefan"
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3260
!
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3261
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3262
variableLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3263
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3264
     in which the subclass has indexable long-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3265
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3266
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3267
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3268
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3269
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3270
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3271
        self isLongs ifFalse:[
7952
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3272
            self isBytes ifFalse:[
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3273
                ^ self error:
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3274
                    'cannot make a variable long subclass of a variable non-long class'
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3275
            ].
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3276
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3277
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3278
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3279
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3280
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3281
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3282
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3283
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3284
        variable:#long 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3285
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3286
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3287
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3288
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3289
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3290
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3291
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3292
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3293
    "Created: / 12.10.1996 / 19:18:27 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3294
    "Modified: / 6.11.1996 / 22:48:29 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3295
    "Modified: / 18.3.1999 / 18:19:28 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3296
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3297
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3298
variableSignedLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3299
    "create a new class as a subclass of an existing class (the receiver) 
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3300
     in which the subclass has indexable signed long-long-sized nonpointer variables"
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3301
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3302
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3303
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3304
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3305
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3306
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3307
        self isSignedLongLongs ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3308
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3309
                'cannot make a variable signed long-long subclass of a variable non-long-long class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3310
        ].
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3311
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3312
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3313
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3314
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3315
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3316
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3317
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3318
        variable:#signedLongLong
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3319
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3320
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3321
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3322
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3323
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3324
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3325
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3326
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3327
    "Modified: / 18.3.1999 / 18:19:35 / stefan"
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3328
!
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3329
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3330
variableSignedLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3331
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3332
     in which the subclass has indexable signed long-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3333
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3334
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3335
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3336
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3337
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3338
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3339
        self isSignedLongs ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3340
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3341
                'cannot make a variable signed long subclass of a variable non-long class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3342
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3343
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3344
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3345
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3346
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3347
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3348
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3349
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3350
        variable:#signedLong
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3351
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3352
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3353
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3354
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3355
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3356
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3357
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3358
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3359
    "Created: / 12.10.1996 / 19:18:31 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3360
    "Modified: / 6.11.1996 / 22:48:32 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3361
    "Modified: / 18.3.1999 / 18:19:41 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3362
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3363
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3364
variableSignedWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3365
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3366
     in which the subclass has indexable word-sized signed nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3367
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3368
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3369
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3370
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3371
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3372
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3373
        self isSignedWords ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3374
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3375
                'cannot make a variable signed word subclass of a variable non-word class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3376
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3377
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3378
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3379
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3380
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3381
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3382
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3383
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3384
        variable:#signedWord
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3385
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3386
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3387
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3388
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3389
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3390
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3391
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3392
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3393
    "Created: / 12.10.1996 / 19:18:34 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3394
    "Modified: / 6.11.1996 / 22:48:35 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3395
    "Modified: / 18.3.1999 / 18:19:51 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3396
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3397
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3398
variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3399
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3400
     in which the subclass has indexable pointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3401
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3402
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3403
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3404
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3405
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3406
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3407
        self isPointers ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3408
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3409
                'cannot make a variable pointer subclass of a variable non-pointer class'
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3410
        ]
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3411
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3412
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3413
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3414
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3415
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3416
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3417
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3418
        variable:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3419
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3420
        pointers:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3421
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3422
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3423
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3424
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3425
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3426
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3427
    "Created: / 12.10.1996 / 19:18:37 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3428
    "Modified: / 6.11.1996 / 22:48:40 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3429
    "Modified: / 18.3.1999 / 18:20:01 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3430
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3431
6817
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3432
variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat classInstanceVariableNames:classInstanceVariableNames
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3433
    "create a new class as a subclass of an existing class (the receiver) 
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3434
     in which the subclass has indexable pointer variables"
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3435
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3436
    self isLoaded ifFalse:[
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3437
        ^ self loadAndResendMessage
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3438
    ].
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3439
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3440
    self isVariable ifTrue:[
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3441
        self isPointers ifFalse:[
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3442
            ^ self error:
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3443
                'cannot make a variable pointer subclass of a variable non-pointer class'
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3444
        ]
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3445
    ].
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3446
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3447
    ^ self class
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3448
        name:nameSymbol
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3449
        inEnvironment:(Class nameSpaceQuerySignal query)
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3450
        subclassOf:self
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3451
        instanceVariableNames:instVarNameString
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3452
        variable:true
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3453
        words:false
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3454
        pointers:true
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3455
        classVariableNames:classVarString
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3456
        poolDictionaries:pool
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3457
        category:cat
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3458
        comment:nil
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3459
        changed:true
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3460
        classInstanceVariableNames:classInstanceVariableNames
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3461
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3462
    "Created: / 12.10.1996 / 19:18:37 / cg"
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3463
    "Modified: / 6.11.1996 / 22:48:40 / cg"
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3464
    "Modified: / 18.3.1999 / 18:20:01 / stefan"
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3465
!
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  3466
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3467
variableWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool category:cat
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3468
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3469
     in which the subclass has indexable word-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3470
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3471
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3472
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3473
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3474
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3475
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3476
        self isWords ifFalse:[
7952
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3477
            self isBytes ifFalse:[
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3478
                ^ self error:
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3479
                    'cannot make a variable word subclass of a variable non-word class'
618e23162d68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 7658
diff changeset
  3480
            ]
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3481
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3482
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3483
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3484
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3485
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3486
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3487
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3488
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3489
        variable:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3490
        words:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3491
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3492
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3493
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3494
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3495
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3496
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3497
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3498
    "Created: / 12.10.1996 / 19:18:40 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3499
    "Modified: / 6.11.1996 / 22:48:43 / cg"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3500
    "Modified: / 18.3.1999 / 18:20:07 / stefan"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3501
! !
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3502
7262
afae1fcdc14e method category rename
Claus Gittinger <cg@exept.de>
parents: 7261
diff changeset
  3503
!ClassDescription methodsFor:'subclass creation-private classes'!
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3504
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3505
subclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3506
    "create a new class as a subclass of an existing class (the receiver).
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3507
     The subclass will have indexed variables if the receiving-class has."
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3508
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3509
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3510
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3511
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3512
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3513
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3514
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3515
    self isVariable ifFalse:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3516
        newClass := self class
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3517
            name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3518
            inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3519
            subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3520
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3521
            variable:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3522
            words:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3523
            pointers:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3524
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3525
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3526
            category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3527
            comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3528
            changed:true.
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3529
        ^ newClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3530
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3531
    self isBytes ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3532
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3533
            variableByteSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3534
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3535
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3536
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3537
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3538
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3539
    self isLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3540
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3541
            variableLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3542
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3543
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3544
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3545
            privateIn:aClass
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3546
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3547
    self isLongLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3548
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3549
            variableLongLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3550
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3551
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3552
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3553
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3554
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3555
    self isFloats ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3556
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3557
            variableFloatSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3558
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3559
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3560
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3561
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3562
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3563
    self isDoubles ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3564
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3565
            variableDoubleSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3566
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3567
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3568
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3569
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3570
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3571
    self isWords ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3572
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3573
            variableWordSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3574
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3575
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3576
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3577
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3578
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3579
    self isSignedWords ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3580
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3581
            variableSignedWordSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3582
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3583
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3584
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3585
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3586
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3587
    self isSignedLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3588
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3589
            variableSignedLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3590
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3591
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3592
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3593
            privateIn:aClass
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3594
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3595
    self isSignedLongLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3596
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3597
            variableSignedLongLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3598
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3599
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3600
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3601
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3602
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3603
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3604
    ^ self
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3605
        variableSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3606
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3607
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3608
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3609
        privateIn:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3610
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3611
    "Created: / 11.10.1996 / 16:30:53 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3612
    "Modified: / 4.7.1999 / 18:42:31 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3613
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3614
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3615
variableByteSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3616
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3617
     in which the subclass has indexable byte-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3618
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3619
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3620
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3621
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3622
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3623
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3624
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3625
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3626
        self isBytes ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3627
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3628
                'cannot make a variable byte subclass of a variable non-byte class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3629
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3630
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3631
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3632
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3633
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3634
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3635
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3636
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3637
        variable:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3638
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3639
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3640
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3641
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3642
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3643
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3644
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3645
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3646
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3647
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3648
    "Created: / 11.10.1996 / 16:31:27 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3649
    "Modified: / 4.7.1999 / 18:42:36 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3650
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3651
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3652
variableDoubleSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3653
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3654
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3655
     in which the subclass has indexable double-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3656
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3657
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3658
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3659
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3660
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3661
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3662
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3663
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3664
        self isDoubles ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3665
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3666
                'cannot make a variable double subclass of a variable non-double class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3667
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3668
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3669
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3670
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3671
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3672
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3673
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3674
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3675
        variable:#double 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3676
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3677
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3678
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3679
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3680
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3681
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3682
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3683
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3684
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3685
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3686
    "Created: / 11.10.1996 / 16:32:23 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3687
    "Modified: / 4.7.1999 / 18:42:41 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3688
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3689
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3690
variableFloatSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3691
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3692
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3693
     in which the subclass has indexable float-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3694
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3695
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3696
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3697
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3698
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3699
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3700
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3701
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3702
        self isFloats ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3703
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3704
                'cannot make a variable float subclass of a variable non-float class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3705
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3706
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3707
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3708
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3709
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3710
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3711
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3712
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3713
        variable:#float 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3714
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3715
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3716
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3717
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3718
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3719
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3720
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3721
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3722
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3723
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3724
    "Created: / 11.10.1996 / 16:32:37 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3725
    "Modified: / 4.7.1999 / 18:42:45 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3726
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3727
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3728
variableLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3729
    "create a new class as a subclass of an existing class (the receiver) 
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3730
     in which the subclass has indexable longlong-sized nonpointer variables"
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3731
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3732
    |newClass|
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3733
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3734
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3735
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3736
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3737
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3738
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3739
        self isLongLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3740
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3741
                'cannot make a variable longlong subclass of a variable non-longlong class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3742
        ].
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3743
    ].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3744
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3745
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3746
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3747
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3748
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3749
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3750
        variable:#longLong 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3751
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3752
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3753
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3754
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3755
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3756
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3757
        changed:true.
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3758
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3759
    ^ newClass
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3760
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3761
    "Created: / 11.10.1996 / 16:32:48 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3762
    "Modified: / 4.7.1999 / 18:42:49 / cg"
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3763
!
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3764
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3765
variableLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3766
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3767
     in which the subclass has indexable long-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3768
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3769
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3770
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3771
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3772
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3773
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3774
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3775
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3776
        self isLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3777
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3778
                'cannot make a variable long subclass of a variable non-long class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3779
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3780
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3781
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3782
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3783
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3784
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3785
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3786
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3787
        variable:#long 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3788
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3789
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3790
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3791
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3792
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3793
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3794
        changed:true.
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3795
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3796
    ^ newClass
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3797
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3798
    "Created: / 11.10.1996 / 16:32:48 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3799
    "Modified: / 4.7.1999 / 18:42:53 / cg"
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3800
!
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3801
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3802
variableSignedLongLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3803
    "create a new class as a subclass of an existing class (the receiver) 
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3804
     in which the subclass has indexable signed longlong-sized nonpointer variables"
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3805
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3806
    |newClass|
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3807
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3808
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3809
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3810
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3811
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3812
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3813
        self isSignedLongLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3814
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3815
                'cannot make a variable signed longlong subclass of a variable non-longlong class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3816
        ].
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3817
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3818
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3819
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3820
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3821
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3822
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3823
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3824
        variable:#signedLongLong
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3825
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3826
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3827
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3828
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3829
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3830
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3831
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3832
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3833
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3834
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3835
    "Created: / 11.10.1996 / 16:46:30 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3836
    "Modified: / 4.7.1999 / 18:42:57 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3837
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3838
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3839
variableSignedLongSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3840
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3841
     in which the subclass has indexable signed long-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3842
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3843
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3844
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3845
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3846
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3847
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3848
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3849
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3850
        self isSignedLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3851
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3852
                'cannot make a variable signed long subclass of a variable non-long class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3853
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3854
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3855
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3856
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3857
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3858
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3859
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3860
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3861
        variable:#signedLong
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3862
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3863
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3864
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3865
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3866
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3867
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3868
        changed:true.
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3869
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3870
    ^ newClass
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3871
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3872
    "Created: / 11.10.1996 / 16:46:30 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3873
    "Modified: / 4.7.1999 / 18:43:03 / cg"
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3874
!
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3875
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3876
variableSignedWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3877
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3878
     in which the subclass has indexable word-sized signed nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3879
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3880
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3881
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3882
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3883
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3884
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3885
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3886
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3887
        self isSignedWords ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3888
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3889
                'cannot make a variable signed word subclass of a variable non-word class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3890
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3891
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3892
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3893
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3894
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3895
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3896
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3897
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3898
        variable:#signedWord
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3899
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3900
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3901
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3902
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3903
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3904
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3905
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3906
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3907
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3908
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3909
    "Created: / 11.10.1996 / 16:46:44 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3910
    "Modified: / 4.7.1999 / 18:43:06 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3911
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3912
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3913
variableSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3914
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3915
     in which the subclass has indexable pointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3916
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3917
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3918
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3919
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3920
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3921
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3922
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3923
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3924
        self isPointers ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3925
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3926
                'cannot make a variable pointer subclass of a variable non-pointer class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3927
        ]
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3928
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3929
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3930
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3931
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3932
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3933
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3934
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3935
        variable:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3936
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3937
        pointers:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3938
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3939
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3940
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3941
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3942
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3943
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3944
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3945
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3946
    "Created: / 11.10.1996 / 16:54:33 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3947
    "Modified: / 4.7.1999 / 18:43:10 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3948
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3949
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3950
variableWordSubclass:nameSymbol instanceVariableNames:instVarNameString classVariableNames:classVarString poolDictionaries:pool privateIn:aClass 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3951
    "create a new class as a subclass of an existing class (the receiver) 
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3952
     in which the subclass has indexable word-sized nonpointer variables"
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3953
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3954
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3955
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3956
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3957
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3958
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3959
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3960
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3961
        self isWords ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3962
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3963
                'cannot make a variable word subclass of a variable non-word class'
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3964
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3965
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3966
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3967
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3968
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3969
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3970
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3971
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3972
        variable:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3973
        words:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3974
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3975
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3976
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3977
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3978
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3979
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3980
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3981
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3982
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3983
    "Created: / 11.10.1996 / 16:54:48 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3984
    "Modified: / 4.7.1999 / 18:43:18 / cg"
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3985
! !
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3986
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3987
!ClassDescription::PackageRedefinition methodsFor:'default actions'!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3988
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3989
defaultAction
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3990
    "the default action is to return #keep."
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3991
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3992
    ^ #keep
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3993
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3994
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3995
! !
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3996
5750
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3997
!ClassDescription::MethodRedefinitionNotification methodsFor:'queries'!
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3998
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  3999
description
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4000
    ^ 'attempt to redefine method from different package'
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4001
! !
4b3eae08b84b preserve method-packages when recompiling
Claus Gittinger <cg@exept.de>
parents: 5725
diff changeset
  4002
5725
00c2d5e78792 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 5722
diff changeset
  4003
!ClassDescription::ClassRedefinitionNotification methodsFor:'queries'!
00c2d5e78792 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 5722
diff changeset
  4004
00c2d5e78792 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 5722
diff changeset
  4005
description
00c2d5e78792 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 5722
diff changeset
  4006
    ^ 'attempt to redefine class from different package'
00c2d5e78792 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 5722
diff changeset
  4007
! !
00c2d5e78792 method category: and package: now send change notifications.
Claus Gittinger <cg@exept.de>
parents: 5722
diff changeset
  4008
1740
baa0d76a9c68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
  4009
!ClassDescription class methodsFor:'documentation'!
662
df7953db3847 version method at the end
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  4010
df7953db3847 version method at the end
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  4011
version
8161
30b8f55fdff1 changes-stream is now utf-8 encoded.
ca
parents: 8116
diff changeset
  4012
    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.165 2004-03-12 09:14:09 ca Exp $'
662
df7953db3847 version method at the end
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  4013
! !
6817
38ba205151c5 Dolphin compatibility
Claus Gittinger <cg@exept.de>
parents: 6746
diff changeset
  4014
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  4015
ClassDescription initialize!