ClassDescription.st
author Claus Gittinger <cg@exept.de>
Tue, 26 Sep 2000 14:41:53 +0200
changeset 5631 d0965449b419
parent 5581 7bef1c75fb06
child 5636 eab6a71fb3d0
permissions -rw-r--r--
added #addInstVarName & #removeInstVarName (for refactory browser & VW compatibility)
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
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    19
		UpdateChangeFileQuerySignal TryLocalSourceFirst
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    20
		ChangeFileAccessLock NameSpaceQuerySignal PackageQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    21
		UsedNameSpaceQuerySignal CreateNameSpaceQuerySignal
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
    22
		FileOutNameSpaceQuerySignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
    23
		ChangeDefaultApplicationNotificationSignal
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
    24
		DefaultApplicationQuerySignal
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
    25
		ClassConventionViolationConfirmationQuerySignal MethodHistory
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
    26
		MethodHistorySize'
1091
2c5955064bbd added #isObsolete
ca
parents: 905
diff changeset
    27
	poolDictionaries:''
2c5955064bbd added #isObsolete
ca
parents: 905
diff changeset
    28
	category:'Kernel-Classes'
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    29
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
    30
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    31
Notification subclass:#PackageRedefinition
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    32
	instanceVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    33
	classVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    34
	poolDictionaries:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    35
	privateIn:ClassDescription
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    36
!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    37
5554
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
    38
ClassDescription::PackageRedefinition subclass:#ClassRedefinitionNotification
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    39
	instanceVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    40
	classVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    41
	poolDictionaries:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    42
	privateIn:ClassDescription
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    43
!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    44
5554
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
    45
ClassDescription::PackageRedefinition subclass:#MethodRedefinitionNotification
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    46
	instanceVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    47
	classVariableNames:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    48
	poolDictionaries:''
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    49
	privateIn:ClassDescription
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    50
!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
    51
1740
baa0d76a9c68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
    52
!ClassDescription class methodsFor:'documentation'!
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    53
88
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    54
copyright
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    55
"
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    56
 COPYRIGHT (c) 1993 by Claus Gittinger
155
edd7fc34e104 *** empty log message ***
claus
parents: 92
diff changeset
    57
	      All Rights Reserved
88
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    58
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    59
 This software is furnished under a license and may be used
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    60
 only in accordance with the terms of that license and with the
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    61
 inclusion of the above copyright notice.   This software may not
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    62
 be provided or otherwise made available to, or used by, any
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    63
 other person.  No title to or ownership of the software is
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    64
 hereby transferred.
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    65
"
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    66
!
81dacba7a63a *** empty log message ***
claus
parents: 77
diff changeset
    67
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
    68
documentation
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
    69
"
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    70
    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
    71
    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
    72
    for Metaclass and Class.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    73
    Subclasses must define the #name, #category and #comment methods.
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
    74
1292
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
    75
    [Instance variables:]
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
    76
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    77
        instvars        <String>            the names of the instance variables
905
75bf79eb2314 commentary
Claus Gittinger <cg@exept.de>
parents: 662
diff changeset
    78
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    79
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    80
    [Class variables:]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
    81
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    82
        UpdatingChanges <Boolean>       true if the changes-file shall be updated
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    83
                                        (except during startup and when filing in, this flag
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    84
                                         is usually true)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    85
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    86
        UpdateChangeFileQuerySignal     used as an upQuery from the change management.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    87
                                        Whenever a changeRecord is to be written,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    88
                                        this signal is raised and a handler (if present)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    89
                                        is supposed to return true or false.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    90
                                        If unhandled, the value of the global
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    91
                                        UpdatingChanges is returned for backward
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    92
                                        compatibility (which means that the old
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    93
                                        mechanism is used if no query-handler
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    94
                                        is present).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    95
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    96
        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
    97
                                        Required when multiple users operate on a common
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    98
                                        change file.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
    99
                                        This is an experimental new feature, being evaluated.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   100
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   101
        FileOutErrorSignal              raised when an error occurs during fileOut
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   102
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   103
        CatchMethodRedefinitions        if true, classes protect themself 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   104
        MethodRedefinitionSignal        (by raising MethodRedefinitionSignal)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   105
                                        from redefining any existing methods,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   106
                                        which are defined in another package.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   107
                                        (i.e. a signal will be raised, if you
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   108
                                         fileIn something which redefines an
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   109
                                         existing method and the packages do not
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   110
                                         match).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   111
                                        The default is (currently) true.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   112
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   113
        TryLocalSourceFirst             If true, local source files are tried
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   114
                                        first BEFORE the sourceCodeManager is
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   115
                                        consulted. If false, the sourceCodeManager
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   116
                                        is asked first.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   117
                                        Should be turned on, if you run an image from
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   118
                                        local sources which have not yet been checked in.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   119
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   120
        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
   121
                                        which new classes are to be installed.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   122
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   123
        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
   124
                                        which new classes/methods are to be marked.
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
        CreateNameSpaceQuerySignal      used as an upQuery to ask if unknown namespaces
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   127
                                        should be silently created (without asking the user)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   128
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   129
        MethodHistory                   if nonNil, this must be an OrderedCollection,
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   130
                                        which is filled with method->previousversionMethod
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   131
                                        associations. Can be used for undo-last-method-change
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   132
                                        The number of remembered methods is controlled via the
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   133
                                        UserPreferences.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   134
                                        Notice: this may fillup your memory over time,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   135
                                        the preferences are set too high.
1292
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
   136
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   137
        MethodHistorySize               the size of the methodHistory
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   138
                                        (nil: unlimited)
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   139
1292
89497fff7f87 documentation
Claus Gittinger <cg@exept.de>
parents: 1266
diff changeset
   140
    [author:]
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   141
        Claus Gittinger
1669
4951596746f7 comments & code cleanup
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
   142
4951596746f7 comments & code cleanup
Claus Gittinger <cg@exept.de>
parents: 1652
diff changeset
   143
    [see also:]
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   144
        Behavior Class Metaclass
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
   145
"
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
   146
! !
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   147
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   148
!ClassDescription class methodsFor:'initialization'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   149
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   150
initialize
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   151
    "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
   152
     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
   153
     (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
   154
     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
   155
     
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   156
    UpdatingChanges := true.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   157
    LockChangesFile := false.
3603
ba736c503cb9 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 3596
diff changeset
   158
    CatchMethodRedefinitions := CatchClassRedefinitions := true.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   159
    TryLocalSourceFirst := false.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   160
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   161
    FileOutErrorSignal isNil ifTrue:[
4049
9ae11122b8a2 FileoutErrorSignal is proceedable.
Stefan Vogel <sv@exept.de>
parents: 3977
diff changeset
   162
        FileOutErrorSignal := ErrorSignal newSignalMayProceed:true.
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   163
        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
   164
        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
   165
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   166
"/        MethodRedefinitionSignal := QuerySignal new.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   167
"/        MethodRedefinitionSignal nameClass:self message:#methodRedefinitionSignal.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   168
"/        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
   169
"/        MethodRedefinitionSignal defaultAnswer:#keep.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   170
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   171
"/        ClassRedefinitionSignal := QuerySignal new.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   172
"/        ClassRedefinitionSignal nameClass:self message:#classRedefinitionSignal.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   173
"/        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
   174
"/        ClassRedefinitionSignal defaultAnswer:#keep.
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   175
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   176
        UpdateChangeFileQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   177
        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
   178
        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
   179
        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
   180
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   181
        NameSpaceQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   182
        NameSpaceQuerySignal nameClass:self message:#nameSpaceQuerySignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   183
        NameSpaceQuerySignal notifierString:'asking for nameSpace'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   184
        NameSpaceQuerySignal handlerBlock:[:ex | ex proceedWith:Smalltalk defaultNameSpace].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   185
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   186
        UsedNameSpaceQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   187
        UsedNameSpaceQuerySignal nameClass:self message:#usedNameSpaceQuerySignal.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   188
        UsedNameSpaceQuerySignal notifierString:'asking for used nameSpaced'.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   189
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   190
        CreateNameSpaceQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   191
        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
   192
        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
   193
        CreateNameSpaceQuerySignal defaultAnswer:false.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   194
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   195
        ClassConventionViolationConfirmationQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   196
        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
   197
        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
   198
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   199
        PackageQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   200
        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
   201
        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
   202
        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
   203
                                                                    ifTrue:[
4112
5ee841c34b10 return nil (instead of 'no package') if no current package is defined.
Claus Gittinger <cg@exept.de>
parents: 4110
diff changeset
   204
                                                                        nil
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   205
                                                                    ] ifFalse:[
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   206
                                                                        Project currentPackageName
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   207
                                                                    ])].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   208
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   209
        FileOutNameSpaceQuerySignal := QuerySignal new.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   210
        FileOutNameSpaceQuerySignal defaultAnswer:false.
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   211
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   212
        ChangeFileAccessLock := Semaphore forMutualExclusion name:'ChangeFileAccessLock'.
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   213
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   214
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   215
    DefaultApplicationQuerySignal isNil ifTrue:[
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   216
        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
   217
        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
   218
        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
   219
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   220
        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
   221
        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
   222
        ChangeDefaultApplicationNotificationSignal notifierString:'change default application'.
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   223
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   224
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   225
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   226
     ClassDescription initialize
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   227
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   228
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   229
    "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
   230
    "Modified: / 3.2.1999 / 11:23:08 / cg"
4049
9ae11122b8a2 FileoutErrorSignal is proceedable.
Stefan Vogel <sv@exept.de>
parents: 3977
diff changeset
   231
    "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
   232
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   233
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   234
!ClassDescription class methodsFor:'Signal constants'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   235
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   236
changeDefaultApplicationNotificationSignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   237
    "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
   238
     new classes/methods will be added.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   239
     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
   240
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   241
    ^ ChangeDefaultApplicationNotificationSignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   242
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   243
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   244
     Transcript showCR:Class changeDefaultApplicationNotificationSignal raise
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   245
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   246
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   247
    "Modified: / 5.11.1996 / 20:08:38 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   248
    "Created: / 15.6.1998 / 18:29:57 / cg"
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
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   251
classConventionViolationConfirmationQuerySignal
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   252
    "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
   253
     (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
   254
     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
   255
     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
   256
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   257
    ^ ClassConventionViolationConfirmationQuerySignal
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   258
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   259
    "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
   260
!
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
   261
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   262
classRedefinitionSignal
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   263
    "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
   264
     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
   265
     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
   266
     classes from being redefined by incompatible classes
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   267
     (classVars, classInstVars or inheritance)."
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   268
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   269
    ^ ClassDescription::ClassRedefinitionNotification
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   270
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   271
    "Created: / 17.6.1998 / 10:13:44 / cg"
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   272
!
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   273
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   274
createNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   275
    "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
   276
     silently created without user confirmation.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   277
     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
   278
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   279
    ^ CreateNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   280
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   281
    "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
   282
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   283
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   284
defaultApplicationQuerySignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   285
    "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
   286
     new classes/methods are to be added.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   287
     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
   288
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   289
    ^ DefaultApplicationQuerySignal
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   290
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   291
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   292
     Transcript showCR:Class defaultApplicationQuerySignal raise
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   293
    "
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   294
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   295
    "Modified: / 5.11.1996 / 20:08:38 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   296
    "Created: / 15.6.1998 / 18:28:54 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   297
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   298
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   299
fileOutErrorSignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   300
    "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
   301
     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
   302
     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
   303
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   304
    ^ FileOutErrorSignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   305
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   306
    "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
   307
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   308
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   309
fileOutNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   310
    "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
   311
     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
   312
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   313
    ^ FileOutNameSpaceQuerySignal
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   314
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   315
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   316
     Transcript showCR:Class fileOutNameSpaceQuerySignal raise
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   317
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   318
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   319
    "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
   320
    "Created: 2.4.1997 / 17:28:41 / stefan"
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   321
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   322
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   323
methodRedefinitionSignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   324
    "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
   325
     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
   326
     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
   327
     methods to be overwritten or redefined by incompatible methods"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   328
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
   329
    ^ ClassDescription::MethodRedefinitionNotification
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   330
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   331
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   332
nameSpaceQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   333
    "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
   334
     Will be used when filing in code"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   335
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   336
    ^ NameSpaceQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   337
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   338
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   339
     Transcript showCR:Class nameSpaceQuerySignal raise
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   340
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   341
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   342
    "Modified: 5.11.1996 / 20:08:38 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   343
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   344
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   345
packageQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   346
    "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
   347
     Will be used when filing in code"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   348
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   349
    ^ PackageQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   350
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   351
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   352
     Transcript showCR:Class packageQuerySignal raise
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   353
    "
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
    "Created: 5.11.1996 / 20:07:22 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   356
    "Modified: 5.11.1996 / 20:08:35 / cg"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   357
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   358
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   359
updateChangeFileQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   360
    "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
   361
     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
   362
     static handler."
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   363
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   364
    ^ UpdateChangeFileQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   365
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   366
    "
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   367
     Transcript showCR:Class updateChangeFileQuerySignal raise
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
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   370
    "Modified: 5.11.1996 / 20:08:44 / cg"
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
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   373
usedNameSpaceQuerySignal
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   374
    "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
   375
     Will be used when filing in code"
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   376
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   377
    ^ UsedNameSpaceQuerySignal
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
    "Created: 19.12.1996 / 23:57:27 / cg"
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
!ClassDescription class methodsFor:'accessing - flags'!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   383
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   384
catchClassRedefinitions
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   385
    "return the class-redefinition catching flag."
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   386
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   387
    ^ CatchClassRedefinitions
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   388
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   389
    "Created: / 17.6.1998 / 10:30:01 / cg"
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   390
!
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   391
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   392
catchClassRedefinitions:aBoolean
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   393
    "turn on/off class redefinition catching. 
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   394
     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
   395
     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
   396
     of system methods.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   397
     Return the prior value of the flag."
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   398
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   399
    |prev|
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   400
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   401
    prev := CatchClassRedefinitions.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   402
    CatchClassRedefinitions := aBoolean.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   403
    ^ prev
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   404
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   405
    "Created: / 17.6.1998 / 10:31:19 / cg"
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   406
!
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   407
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   408
catchMethodRedefinitions
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   409
    "return the method-redefinition catching flag."
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   410
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   411
    ^ CatchMethodRedefinitions
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   412
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   413
    "Modified: / 17.6.1998 / 10:30:10 / cg"
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   414
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   415
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   416
catchMethodRedefinitions:aBoolean
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   417
    "turn on/off method redefinition catching. 
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   418
     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
   419
     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
   420
     of system methods.
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   421
     Return the prior value of the flag."
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   422
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   423
    |prev|
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   424
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   425
    prev := CatchMethodRedefinitions.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   426
    CatchMethodRedefinitions := aBoolean.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   427
    ^ prev
3596
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   428
d19a2f605da3 also allow catching of class redefinitions.
Claus Gittinger <cg@exept.de>
parents: 3583
diff changeset
   429
    "Modified: / 17.6.1998 / 10:31:02 / cg"
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   430
!
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   431
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   432
keepMethodHistory:aBoolean
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   433
    "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
   434
     is kept locally, for later undo (or compare)."
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   435
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   436
    aBoolean ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   437
        MethodHistory isNil ifTrue:[
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   438
            MethodHistory := OrderedCollection new.
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   439
        ]
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   440
    ] ifFalse:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   441
        MethodHistory := nil
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   442
    ].
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   443
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   444
    "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   445
     Class keepMethodHistory:true
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   446
     Class keepMethodHistory:false
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   447
    "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   448
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   449
    "Modified: 7.11.1996 / 18:36:00 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   450
    "Created: 7.11.1996 / 19:05:57 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   451
!
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   452
3406
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   453
lockChangesFile
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   454
    "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
   455
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   456
    ^ LockChangesFile
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
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   459
lockChangesFile:aBoolean
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   460
    "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
   461
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   462
    |prev|
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   463
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   464
    prev := LockChangesFile.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   465
    LockChangesFile := aBoolean.
de3426236e28 moved signal accessors from Class.
Claus Gittinger <cg@exept.de>
parents: 3344
diff changeset
   466
    ^ prev
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   467
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   468
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   469
!ClassDescription class methodsFor:'accessing - history'!
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   470
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   471
flushMethodHistory
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   472
    "flush any method->previousVersion associations,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   473
     all method history is lost."
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   474
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   475
    MethodHistory notNil ifTrue:[
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   476
        MethodHistory := OrderedCollection new
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   477
    ].
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   478
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   479
    "Created: 7.11.1996 / 19:07:25 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   480
!
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   481
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   482
methodHistory
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   483
    "return a dictionary containing method->previousVersion associations,
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   484
     nil if method remembering has been turned off"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   485
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   486
    ^ MethodHistory 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   487
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   488
    "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   489
     Class methodHistory
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
    "Modified: 7.11.1996 / 18:36:00 / cg"
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   493
    "Created: 7.11.1996 / 19:06:28 / cg"
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
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   496
!ClassDescription class methodsFor:'enumeration '!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   497
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   498
allClassesInCategory:aCategory do:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   499
    "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
   500
     no specific order is defined."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   501
5581
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   502
    Smalltalk allClassesDo:[:aClass |
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   503
        aClass isMeta ifFalse:[
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   504
            (aClass category = aCategory) ifTrue:[
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   505
                aBlock value:aClass
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   506
            ]
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   507
        ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   508
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   509
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   510
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   511
     Class allClassesInCategory:'Kernel-Classes' 
5581
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   512
                             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
   513
    "
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
    "Created: 1.4.1997 / 23:45:09 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   516
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   517
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   518
allClassesInCategory:aCategory inOrderDo:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   519
    "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
   520
     superclasses come first - then subclasses."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   521
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   522
    |classes|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   523
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   524
    classes := OrderedCollection new.
5581
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   525
    Smalltalk allClassesDo:[:aClass |
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   526
        aClass isMeta ifFalse:[
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   527
            (aClass category = aCategory) ifTrue:[
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   528
                classes add:aClass
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   529
            ]
7bef1c75fb06 allBehaviors vs. allClasses
Claus Gittinger <cg@exept.de>
parents: 5554
diff changeset
   530
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   531
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   532
    classes topologicalSort:[:a :b | b isSubclassOf:a].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   533
    classes do:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   534
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   535
    "Created: 1.4.1997 / 23:45:15 / stefan"
356
claus
parents: 328
diff changeset
   536
! !
claus
parents: 328
diff changeset
   537
1740
baa0d76a9c68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
   538
!ClassDescription class methodsFor:'queries'!
1179
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   539
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   540
isBuiltInClass
1266
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   541
    "return true if this class is known by the run-time-system.
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   542
     Here, true is returned for myself, false for subclasses."
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   543
1179
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   544
    ^ self == ClassDescription class or:[self == ClassDescription]
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   545
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   546
    "Created: 15.4.1996 / 17:16:59 / cg"
1266
cef9b3cd49df commentary
Claus Gittinger <cg@exept.de>
parents: 1193
diff changeset
   547
    "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
   548
! !
3e0f32177af4 allow subclasses of Class to be changed
Claus Gittinger <cg@exept.de>
parents: 1091
diff changeset
   549
5515
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   550
!ClassDescription methodsFor:'Compatibility - Dolphin'!
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   551
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   552
methodsFor
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   553
    "this method allows fileIn of Dolphin methods -
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   554
     return a ClassCategoryReader to read in and compile methods for me.
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   555
     Since Dolphin uses a different way to assign method categories,
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   556
     the loaded methods are temporarily categorized as 'Dolphin methods'
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   557
     and later reassigned, when a categoriesFor: message arrives."
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   558
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   559
    ^ ClassCategoryReader class:self category:'Dolphin methods'
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   560
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   561
! !
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
   562
5187
4bf3787cc63a category renamining
Claus Gittinger <cg@exept.de>
parents: 5163
diff changeset
   563
!ClassDescription methodsFor:'Compatibility - ST80'!
3047
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   564
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   565
addInstVarName:anotherInstVar
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   566
    |sel newClass args|
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   567
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   568
    sel := self definitionSelector.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   569
    Class nameSpaceQuerySignal answer:(self nameSpace)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   570
    do:[
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   571
        args := Array 
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   572
                    with:(self name)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   573
                    with:(self instanceVariableString , ' ' , anotherInstVar)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   574
                    with:(self classVariableString)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   575
                    with:''
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   576
                    with:(self category).
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   577
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   578
        sel numArgs == 6 ifTrue:[
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   579
            args := args copyWith:(self owner).
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   580
        ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   581
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   582
        newClass := self superclass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   583
            perform:sel withArguments:args.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   584
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   585
"/        "/ copy over methods ...
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   586
"/        self class copyInvalidatedMethodsFrom:self class for:newClass class.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   587
"/        self class copyInvalidatedMethodsFrom:self for:newClass.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   588
"/        newClass class recompileInvalidatedMethods.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   589
"/        newClass recompileInvalidatedMethods.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   590
    ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   591
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   592
"/    owner changed:#newClass with:newClass.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   593
"/    Smalltalk changed:#newClass with:newClass.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   594
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   595
"/    self removeFromSystem.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   596
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   597
    ^ newClass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   598
!
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   599
3047
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   600
organization
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   601
    "for ST80 compatibility; 
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   602
     read the documentation in ClassOrganizer for more info."
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   603
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   604
    ^ ClassOrganizer for:self
3344
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   605
!
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   606
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   607
removeInstVarName:anInstVar
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   608
    |sel newClass args newNames|
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   609
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   610
    newNames := self instVarNames.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   611
    newNames remove:anInstVar ifAbsent:[^ self].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   612
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   613
    sel := self definitionSelector.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   614
    Class nameSpaceQuerySignal answer:(self nameSpace)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   615
    do:[
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   616
        args := Array 
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   617
                    with:(self name)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   618
                    with:(newNames asStringWith:Character space)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   619
                    with:(self classVariableString)
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   620
                    with:''
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   621
                    with:(self category).
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   622
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   623
        sel numArgs == 6 ifTrue:[
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   624
            args := args copyWith:(self owner).
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   625
        ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   626
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   627
        newClass := self superclass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   628
            perform:sel withArguments:args.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   629
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   630
"/        "/ copy over methods ...
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   631
"/        self class copyInvalidatedMethodsFrom:self class for:newClass class.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   632
"/        self class copyInvalidatedMethodsFrom:self for:newClass.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   633
"/        newClass class recompileInvalidatedMethods.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   634
"/        newClass recompileInvalidatedMethods.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   635
    ].
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   636
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   637
"/    owner changed:#newClass with:newClass.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   638
"/    Smalltalk changed:#newClass with:newClass.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   639
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   640
"/    self removeFromSystem.
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   641
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   642
    ^ newClass
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   643
!
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
   644
3344
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   645
reorganizeFromString:orgString
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   646
    "for ST80 compatibility but without functionality"
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   647
088c84bfad31 added #reorganizeFromString: for ST80-compat
Claus Gittinger <cg@exept.de>
parents: 3329
diff changeset
   648
    "Created: / 28.3.1998 / 21:21:52 / cg"
3047
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   649
! !
a93c48319a06 category change
Claus Gittinger <cg@exept.de>
parents: 3035
diff changeset
   650
5187
4bf3787cc63a category renamining
Claus Gittinger <cg@exept.de>
parents: 5163
diff changeset
   651
!ClassDescription methodsFor:'Compatibility - V''Age'!
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   652
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   653
categoriesFor:aSelector are:listOfCategories
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   654
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   655
     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
   656
     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
   657
     found in the listOfCategories."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   658
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   659
    |mthd|
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   660
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   661
    (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
   662
	mthd category:listOfCategories first
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   663
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   664
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   665
    "Created: / 15.6.1998 / 17:11:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   666
    "Modified: / 15.6.1998 / 20:32:28 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   667
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   668
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   669
commentFor:aSelector is:aString
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   670
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   671
     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
   672
     For now, this is ignored"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   673
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   674
    |mthd|
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   675
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   676
    (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
   677
	"/ mthd comment:aString
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   678
    ].
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   679
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   680
    "Created: / 15.6.1998 / 17:11:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   681
    "Modified: / 15.6.1998 / 20:34:39 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   682
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   683
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   684
description:aString in:anApplication
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   685
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   686
     Set the description of the class."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   687
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   688
    "/ 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
   689
    "/ method under the selector #description.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   690
    "/ for now, this is ignored.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   691
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   692
    ^ self.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   693
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   694
    "Modified: / 15.6.1998 / 17:14:53 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   695
    "Created: / 15.6.1998 / 20:34:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   696
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   697
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   698
descriptionFor:aSelector is:aString
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   699
    "to allow fileIn of V'Age code.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   700
     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
   701
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   702
    "/ 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
   703
    "/ method under the selector #description.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   704
    "/ for now, this is ignored.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   705
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   706
    |newString code|
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   707
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   708
    ^ self.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   709
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   710
    newString := aString copy replaceAll:$" with:$'.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   711
    code := 'description
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   712
"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   713
 ' , aString , '
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   714
"'.
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   715
    self compile:code forClass:self class inCategory:#documentation
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   716
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   717
    "Modified: / 15.6.1998 / 17:14:53 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   718
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   719
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   720
initializeAfterLoad
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   721
    "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
   722
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   723
    self initialize
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   724
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   725
    "Modified: / 15.6.1998 / 20:35:58 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   726
    "Created: / 15.6.1998 / 20:36:49 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   727
! !
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
   728
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   729
!ClassDescription methodsFor:'accessing'!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   730
a27a279701f8 Initial revision
claus
parents:
diff changeset
   731
category
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   732
    ^ self subclassResponsibility
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   733
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   734
    "Created: 2.4.1997 / 00:51:04 / stefan"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   735
!
a27a279701f8 Initial revision
claus
parents:
diff changeset
   736
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   737
comment
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   738
    ^ self subclassResponsibility
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   739
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   740
    "Created: 2.4.1997 / 00:51:11 / stefan"
328
claus
parents: 308
diff changeset
   741
!
claus
parents: 308
diff changeset
   742
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   743
definition
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   744
    "return an expression-string to define myself"
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   745
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   746
    |s|
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   747
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   748
    s := WriteStream on:(String new).
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   749
    self fileOutDefinitionOn:s.
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   750
    ^ s contents
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   751
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   752
    "
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   753
     Object definition 
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   754
     Point definition  
3687
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   755
     Array definition  
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   756
     ByteArray definition  
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   757
     FloatArray definition  
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   758
    "
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   759
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   760
    "Created: / 19.6.1998 / 02:25:49 / cg"
3687
13d500d00047 comment only
Claus Gittinger <cg@exept.de>
parents: 3621
diff changeset
   761
    "Modified: / 29.7.1998 / 12:13:44 / cg"
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   762
!
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
   763
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   764
instVarAtOffset:index
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   765
    "return the name of the instance variable at index"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   766
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   767
    ^ self allInstanceVariableNames at:index
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   768
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   769
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   770
instVarNames
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   771
    "return a collection of the instance variable name-strings"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   772
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   773
    instvars isNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   774
	^ OrderedCollection new
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   775
    ].
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   776
    instvars isString ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   777
	instvars := instvars asCollectionOfWords asArray.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   778
	^ instvars
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   779
    ].
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   780
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   781
    ^ instvars
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   782
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   783
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   784
     Point instVarNames  
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   785
    "
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   786
2889
66d5faa411fd checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2882
diff changeset
   787
    "Modified: 22.8.1997 / 17:43:05 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   788
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   789
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   790
instVarOffsetOf:aVariableName
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   791
    "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
   792
     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
   793
     illegal names."
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   794
2891
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   795
    |i cls vars|
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   796
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   797
    cls := self.
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   798
    [cls notNil] whileTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   799
	vars := cls instVarNames.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   800
	i := vars indexOf:aVariableName.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   801
	i ~~ 0 ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   802
	    ^ (cls superclass instSize) + i
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   803
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   804
	cls := cls superclass
2891
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   805
    ].
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   806
    ^ nil
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   807
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   808
    "
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   809
     Point instVarOffsetOf:'x' 
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   810
     View instVarOffsetOf:'paint'
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   811
     Button instVarOffsetOf:'logo' 
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   812
    "
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   813
9020b3130d83 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2889
diff changeset
   814
    "Modified: 23.8.1997 / 16:59:15 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   815
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   816
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   817
instanceVariableOffsets
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   818
    "returns a dictionary containing the instance variable index
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   819
     for each instVar name"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   820
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   821
    |dict index|
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   822
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   823
    index := 0. dict := Dictionary new.
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   824
    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
   825
    ^ dict
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   826
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   827
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   828
     Point instanceVariableOffsets 
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   829
     GraphicsContext instanceVariableOffsets 
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   830
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   831
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   832
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   833
instanceVariableString
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   834
    "return a string of the instance variable names"
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   835
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   836
    instvars isNil ifTrue:[^ ''].
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   837
    instvars isString ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   838
	^ instvars
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   839
    ].
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   840
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   841
    ^ instvars asStringWith:(Character space)
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   842
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   843
    "
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   844
     Point instanceVariableString   
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   845
    "
2882
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   846
f133d996dd33 transparently convert instVarString to collection of words
Claus Gittinger <cg@exept.de>
parents: 2701
diff changeset
   847
    "Modified: 22.8.1997 / 14:59:14 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   848
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   849
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
   850
name
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   851
    ^ self subclassResponsibility
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   852
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   853
    "Created: 2.4.1997 / 00:50:56 / stefan"
620
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
2671
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   856
renameCategory:oldCategory to:newCategory
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   857
    "{ Pragma: +optSpace }"
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   858
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   859
    "rename a category (changes category of those methods).
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   860
     Appends a change record and notifies dependents."
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   861
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   862
    |any|
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   863
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   864
    any := false.
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   865
    self methodDictionary do:[:aMethod |
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   866
	aMethod category = oldCategory ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   867
	    aMethod category:newCategory.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   868
	    any := true.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   869
	]
2671
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   870
    ].
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   871
    any ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   872
	self addChangeRecordForRenameCategory:oldCategory to:newCategory.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
   873
	self changed:#methodCategory.
2671
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   874
    ]
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   875
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   876
    "Modified: 12.6.1996 / 11:49:08 / stefan"
e35b38211d4a had to move #renameCategory: (stefans change)
Claus Gittinger <cg@exept.de>
parents: 2666
diff changeset
   877
    "Created: 3.6.1997 / 11:55:05 / cg"
1
a27a279701f8 Initial revision
claus
parents:
diff changeset
   878
! !
10
claus
parents: 3
diff changeset
   879
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
   880
!ClassDescription methodsFor:'adding & removing'!
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   881
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   882
addSelector:newSelector withMethod:newMethod
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   883
    "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
   884
     1st argument to the methodDictionary. 
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   885
     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
   886
3067
901055cb6c3d checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3065
diff changeset
   887
    |oldMethod oldPackage newPackage|
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   888
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   889
    oldMethod := self compiledMethodAt:newSelector.
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   890
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   891
    CatchMethodRedefinitions ifTrue:[
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   892
        "check for attempts to redefine a method
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   893
         in a different package. Signal a resumable error if so.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   894
         This allows tracing redefinitions of existing system methods
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   895
         when filing in alien code ....
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   896
         (which we may want to forbit sometimes)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   897
        "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   898
        oldMethod notNil ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   899
            oldPackage := oldMethod package.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   900
            newPackage := newMethod package.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   901
            oldPackage ~= newPackage ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   902
                "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   903
                 attempt to redefine an existing method, which was
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   904
                 defined in another package (see oldPackage vs. newPackage).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   905
                 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
   906
                 Otherwise, the existing (old) method remains valid.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   907
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   908
                 This check was added to help prevent accidental modifications
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   909
                 of system code - especially, when alien code is filedIn. 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   910
                 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
   911
                 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
   912
                 temporarily, when filing in unknown code-files).
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   913
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   914
                 You can turn off the catching of redefinitions by setting
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   915
                 my classVariable
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   916
                          CatchMethodRedefinitions 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   917
                 to false.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   918
                 (also found in the Launchers 'settings-compilation' menu)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   919
                "
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   920
                (Class methodRedefinitionSignal
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   921
                    raiseRequestWith:(oldMethod -> newMethod)
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   922
                    errorString:('redefinition of method: ' , self name , '>>' , newSelector) 
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   923
                ) == #keep ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   924
                    newMethod package:oldMethod package
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   925
                ].
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   926
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   927
                "/ if proceeded, install as usual.
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   928
            ]
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   929
        ]
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   930
    ].
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   931
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   932
    "/ 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
   933
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   934
    MethodHistory notNil ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   935
        oldMethod notNil ifTrue:[
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   936
            MethodHistory add:(Array with:#methodChange with:oldMethod with:newMethod).
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   937
            (MethodHistorySize notNil and:[MethodHistory size > MethodHistorySize]) ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   938
                MethodHistory removeFirst.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   939
            ]
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   940
        ]
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   941
    ].
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   942
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   943
    "/ remember in the projects overwritten dictionary
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   944
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   945
    oldMethod notNil ifTrue:[
4345
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   946
        oldMethod package ~= newMethod package ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   947
            Project notNil ifTrue:[
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   948
                "/ allow configurations without Project
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   949
                Project rememberOverwrittenMethod:newMethod from:oldMethod
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   950
            ]
030d3a420dc8 renamed OldMethods to MethodHistory.
Claus Gittinger <cg@exept.de>
parents: 4329
diff changeset
   951
        ]
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   952
    ].
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   953
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   954
    (super addSelector:newSelector withMethod:newMethod) ifTrue:[
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
   955
        self addChangeRecordForMethod:newMethod fromOld:oldMethod.
2676
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   956
    ]
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   957
3065
bbf5a0fc865b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3050
diff changeset
   958
    "Modified: / 9.9.1996 / 22:39:32 / stefan"
bbf5a0fc865b checkin from browser
Claus Gittinger <cg@exept.de>
parents: 3050
diff changeset
   959
    "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
   960
    "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
   961
!
38d61ed0cf40 stefan (sigh) .... must care for metaClasses changeRecords
Claus Gittinger <cg@exept.de>
parents: 2671
diff changeset
   962
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   963
basicAddSelector:newSelector withMethod:newMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   964
    "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
   965
     1st argument to the methodDictionary. 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   966
     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
   967
     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
   968
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   969
    super addSelector:newSelector withMethod:newMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   970
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   971
    "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
   972
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   973
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   974
removeSelector:aSelector
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   975
    "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
   976
     from the methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   977
     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
   978
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   979
    |oldMethod|
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   980
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   981
    MethodHistory notNil ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   982
        oldMethod := self compiledMethodAt:aSelector.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   983
        oldMethod notNil ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   984
            MethodHistory add:(Array with:#methodRemove with:oldMethod).
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   985
            (MethodHistorySize notNil and:[MethodHistory size > MethodHistorySize]) ifTrue:[
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   986
                MethodHistory removeFirst.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   987
            ]
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   988
        ]
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   989
    ].
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   990
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
   991
    (super removeSelector:aSelector) ifTrue:[
4358
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   992
        self addChangeRecordForRemoveSelector:aSelector.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   993
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   994
        "/ also notify a change of mySelf;
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   995
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   996
        self changed:#methodDictionary with:aSelector.
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   997
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   998
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
   999
        "/ also notify a change of Smalltalk;
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1000
        "/ this allows a dependent of Smalltalk to watch all class
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1001
        "/ changes (no need for observing all classes)
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1002
        "/ - 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
  1003
        "/
7fdb3360d19c methodHistory stuff
Claus Gittinger <cg@exept.de>
parents: 4345
diff changeset
  1004
        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
  1005
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1006
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1007
    "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
  1008
    "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
  1009
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1010
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1011
!ClassDescription methodsFor:'c function interfacing'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1012
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1013
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
  1014
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1015
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1016
    "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
  1017
     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
  1018
     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
  1019
     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
  1020
     WARNING: 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1021
	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
  1022
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1023
    StubGenerator isNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1024
	^ 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
  1025
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1026
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1027
    StubGenerator 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1028
	createStubFor:selector 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1029
	calling:cFunctionNameString 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1030
	args:argTypeArray 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1031
	returning:returnType
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1032
	in:self                          
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1033
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1034
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1035
     Object subclass:#CInterface
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1036
	    instanceVariableNames:''
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1037
	    classVariableNames:''
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1038
	    poolDictionaries:''
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1039
	    category:'Examples'.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1040
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1041
     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
  1042
			   calling:'fprintf' 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1043
			      args:#(ExternalStream String Float) 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1044
			 returning:#SmallInteger.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1045
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1046
     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
  1047
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1048
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1049
    "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
  1050
    "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
  1051
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1052
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1053
!ClassDescription methodsFor:'changes management'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1054
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1055
addChangeRecordForMethod:aMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1056
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1057
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1058
    "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
  1059
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1060
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1061
        self writingChangePerform:#addChangeRecordForMethod:to: with:aMethod.
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1062
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1063
        "this test allows a smalltalk without Projects/ChangeSets"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1064
        Project notNil ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1065
            Project addMethodChange:aMethod in:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1066
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1067
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1068
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1069
    "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
  1070
    "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
  1071
    "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
  1072
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1073
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1074
addChangeRecordForMethod:aMethod fromOld:oldMethod
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1075
    "{ Pragma: +optSpace }"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1076
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1077
    "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
  1078
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1079
    UpdateChangeFileQuerySignal query ifTrue:[
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1080
        self writingChangePerform:#addChangeRecordForMethod:to: with:aMethod.
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1081
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1082
        "this test allows a smalltalk without Projects/ChangeSets"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1083
        Project notNil ifTrue:[
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1084
            Project addMethodChange:aMethod fromOld:oldMethod in:self
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1085
        ]
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1086
    ]
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1087
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1088
    "Modified: / 20.1.1997 / 12:36:02 / cg"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1089
    "Created: / 2.4.1997 / 01:02:16 / stefan"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1090
    "Modified: / 18.3.1999 / 18:16:41 / stefan"
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1091
!
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1092
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1093
addChangeRecordForMethodCategory:aMethodOrSelector category:aString
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1094
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1095
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1096
    |mthd|
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1097
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1098
    "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
  1099
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1100
    UpdateChangeFileQuerySignal query ifTrue:[
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1101
        (mthd := aMethodOrSelector) isSymbol ifTrue:[
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1102
            mthd := self compiledMethodAt:aMethodOrSelector
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1103
        ].
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1104
        self writingChangeDo:[:aStream |
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1105
            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
  1106
        ].
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1107
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1108
        "this test allows a smalltalk without Projects/ChangeSets"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1109
        Project notNil ifTrue:[
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1110
            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
  1111
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1112
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1113
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1114
    "Modified: / 18.3.1999 / 18:16:50 / stefan"
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1115
    "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
  1116
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1117
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1118
addChangeRecordForMethodPrivacy:aMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1119
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1120
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1121
    "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
  1122
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1123
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1124
        self writingChangePerform:#addChangeRecordForMethodPrivacy:to: with:aMethod.
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1125
        "this test allows a smalltalk without Projects/ChangeSets"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1126
        Project notNil ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1127
            Project addMethodPrivacyChange:aMethod in:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1128
        ]
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
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1131
    "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
  1132
    "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
  1133
    "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
  1134
    "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
  1135
!
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
addChangeRecordForRemoveSelector:aSelector
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1138
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1139
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1140
    "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
  1141
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1142
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1143
        self writingChangePerform:#addChangeRecordForRemoveSelector:to: with:aSelector.
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1144
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1145
        "this test allows a smalltalk without Projects/ChangeSets"
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1146
        Project notNil ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1147
            Project addRemoveSelectorChange:aSelector in:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1148
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1149
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1150
3288
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 3230
diff changeset
  1151
    "Created: / 2.4.1997 / 17:30:47 / stefan"
373af30a15ca add removeSelectorChange to current projects changeSet
Claus Gittinger <cg@exept.de>
parents: 3230
diff changeset
  1152
    "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
  1153
    "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
  1154
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1155
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1156
addChangeRecordForRenameCategory:oldCategory to:newCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1157
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1158
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1159
    "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
  1160
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1161
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1162
        self writingChangeDo:[:aStream |
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1163
            self addChangeRecordForRenameCategory:oldCategory to:newCategory to:aStream.
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1164
        ].
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1165
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1166
        "this test allows a smalltalk without Projects/ChangeSets"
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1167
        Project notNil ifTrue:[
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1168
            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
  1169
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1170
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1171
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1172
    "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
  1173
    "Modified: / 18.3.1999 / 18:17:08 / stefan"
5237
ac92ad320972 changeSet entry for category rename
Claus Gittinger <cg@exept.de>
parents: 5216
diff changeset
  1174
    "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
  1175
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1176
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1177
addChangeTimeStampTo:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1178
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1179
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1180
    "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
  1181
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1182
    |info|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1183
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1184
    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
  1185
    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
  1186
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1187
    "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
  1188
    "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
  1189
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1190
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1191
addInfoRecord:aMessage
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1192
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1193
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1194
    "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
  1195
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1196
    UpdateChangeFileQuerySignal query ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1197
        self writingChangeWithTimeStamp:false 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1198
             perform:#addInfoRecord:to: 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1199
             with:aMessage.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1200
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1201
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  1202
    "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
  1203
    "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
  1204
    "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
  1205
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1206
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1207
changesStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1208
    "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
  1209
     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
  1210
     the LockChangesFile settings 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1211
     (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
  1212
5286
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1213
    |streamType aStream fileName err|
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1214
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1215
    fileName := ObjectMemory nameForChanges.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1216
    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1217
    LockChangesFile ifTrue:[
5286
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1218
        streamType := LockedFileStream. 
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1219
    ] ifFalse:[
5286
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1220
        streamType := FileStream.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1221
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1222
    aStream := streamType oldFileNamed:fileName.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1223
    aStream isNil ifTrue:[
5286
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1224
        aStream := streamType newFileNamed:fileName.
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1225
        aStream isNil ifTrue:[
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1226
            self warn:'cannot create/update the changes file (check permissions)'.
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1227
            ^ nil
4ab4d9d0c2b5 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 5237
diff changeset
  1228
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1229
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1230
    aStream setToEnd.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1231
    ^ aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1232
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1233
    "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
  1234
    "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
  1235
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1236
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1237
withoutUpdatingChangesDo:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1238
    "turn off change file update while evaluating aBlock."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1239
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1240
    UpdateChangeFileQuerySignal 
5553
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1241
        answer:false
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1242
        do:[
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1243
            aBlock value
1740d3ae50ff keep previousVersion of method in changeSet
Claus Gittinger <cg@exept.de>
parents: 5515
diff changeset
  1244
        ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1245
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1246
    "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
  1247
    "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
  1248
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1249
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1250
!ClassDescription methodsFor:'compiling'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1251
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1252
compile:code
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1253
    "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
  1254
     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
  1255
     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
  1256
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1257
    ^ self compilerClass 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1258
	compile:code 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1259
	forClass:self
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1260
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1261
    "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
  1262
    "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
  1263
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1264
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1265
compile:code classified:category
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1266
    "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
  1267
     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
  1268
     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
  1269
     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
  1270
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1271
    ^ 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
  1272
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1273
    "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
  1274
    "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
  1275
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1276
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1277
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
  1278
    "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
  1279
     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
  1280
     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
  1281
     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
  1282
     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
  1283
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1284
    logged ifFalse:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1285
	self withoutUpdatingChangesDo:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1286
	    ^ self compilerClass 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1287
		compile:code 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1288
		forClass:self 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1289
		inCategory:category
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1290
	]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1291
    ] ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1292
	^ self compilerClass 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1293
	    compile:code 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1294
	    forClass:self 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1295
	    inCategory:category
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1296
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1297
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1298
    "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
  1299
    "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
  1300
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1301
3606
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1302
compile:code classified:cat notifying:requestor
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1303
    "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
  1304
     requestor, anObject with the error reason.
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1305
     Install the method under the category, cat.
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1306
     Returns the new method or nil (on failure)."
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1307
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1308
    ^ self compilerClass 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1309
	compile:code 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1310
	forClass:self
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1311
	inCategory:cat 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1312
	notifying:requestor
3606
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1313
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1314
    "Modified: / 13.12.1995 / 11:02:40 / cg"
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1315
    "Created: / 18.6.1998 / 15:52:15 / cg"
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1316
!
397b95da25e9 added #compile:calssified:notifying: (ST-80)
Claus Gittinger <cg@exept.de>
parents: 3603
diff changeset
  1317
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1318
compile:code notifying:requestor
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1319
    "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
  1320
     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
  1321
     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
  1322
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1323
    ^ self compilerClass 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1324
	compile:code 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1325
	forClass:self 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1326
	notifying:requestor
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1327
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1328
    "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
  1329
    "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
  1330
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1331
3097
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1332
compile:code notifying:requestor ifFail:failBlock
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1333
    "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
  1334
     requestor, anObject with the error reason.
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1335
     Returns the new method or nil (on failure)."
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1336
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1337
    |rslt|
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1338
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1339
    rslt := self compilerClass 
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1340
	compile:code 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1341
	forClass:self 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1342
	notifying:requestor.
3097
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1343
    (rslt isNil or:[rslt == #Error]) ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1344
	^ failBlock value
3097
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1345
    ].
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1346
    ^ rslt
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1347
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1348
    "Modified: / 13.12.1995 / 11:02:40 / cg"
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1349
    "Created: / 8.11.1997 / 13:42:02 / cg"
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1350
!
5d06fb326f0b added #compile:notifying:ifFail: (ST80 compat)
Claus Gittinger <cg@exept.de>
parents: 3074
diff changeset
  1351
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1352
recompile
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1353
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1354
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1355
    "recompile all methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1356
     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
  1357
     have to be recompiled"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1358
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1359
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1360
        self recompile:aSelector
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
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1363
    "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
  1364
    "Created: 1.4.1997 / 23:43:38 / stefan"
2893
8ba406da6b22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
  1365
    "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
  1366
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1367
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1368
recompile:aSelector
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1369
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1370
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1371
    "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
  1372
     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
  1373
     subclasses"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1374
3074
038bcaafe962 alien compiler support
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
  1375
    |cat code compiler|
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1376
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1377
    Class withoutUpdatingChangesDo:[
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1378
        Class methodRedefinitionSignal answer:#keep do:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1379
            cat := (self compiledMethodAt:aSelector) category.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1380
            code := self sourceCodeAt:aSelector.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1381
            compiler := self compilerClass.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1382
            (compiler respondsTo:#compile:forClass:inCategory:)
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1383
            ifTrue:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1384
                "/ ST/X's compiler
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1385
                compiler compile:code forClass:self inCategory:cat
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1386
            ] ifFalse:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1387
                "/ some other (TGEN) compiler
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1388
                compiler new
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1389
                        compile:code
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1390
                        in:self
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1391
                        notifying:nil
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1392
                        ifFail:[].
5346
271481acda40 halt with message arg
Claus Gittinger <cg@exept.de>
parents: 5339
diff changeset
  1393
                self halt:'testHalt - remove me when debugged'.
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1394
            ]
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1395
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1396
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1397
3074
038bcaafe962 alien compiler support
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
  1398
    "Created: / 1.4.1997 / 23:43:34 / stefan"
038bcaafe962 alien compiler support
Claus Gittinger <cg@exept.de>
parents: 3067
diff changeset
  1399
    "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
  1400
    "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
  1401
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1402
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1403
recompileAll
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1404
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1405
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1406
    "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
  1407
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1408
    |classes|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1409
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1410
    classes := self subclasses.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1411
    self recompile.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1412
    classes do:[:aClass |
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1413
	aClass recompileAll
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1414
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1415
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1416
    "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
  1417
    "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
  1418
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1419
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1420
recompileForSpeed:aSelector
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1421
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1422
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1423
    "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
  1424
     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
  1425
     the architecture)."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1426
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1427
    |cat code prev savedMethod|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1428
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1429
    Class withoutUpdatingChangesDo:[
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1430
        Class methodRedefinitionSignal answer:#keep do:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1431
            savedMethod := self compiledMethodAt:aSelector.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1432
            cat := savedMethod category.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1433
            code := self sourceCodeAt:aSelector.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1434
        
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1435
            prev := Compiler stcCompilation:#always.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1436
            [
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1437
                self compilerClass compile:code forClass:self inCategory:cat
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1438
            ] valueNowOrOnUnwindDo:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1439
                Compiler stcCompilation:prev.
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1440
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1441
                (self compiledMethodAt:aSelector) isNil ifTrue:[
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1442
                    self primAddSelector:aSelector withMethod:savedMethod
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1443
                ]
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1444
            ]
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  1445
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1446
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1447
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1448
    "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
  1449
    "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
  1450
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1451
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1452
recompileInvalidatedMethods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1453
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1454
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1455
    "recompile all invalidated methods"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1456
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1457
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1458
        |trap trapCode trapByteCode|
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1459
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1460
        trap := aMethod trapMethodForNumArgs:aMethod numArgs.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1461
        trapCode := trap code.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1462
        trapByteCode := trap byteCode.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1463
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1464
        (aMethod code = trapCode
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1465
        or:[aMethod byteCode == trapByteCode]) ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1466
            self recompile:aSelector
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1467
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1468
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1469
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1470
    "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
  1471
    "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
  1472
    "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
  1473
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1474
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1475
recompileMethodsAccessingAny:setOfNames
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1476
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1477
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1478
    "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
  1479
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1480
    self recompileMethodsAccessingAny:setOfNames orSuper:false
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1481
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1482
    "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
  1483
    "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
  1484
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1485
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1486
recompileMethodsAccessingAny:setOfNames orSuper:superBoolean
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1487
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1488
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1489
    "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
  1490
     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
  1491
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1492
    |p|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1493
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1494
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1495
        |mustCompile lits source|
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1496
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1497
        mustCompile := nil.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1498
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1499
        source := aMethod source.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1500
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1501
        "/ avoid parsing, if possible
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1502
        superBoolean ifFalse:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1503
            setOfNames size == 1 ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1504
                (source findString:(setOfNames first)) == 0 ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1505
                    mustCompile := false.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1506
                ]
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1507
            ]
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1508
        ].
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1509
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1510
        mustCompile isNil ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1511
            p := Parser parseMethod:source in:self.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1512
            (p isNil 
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1513
             or:[(p usedVars includesAny:setOfNames)
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1514
             or:[superBoolean and:[p usesSuper]]]) ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1515
                mustCompile := true
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1516
            ]
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1517
        ].
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1518
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1519
        mustCompile == true ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1520
            self recompile:aSelector
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1521
        ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1522
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1523
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1524
    "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
  1525
    "Created: 1.4.1997 / 23:44:46 / stefan"
2893
8ba406da6b22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
  1526
    "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
  1527
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1528
3219
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1529
recompileMethodsAccessingAnyClassvarOrGlobal:aCollection
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1530
    "{ Pragma: +optSpace }"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1531
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1532
    "recompile all methods accessing a global or classvar in aCollection"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1533
4110
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1534
"/  Transcript showCR:self name , ' recompiling accesses to ' , aCollection printString.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1535
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1536
    self selectorsAndMethodsDo:[:aSelector :aMethod |
4110
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1537
        (aMethod literalsDetect:[ :lit | |i l|
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1538
            "classVars are named 'className:varName' in 
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1539
             the literal array"
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1540
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1541
            lit isSymbol and:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1542
                i := lit lastIndexOf:$:.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1543
                i == 0 ifTrue:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1544
                    l := lit.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1545
                ] ifFalse:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1546
                    l := lit copyFrom:(i + 1).
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1547
                ].
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1548
                aCollection includes:l
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1549
            ].
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1550
        ] ifNone:[]) notNil ifTrue:[
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1551
"/          Transcript showCR:self name , ' recompiling ' , aSelector.
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1552
            self recompile:aSelector
636688688723 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4056
diff changeset
  1553
        ]
3219
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1554
    ]
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1555
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1556
    "Modified: / 29.8.1997 / 07:59:24 / cg"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1557
    "Created: / 23.1.1998 / 12:13:32 / stefan"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1558
    "Modified: / 23.1.1998 / 16:13:45 / stefan"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1559
!
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1560
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1561
recompileMethodsAccessingGlobal:aGlobalKey
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1562
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1563
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1564
    "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
  1565
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1566
    self selectorsAndMethodsDo:[:aSelector :aMethod |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1567
        (aMethod literalsDetect:[:lit|
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1568
            lit = aGlobalKey
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1569
        ] ifNone:[]) notNil ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1570
            self recompile:aSelector.
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1571
        ].
3219
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1572
    ].
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1573
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1574
    "Created: / 1.4.1997 / 23:44:53 / stefan"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1575
    "Modified: / 29.8.1997 / 07:59:24 / cg"
33b5d79b32ff New method #recompileMethodsAccessingAnyClassvarOrGlobal:
Stefan Vogel <sv@exept.de>
parents: 3097
diff changeset
  1576
    "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
  1577
!
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1578
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1579
recompileMethodsWithMachineCode
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1580
    "{ Pragma: +optSpace }"
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1581
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1582
    "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
  1583
     (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
  1584
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  1585
    self selectorsAndMethodsDo:[:aSelector :oldMethod |
4751
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1586
        |newMethod|
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1587
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1588
        oldMethod isLazyMethod ifFalse:[
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1589
            oldMethod byteCode isNil ifTrue:[
4750
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1590
                self recompile:aSelector.
4751
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1591
                newMethod := self compiledMethodAt:aSelector.
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1592
                oldMethod ~~ newMethod ifTrue:[
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1593
                    newMethod sourceFilename:(oldMethod getSource) position:(oldMethod getSourcePosition)
174a92d4ba3f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4750
diff changeset
  1594
                ]
4750
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1595
            ].
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1596
        ].
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1597
    ].
85d942724808 support recompile of all machine code methods
Claus Gittinger <cg@exept.de>
parents: 4733
diff changeset
  1598
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1599
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1600
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1601
!ClassDescription methodsFor:'fileIn interface'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1602
3520
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1603
commentStamp:aStamp prior:whatever
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1604
    "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
  1605
     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
  1606
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1607
    ^ Squeak::ClassCommentReader new
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1608
	class:self 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1609
	category:#Comment
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1610
	changeStamp:aStamp
3520
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1611
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1612
    "Modified: / 6.6.1998 / 01:47:06 / cg"
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1613
!
93d11fe72baf support to fileIn squeak code
Claus Gittinger <cg@exept.de>
parents: 3406
diff changeset
  1614
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1615
ignoredMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1616
    "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
  1617
     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
  1618
     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
  1619
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1620
    ^ (self methodsFor:aCategory) ignoredProtocol
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
    "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
  1623
    "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
  1624
!
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
methods
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1627
    "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
  1628
     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
  1629
     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
  1630
     categorized as 'ST/V methods'."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1631
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1632
    ^ 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
  1633
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1634
    "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
  1635
    "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
  1636
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1637
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1638
methodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1639
    "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
  1640
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1641
    ^ ClassCategoryReader class:self category:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1642
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1643
    "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
  1644
    "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
  1645
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1646
3035
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1647
methodsFor:aCategory stamp:time
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1648
    "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
  1649
     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
  1650
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1651
    ^ self methodsFor:aCategory
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1652
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1653
    "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
  1654
!
8c574753e6d4 allow squeak code to be filedIn (methodsFor:stamp:)
Claus Gittinger <cg@exept.de>
parents: 2918
diff changeset
  1655
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1656
methodsForUndefined:categoryString
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1657
    "ST-80 compatibility.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1658
     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
  1659
     For now, simply forward it."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1660
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1661
    ^ self methodsFor:categoryString
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1662
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1663
    "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
  1664
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1665
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1666
privateMethods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1667
    "this method allows fileIn of V'Age methods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1668
     The privateMethods keyword is for documentation only; 
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1669
     by default, methods are public (for backward compatibility)
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1670
     (although, they could be made private here)."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1671
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1672
    "/ uncomment to install as real private methods ...
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1673
    "/ ^ (self methodsFor:'private') privateProtocol
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1674
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1675
    ^ self methodsFor:'private'
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1676
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1677
    "Created: / 15.6.1998 / 20:29:29 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1678
    "Modified: / 15.6.1998 / 20:30:38 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1679
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1680
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1681
privateMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1682
    "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
  1683
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1684
     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
  1685
     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
  1686
     a privatMethodError exception."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1687
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1688
    ^ (self methodsFor:aCategory) privateProtocol
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1689
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1690
    "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
  1691
    "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
  1692
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1693
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1694
protectedMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1695
    "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
  1696
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1697
     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
  1698
     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
  1699
     a privatMethodError exception."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1700
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1701
    ^ (self methodsFor:aCategory) protectedProtocol
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1702
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1703
    "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
  1704
    "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
  1705
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1706
3583
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1707
publicMethods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1708
    "this method allows fileIn of V'Age methods
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1709
     The publicMethods keyword is for documentation only; 
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1710
     by default, methods are public anyway (for backward compatibility)."
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1711
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1712
    ^ self methodsFor:'public'
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1713
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1714
    "Created: / 1.4.1997 / 13:59:39 / stefan"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1715
    "Modified: / 15.6.1998 / 20:29:02 / cg"
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1716
!
5b0111ca8692 support for V'Age fileIn
Claus Gittinger <cg@exept.de>
parents: 3520
diff changeset
  1717
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1718
publicMethodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1719
    "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
  1720
     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
  1721
     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
  1722
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1723
    ^ self methodsFor:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1724
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1725
    "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
  1726
    "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
  1727
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1728
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1729
!ClassDescription methodsFor:'fileOut'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1730
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1731
fileOutCategory:aCategory
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1732
    "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
  1733
     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
  1734
     directory."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1735
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1736
    |aStream fileName|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1737
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1738
    fileName := (self name , '-' , aCategory , '.st') asFilename.
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1739
    fileName makeLegalFilename.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1740
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1741
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1742
    "/ 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
  1743
    "/
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1744
    Project notNil ifTrue:[
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1745
        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
  1746
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1747
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1748
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1749
    "/ 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
  1750
    "/
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1751
    fileName exists ifTrue:[
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1752
        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
  1753
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1754
    aStream := FileStream newFileNamed:fileName.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1755
    aStream isNil ifTrue:[
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1756
        ^ FileOutErrorSignal 
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1757
                raiseRequestWith:fileName
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1758
                errorString:('cannot create file:', fileName pathName)
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1759
    ].
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1760
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1761
    self fileOutCategory:aCategory on:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1762
    aStream close
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1763
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1764
    "Modified: / 1.4.1997 / 16:00:24 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1765
    "Created: / 1.4.1997 / 16:04:18 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1766
    "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
  1767
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1768
4733
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1769
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
  1770
    "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
  1771
     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
  1772
     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
  1773
     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
  1774
     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
  1775
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1776
    |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
  1777
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1778
    dict := self methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1779
    dict notNil ifTrue:[
4733
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1780
        interestingMethods := OrderedCollection new.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1781
        dict do:[:aMethod |
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1782
            |wanted|
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1783
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1784
            (methodFilter isNil
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1785
            or:[methodFilter value:aMethod]) ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1786
                (aCategory = aMethod category) ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1787
                    skippedMethods notNil ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1788
                        wanted := (skippedMethods includesIdentical:aMethod) not
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1789
                    ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1790
                        savedMethods notNil ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1791
                            wanted := (savedMethods includesIdentical:aMethod).
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1792
                        ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1793
                            wanted := true
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1794
                        ]
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1795
                    ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1796
                    wanted ifTrue:[interestingMethods add:aMethod].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1797
                ]
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1798
            ]
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1799
        ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1800
        interestingMethods notEmpty ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1801
            first := true.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1802
            privacy := nil.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1803
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1804
            "/
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1805
            "/ sort by selector
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1806
            "/
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1807
            sortedSelectors := interestingMethods collect:[:m | self selectorAtMethod:m].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1808
            sortedSelectors sortWith:interestingMethods.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1809
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1810
            interestingMethods do:[:aMethod |
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1811
                first ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1812
                    privacy ~~ aMethod privacy ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1813
                        first := true.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1814
                        aStream space.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1815
                        aStream nextPutChunkSeparator.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1816
                    ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1817
                    aStream cr; cr
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1818
                ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1819
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1820
                privacy := aMethod privacy.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1821
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1822
                first ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1823
                    aStream nextPutChunkSeparator.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1824
                    self printClassNameOn:aStream.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1825
                    privacy ~~ #public ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1826
                        aStream space; nextPutAll:privacy; nextPutAll:'MethodsFor:'.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1827
                    ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1828
                        aStream nextPutAll:' methodsFor:'.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1829
                    ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1830
                    cat := aCategory.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1831
                    cat isNil ifTrue:[ cat := '' ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1832
                    aStream nextPutAll:aCategory asString storeString.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1833
                    aStream nextPutChunkSeparator; cr; cr.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1834
                    first := false.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1835
                ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1836
                source := aMethod source.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1837
                source isNil ifTrue:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1838
                    FileOutErrorSignal 
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1839
                        raiseRequestWith:self
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1840
                        errorString:'no source for method: ', (aMethod displayString)
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1841
                ] ifFalse:[
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1842
                    aStream nextChunkPut:source.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1843
                ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1844
            ].
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1845
            aStream space.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1846
            aStream nextPutChunkSeparator.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1847
            aStream cr
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1848
        ]
2666
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
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1851
    "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
  1852
    "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
  1853
    "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
  1854
    "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
  1855
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1856
4733
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1857
fileOutCategory:aCategory except:skippedMethods only:savedMethods on:aStream
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1858
    "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
  1859
     If skippedMethods is nonNil, those are not saved.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1860
     If savedMethods is nonNil, only those are saved.
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1861
     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
  1862
     fileOut for what this is needed."
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1863
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1864
    self
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1865
        fileOutCategory:aCategory 
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1866
        except:skippedMethods 
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1867
        only:savedMethods       
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1868
        methodFilter:nil
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1869
        on:aStream
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1870
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1871
    "Modified: 28.8.1995 / 14:30:41 / claus"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1872
    "Modified: 12.6.1996 / 11:37:33 / stefan"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1873
    "Modified: 15.11.1996 / 11:32:21 / cg"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1874
    "Created: 1.4.1997 / 16:04:33 / stefan"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1875
!
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1876
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1877
fileOutCategory:aCategory methodFilter:methodFilter on:aStream
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1878
    "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
  1879
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1880
    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
  1881
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1882
    "Created: 1.4.1997 / 16:04:44 / stefan"
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1883
!
c0f5ef2bac18 additional protocol for selective fileout
Claus Gittinger <cg@exept.de>
parents: 4648
diff changeset
  1884
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1885
fileOutCategory:aCategory on:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1886
    "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
  1887
5192
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1888
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1889
    "/ 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
  1890
    "/
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1891
    Class fileOutNameSpaceQuerySignal answer:true do:[
9f0f4d7eaa33 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5187
diff changeset
  1892
        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
  1893
    ]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1894
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1895
    "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
  1896
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1897
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1898
fileOutMethod:aMethod
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1899
    "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
  1900
     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
  1901
     directory."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1902
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1903
    |aStream fileName selector|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1904
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1905
    selector := self selectorAtMethod:aMethod.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1906
    selector notNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1907
	fileName := (self name , '-' , selector, '.st') asFilename.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1908
	fileName makeLegalFilename.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1909
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1910
	"
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1911
	 this test allows a smalltalk to be built without Projects/ChangeSets
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1912
	"
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1913
	Project notNil ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1914
	    fileName := Project currentProjectDirectory asFilename construct:fileName name.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1915
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1916
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1917
	"
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1918
	 if file exists, save original in a .sav file
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1919
	"
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1920
	fileName exists ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1921
	    fileName copyTo:(fileName withSuffix: 'sav')
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1922
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1923
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1924
	fileName := fileName name.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1925
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1926
	aStream := FileStream newFileNamed:fileName.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1927
	aStream isNil ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1928
	    ^ FileOutErrorSignal 
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1929
		raiseRequestWith:fileName
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1930
		errorString:('cannot create file:', fileName)
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1931
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1932
	self fileOutMethod:aMethod on:aStream.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  1933
	aStream close
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1934
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1935
3050
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1936
    "Modified: / 1.4.1997 / 16:00:57 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1937
    "Created: / 2.4.1997 / 00:24:28 / stefan"
d08734c8be27 use Filename protocol when generating fileNames;
Claus Gittinger <cg@exept.de>
parents: 3047
diff changeset
  1938
    "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
  1939
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1940
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1941
fileOutMethod:aMethod on:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1942
    "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
  1943
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1944
    |dict cat source privacy|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1945
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1946
    dict := self methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1947
    dict notNil ifTrue:[
5193
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1948
        aStream nextPutChunkSeparator.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1949
        self name printOn:aStream.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1950
"/        self printClassNameOn:aStream.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1951
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1952
        (privacy := aMethod privacy) ~~ #public ifTrue:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1953
            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
  1954
        ] ifFalse:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1955
            aStream nextPutAll:' methodsFor:'.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1956
        ].
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1957
        cat := aMethod category.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1958
        cat isNil ifTrue:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1959
            cat := ''
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1960
        ].
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1961
        aStream nextPutAll:cat asString storeString.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1962
        aStream nextPutChunkSeparator; cr; cr.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1963
        source := aMethod source.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1964
        source isNil ifTrue:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1965
            FileOutErrorSignal 
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1966
                raiseRequestWith:self
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1967
                errorString:('no source for method: ' ,
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1968
                             self name , '>>' ,
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1969
                             (self selectorAtMethod:aMethod))
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1970
        ] ifFalse:[
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1971
            aStream nextChunkPut:source.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1972
        ].
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1973
        aStream space.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1974
        aStream nextPutChunkSeparator.
a54e016b1b30 must use full class name (ie. with namespace prefix)
Claus Gittinger <cg@exept.de>
parents: 5192
diff changeset
  1975
        aStream cr
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1976
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1977
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1978
    "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
  1979
    "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
  1980
    "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
  1981
    "Created: 2.4.1997 / 00:24:33 / stefan"
5216
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1982
!
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1983
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1984
fileOutMethods:methods on:aStream
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1985
    methods do:[:aMethod |
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1986
        self fileOutMethod:aMethod on:aStream
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1987
    ].
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1988
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1989
    "Created: / 29.1.2000 / 16:39:53 / cg"
548dc9332d0e added #fileOutMethods:
Claus Gittinger <cg@exept.de>
parents: 5193
diff changeset
  1990
    "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
  1991
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  1992
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  1993
!ClassDescription methodsFor:'fileOut-xml'!
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  1994
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  1995
fileOutXMLCategory:aCategory methodFilter:methodFilter on:aStream
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  1996
    "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
  1997
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  1998
    |dict source sortedSelectors first privacy interestingMethods cat|
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  1999
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2000
    dict := self methodDictionary.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2001
    dict notNil ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2002
        interestingMethods := OrderedCollection new.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2003
        dict do:[:aMethod |
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2004
            (methodFilter isNil
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2005
            or:[methodFilter value:aMethod]) ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2006
                (aCategory = aMethod category) ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2007
                    interestingMethods add:aMethod.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2008
                ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2009
            ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2010
        ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2011
        interestingMethods notEmpty ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2012
            first := true.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2013
            privacy := nil.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2014
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2015
            "/
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2016
            "/ sort by selector
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2017
            "/
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2018
            sortedSelectors := interestingMethods collect:[:m | self selectorAtMethod:m].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2019
            sortedSelectors sortWith:interestingMethods.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2020
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2021
            interestingMethods do:[:aMethod |
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2022
                first ifFalse:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2023
                    privacy ~~ aMethod privacy ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2024
                        first := true.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2025
                        aStream nextPutLine:'</methods>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2026
                    ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2027
                ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2028
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2029
                privacy := aMethod privacy.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2030
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2031
                first ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2032
                    cat := aCategory.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2033
                    cat isNil ifTrue:[ cat := '' ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2034
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2035
                    aStream nextPutLine:'<methods>'.
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2036
                    aStream nextPutAll:'  <class-id>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2037
                    aStream nextPutAll:self name.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2038
                    aStream nextPutLine:'</class-id>'.
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2039
                    aStream nextPutAll:'  <category>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2040
                    aStream nextPutAll:cat.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2041
                    aStream nextPutLine:'</category>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2042
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2043
                    privacy ~~ #public ifTrue:[
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2044
                        aStream nextPutAll:'  <privacy>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2045
                        aStream nextPutAll:privacy.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2046
                        aStream nextPutLine:'</privacy>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2047
                    ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2048
                    first := false.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2049
                ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2050
                source := aMethod source.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2051
                source isNil ifTrue:[
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2052
                    FileOutErrorSignal 
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2053
                        raiseRequestWith:self
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2054
                        errorString:'no source for method: ', (aMethod displayString)
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2055
                ] ifFalse:[
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2056
                    aStream nextPutAll:'  <body>'.
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2057
                    self fileOutXMLString:source on:aStream.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2058
                    aStream nextPutLine:'</body>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2059
                ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2060
            ].
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2061
            aStream nextPutLine:'</methods>'.
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2062
        ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2063
    ]
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2064
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2065
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2066
!
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2067
5465
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2068
fileOutXMLMethod:aMethod on:aStream
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2069
    "file out a method in xml format onto aStream."
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2070
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2071
    |source privacy|
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2072
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2073
    privacy := aMethod privacy.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2074
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2075
    aStream nextPutLine:'<methods>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2076
    aStream nextPutAll:'  <class-id>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2077
    aStream nextPutAll:self name.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2078
    aStream nextPutLine:'</class-id>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2079
    aStream nextPutAll:'  <category>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2080
    aStream nextPutAll:(aMethod category ?'').
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2081
    aStream nextPutLine:'</category>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2082
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2083
    privacy ~~ #public ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2084
        aStream nextPutAll:'  <privacy>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2085
        aStream nextPutAll:privacy.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2086
        aStream nextPutLine:'</privacy>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2087
    ].
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2088
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2089
    source := aMethod source.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2090
    source isNil ifTrue:[
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2091
        FileOutErrorSignal 
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2092
            raiseRequestWith:self
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2093
            errorString:'no source for method: ', (aMethod displayString)
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2094
    ] ifFalse:[
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2095
        aStream nextPutAll:'  <body>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2096
        self fileOutXMLString:source on:aStream.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2097
        aStream nextPutLine:'  </body>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2098
    ].
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2099
    aStream nextPutLine:'</methods>'.
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2100
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2101
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2102
!
Claus Gittinger <cg@exept.de>
parents: 5384
diff changeset
  2103
5374
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2104
fileOutXMLString:someString on:aStream
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2105
    "append an xml-escaped string to aStream."
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2106
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2107
    aStream nextPutAll:(XMLRepresenter escapedString:someString)
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2108
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2109
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2110
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2111
! !
df453d2c7390 first attempt in XML storage
Claus Gittinger <cg@exept.de>
parents: 5369
diff changeset
  2112
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2113
!ClassDescription methodsFor:'printOut'!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2114
4648
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2115
nameWithNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2116
    "return my names printString, 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2117
     with nameSpace prefix (even if its the Smalltalk namespace)"
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2118
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2119
    |nm owner|
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2120
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2121
    (owner := self owningClass) notNil ifTrue:[
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2122
        ^ (owner nameWithNameSpacePrefix , '::' , self nameWithoutPrefix)
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2123
    ]. 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2124
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2125
    nm := self name.
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2126
    self nameSpace == Smalltalk ifTrue:[
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2127
        nm := 'Smalltalk::' , nm
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2128
    ].
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2129
    ^ nm
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2130
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2131
    "a public class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2132
     Array name                 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2133
     Array nameWithoutPrefix    
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2134
     Array nameWithoutNameSpacePrefix  
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2135
     Array nameWithNameSpacePrefix     
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2136
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2137
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2138
    "a private class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2139
     Method::MethodWhoInfo name                         
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2140
     Method::MethodWhoInfo nameWithoutPrefix            
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2141
     Method::MethodWhoInfo nameWithoutNameSpacePrefix   
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2142
     Method::MethodWhoInfo nameWithNameSpacePrefix   
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2143
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2144
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2145
    "a namespace class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2146
     CodingExamples::TopClass name                      
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2147
     CodingExamples::TopClass nameWithoutPrefix         
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2148
     CodingExamples::TopClass nameWithoutNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2149
     CodingExamples::TopClass nameWithNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2150
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2151
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2152
    "a private class in a namespace class:
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2153
     CodingExamples::TopClass::SubClass name   
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2154
     CodingExamples::TopClass::SubClass nameWithoutPrefix 
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2155
     CodingExamples::TopClass::SubClass nameWithoutNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2156
     CodingExamples::TopClass::SubClass nameWithNameSpacePrefix
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2157
    "
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2158
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2159
    "Modified: 5.1.1997 / 18:22:57 / cg"
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2160
    "Created: 1.4.1997 / 16:20:13 / stefan"
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2161
!
2b8bba444185 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4604
diff changeset
  2162
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2163
nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2164
    "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
  2165
     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
  2166
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2167
    |nm owner|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2168
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2169
    nm := self nameWithoutPrefix.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2170
    (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
  2171
	^ nm
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2172
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2173
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2174
    ^ (owner nameWithoutNameSpacePrefix , '::' , nm)
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2175
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2176
    "a public class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2177
     Array name                 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2178
     Array nameWithoutPrefix    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2179
     Array nameWithoutNameSpacePrefix 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2180
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2181
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2182
    "a private class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2183
     Method::MethodWhoInfo name                         
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2184
     Method::MethodWhoInfo nameWithoutPrefix            
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2185
     Method::MethodWhoInfo nameWithoutNameSpacePrefix   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2186
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2187
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2188
    "a namespace class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2189
     CodingExamples::TopClass name                      
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2190
     CodingExamples::TopClass nameWithoutPrefix         
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2191
     CodingExamples::TopClass nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2192
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2193
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2194
    "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
  2195
     CodingExamples::TopClass::SubClass name   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2196
     CodingExamples::TopClass::SubClass nameWithoutPrefix 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2197
     CodingExamples::TopClass::SubClass nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2198
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2199
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2200
    "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
  2201
    "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
  2202
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2203
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2204
nameWithoutPrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2205
    "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
  2206
     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
  2207
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2208
    |nm idx|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2209
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2210
    nm := self name.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2211
    idx := nm lastIndexOf:$:.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2212
    idx == 0 ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2213
	^ nm
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2214
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2215
    ^ nm copyFrom:idx+1.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2216
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2217
    "a public class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2218
     Array name                 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2219
     Array nameWithoutPrefix    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2220
     Array nameWithoutNameSpacePrefix 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2221
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2222
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2223
    "a private class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2224
     Method::MethodWhoInfo name                         
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2225
     Method::MethodWhoInfo nameWithoutPrefix            
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2226
     Method::MethodWhoInfo nameWithoutNameSpacePrefix   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2227
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2228
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2229
    "a namespace class:
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2230
     CodingExamples::TopClass name                      
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2231
     CodingExamples::TopClass nameWithoutPrefix         
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2232
     CodingExamples::TopClass nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2233
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2234
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2235
    "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
  2236
     CodingExamples::TopClass::SubClass name   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2237
     CodingExamples::TopClass::SubClass nameWithoutPrefix 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2238
     CodingExamples::TopClass::SubClass nameWithoutNameSpacePrefix
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2239
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2240
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2241
    "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
  2242
    "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
  2243
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2244
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2245
printClassNameOn:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2246
    "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
  2247
     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
  2248
     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
  2249
     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
  2250
     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
  2251
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2252
    |nm|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2253
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2254
    Class fileOutNameSpaceQuerySignal query == false ifTrue:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2255
        nm := self nameWithoutNameSpacePrefix
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2256
    ] ifFalse:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2257
        nm := self name.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2258
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2259
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2260
    aStream nextPutAll:nm.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2261
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2262
    "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
  2263
    "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
  2264
    "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
  2265
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2266
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2267
printHierarchyAnswerIndentOn:aStream
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2268
    "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
  2269
     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
  2270
     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
  2271
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2272
    |indent nm|
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2273
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2274
    indent := 0.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2275
    (superclass notNil) ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2276
	indent := (superclass printHierarchyAnswerIndentOn:aStream) + 2
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2277
    ].
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2278
    aStream spaces:indent.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2279
    nm := self printNameInHierarchy.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2280
    aStream nextPutAll:nm; nextPutAll:' ('.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2281
    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
  2282
    aStream nextPutLine:')'.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2283
    ^ indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2284
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2285
    "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
  2286
    "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
  2287
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2288
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2289
printHierarchyOn:aStream
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2290
    "print my class hierarchy on aStream"
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2291
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2292
    self printHierarchyAnswerIndentOn:aStream
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2293
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2294
    "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
  2295
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2296
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2297
printInstVarNamesOn:aStream indent:indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2298
    "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
  2299
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2300
    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
  2301
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2302
    "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
  2303
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2304
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2305
printNameArray:anArray on:aStream indent:indent
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2306
    "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
  2307
     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
  2308
     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
  2309
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2310
    |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
  2311
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2312
    arraySize := anArray size.
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2313
    arraySize ~~ 0 ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2314
	pos := indent.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2315
	lenMax := aStream lineLength.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2316
	thisName := anArray at:1.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2317
	line := ''.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2318
	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
  2319
	    line := line , thisName.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2320
	    pos := pos + thisName size.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2321
	    (index == arraySize) ifFalse:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2322
		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
  2323
		mustBreak := false.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2324
		(lenMax > 0) ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2325
		    ((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
  2326
			mustBreak := true
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2327
		    ]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2328
		].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2329
		mustBreak ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2330
		    aStream nextPutLine:line withTabs.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2331
		    spaces isNil ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2332
			spaces := String new:indent
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2333
		    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2334
		    line := spaces.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2335
		    pos := indent
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2336
		] ifFalse:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2337
		    line := line , ' '.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2338
		    pos := pos + 1
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2339
		].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2340
		thisName := nextName
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2341
	    ]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2342
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2343
	aStream nextPutAll:line withTabs
2483
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2344
    ]
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2345
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2346
    "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
  2347
    "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
  2348
!
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2349
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2350
printNameInHierarchy
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2351
    "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
  2352
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2353
    ^ self name
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2354
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2355
    "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
  2356
!
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2357
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2358
printOutCategory:aCategory on:aPrintStream
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2359
    "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
  2360
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2361
    |dict any|
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2362
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2363
    dict := self methodDictionary.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2364
    dict notNil ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2365
	any := false.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2366
	dict do:[:aMethod |
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2367
	    (aCategory = aMethod category) ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2368
		any := true
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2369
	    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2370
	].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2371
	any ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2372
	     aPrintStream italic.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2373
	     aPrintStream nextPutAll:aCategory.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2374
	     aPrintStream normal.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2375
	     aPrintStream cr; cr.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2376
	     dict do:[:aMethod |
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2377
		 (aCategory = aMethod category) ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2378
		     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
  2379
		     aPrintStream cr; cr
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2380
		 ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2381
	     ].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2382
	     aPrintStream cr
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2383
	 ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2384
    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2385
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2386
    "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
  2387
    "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
  2388
!
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2389
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2390
printOutSource:aString on:aPrintStream
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2391
    "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
  2392
     comments are printed italic"
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2393
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2394
    |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
  2395
    text := aString asStringCollection.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2396
    aPrintStream bold.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2397
    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
  2398
    aPrintStream normal.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2399
    aPrintStream cr.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2400
    inComment := false.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2401
    textSize := text size.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2402
    textIndex := 2.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2403
    [textIndex <= textSize] whileTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2404
	line := text at:textIndex.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2405
	((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
  2406
	    aPrintStream nextPutAll:line
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2407
	] ifFalse:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2408
	    lineSize := line size.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2409
	    lineIndex := 1.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2410
	    [lineIndex <= lineSize] whileTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2411
		aCharacter := line at:lineIndex.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2412
		(aCharacter == Character doubleQuote) ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2413
		    inComment ifTrue:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2414
			aPrintStream normal.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2415
			aPrintStream nextPut:aCharacter.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2416
			inComment := false
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2417
		    ] ifFalse:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2418
			aPrintStream nextPut:aCharacter.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2419
			aPrintStream italic.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2420
			inComment := true
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2421
		    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2422
		] ifFalse:[
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2423
		    aPrintStream nextPut:aCharacter
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2424
		].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2425
		lineIndex := lineIndex + 1
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2426
	    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2427
	].
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2428
	aPrintStream cr.
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2429
	textIndex := textIndex + 1
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2430
    ]
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2431
dc74552b86de had to move some printOut methods from class to here;
Claus Gittinger <cg@exept.de>
parents: 3219
diff changeset
  2432
    "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
  2433
! !
fb469352be7d moved some printOut methods from Class to here.
Claus Gittinger <cg@exept.de>
parents: 2451
diff changeset
  2434
92
0c73b48551ac *** empty log message ***
claus
parents: 88
diff changeset
  2435
!ClassDescription methodsFor:'printing & storing'!
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
  2436
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
  2437
displayString
293
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2438
    "return a string for display in inspectors"
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2439
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2440
    |nm more cat|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2441
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2442
    cat := self category.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2443
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2444
    (cat = 'obsolete'
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2445
    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
  2446
	"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
  2447
	more := ' (obsolete)'
68
59faa75185ba *** empty log message ***
claus
parents: 10
diff changeset
  2448
    ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2449
    (cat = 'removed'
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2450
    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
  2451
	"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
  2452
	more := ' (removed)'
155
edd7fc34e104 *** empty log message ***
claus
parents: 92
diff changeset
  2453
    ].
293
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2454
1745
179abaf65cd6 print private classes nicer
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  2455
    self isPrivate ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2456
	nm := self nameWithoutPrefix.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2457
	more := ' (private in ' , self owningClass name , ')'.
1745
179abaf65cd6 print private classes nicer
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  2458
    ] ifFalse:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2459
	nm := self name.
1745
179abaf65cd6 print private classes nicer
Claus Gittinger <cg@exept.de>
parents: 1740
diff changeset
  2460
    ].
293
31df3850e98c *** empty log message ***
claus
parents: 249
diff changeset
  2461
    more isNil ifTrue:[^ nm].
1652
a22f878fd71f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  2462
    ^ nm , more
a22f878fd71f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1554
diff changeset
  2463
1757
c153e56cbcad *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1745
diff changeset
  2464
    "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
  2465
    "Modified: 1.4.1997 / 15:49:13 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2466
! !
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2467
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2468
!ClassDescription methodsFor:'private changes management'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2469
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2470
addChangeRecordForMethod:aMethod to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2471
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2472
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2473
    "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
  2474
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2475
    self fileOutMethod:aMethod on:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2476
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2477
    "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
  2478
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2479
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2480
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
  2481
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2482
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2483
    "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
  2484
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2485
    |selector|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2486
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2487
    selector := aMethod selector.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2488
    selector notNil ifTrue:[
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2489
	aStream nextPutAll:'('.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2490
	self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2491
	aStream nextPutAll:(' compiledMethodAt:' , selector storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2492
	aStream nextPutAll:(') category:' , newCategory storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2493
	aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2494
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2495
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2496
    "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
  2497
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2498
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2499
addChangeRecordForMethodPrivacy:aMethod to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2500
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2501
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2502
    "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
  2503
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2504
    |selector|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2505
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2506
    selector := aMethod selector.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2507
    selector notNil ifTrue:[
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2508
	aStream nextPutAll:'('.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2509
	self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2510
	aStream nextPutAll:(' compiledMethodAt:' , selector storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2511
	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
  2512
	aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2513
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2514
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2515
    "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
  2516
    "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
  2517
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2518
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2519
addChangeRecordForRemoveSelector:aSelector to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2520
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2521
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2522
    "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
  2523
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2524
    self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2525
    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
  2526
    aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2527
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2528
    "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
  2529
    "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
  2530
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2531
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2532
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
  2533
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2534
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2535
    "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
  2536
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2537
    self printClassNameOn:aStream.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2538
    aStream nextPutAll:(' renameCategory:' , oldCategory storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2539
    aStream nextPutAll:(' to:' , newCategory storeString).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2540
    aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2541
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2542
    "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
  2543
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2544
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2545
addInfoRecord:aMessage to:aStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2546
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2547
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2548
    "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
  2549
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2550
    aStream nextPutAll:('''---- ' , aMessage , ' ',
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2551
			Date today printString , ' ' ,
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2552
			Time now printString ,
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2553
			' ----''').
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2554
    aStream nextPutChunkSeparator.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2555
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2556
    "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
  2557
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2558
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2559
writingChangeDo:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2560
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2561
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2562
    "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
  2563
     Opens the changefile and executes aBlock passing the stream
2689
ada9b102abcf typo fix
Claus Gittinger <cg@exept.de>
parents: 2676
diff changeset
  2564
     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
  2565
     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
  2566
     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
  2567
     be lost due to buffering."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2568
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2569
    self writingChangeWithTimeStamp:true do:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2570
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2571
    "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
  2572
    "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
  2573
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2574
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2575
writingChangePerform:aSelector with:anArgument
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2576
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2577
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2578
    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
  2579
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2580
    "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
  2581
    "Created: 2.4.1997 / 17:33:03 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2582
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2583
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2584
writingChangeWithTimeStamp:doStampIt do:aBlock
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2585
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2586
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2587
    "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
  2588
     Opens the changefile and executes aBlock passing the stream
2689
ada9b102abcf typo fix
Claus Gittinger <cg@exept.de>
parents: 2676
diff changeset
  2589
     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
  2590
     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
  2591
     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
  2592
     be lost due to buffering.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2593
     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
  2594
     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
  2595
     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
  2596
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2597
    ChangeFileAccessLock critical:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2598
	|aStream|
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2599
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2600
	FileOutNameSpaceQuerySignal answer:true
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2601
	do:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2602
	    aStream := self changesStream.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2603
	    aStream notNil ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2604
		[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2605
		    FileStream writeErrorSignal handle:[:ex |
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2606
			self warn:('could not update the changes-file\\' , ex errorString) withCRs.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2607
			ex return
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2608
		    ] do:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2609
			doStampIt ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2610
			    self addChangeTimeStampTo:aStream
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2611
			].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2612
			aBlock value:aStream.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2613
			aStream cr.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2614
		    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2615
		] valueNowOrOnUnwindDo:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2616
		    aStream close
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2617
		]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2618
	    ]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2619
	]
2666
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
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2622
    "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
  2623
    "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
  2624
!
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
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
  2627
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2628
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2629
    self writingChangeWithTimeStamp:stampIt do:[:stream |
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2630
	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
  2631
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2632
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2633
    "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
  2634
! !
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
!ClassDescription methodsFor:'private helpers'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2637
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2638
addAllCategoriesTo:aCollection
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2639
    "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
  2640
     to the argument, aCollection"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2641
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2642
    (superclass notNil) ifTrue:[
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2643
	superclass addAllCategoriesTo:aCollection
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
    self addCategoriesTo:aCollection
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
    "Created: 1.4.1997 / 23:52:27 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2648
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2649
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2650
addCategoriesTo:aCollection
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2651
    "helper - add categories to the argument, aCollection"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2652
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2653
    self methodDictionary do:[:aMethod |
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2654
	|cat|
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2655
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2656
	cat := aMethod category.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2657
	(aCollection includes:cat) ifFalse:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2658
	    aCollection add:cat
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2659
	]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2660
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2661
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2662
    "Modified: 12.6.1996 / 11:46:24 / stefan"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2663
    "Created: 1.4.1997 / 23:52:38 / stefan"
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
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2666
!ClassDescription methodsFor:'protocol printOut'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2667
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2668
printOutCategoryProtocol:aCategory on:aPrintStream
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2669
    "{ Pragma: +optSpace }"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2670
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2671
    |dict any|
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
    dict := self methodDictionary.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2674
    dict notNil ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2675
	any := false.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2676
	dict do:[:aMethod |
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2677
	    (aCategory = aMethod category) ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2678
		any := true
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2679
	    ]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2680
	].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2681
	any ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2682
	    aPrintStream italic.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2683
	    aPrintStream nextPutAll:aCategory.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2684
	    aPrintStream normal.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2685
	    aPrintStream cr; cr.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2686
	    dict do:[:aMethod |
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2687
		(aCategory = aMethod category) ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2688
		    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
  2689
		    aPrintStream cr; cr
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2690
		]
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2691
	    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2692
	    aPrintStream cr
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2693
	]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2694
    ]
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2695
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2696
    "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
  2697
    "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
  2698
    "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
  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
printOutMethodProtocol:aMethod on:aPrintStream
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
    "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
  2705
     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
  2706
     pages"
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2707
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2708
    |text comment|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2709
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2710
    text := aMethod source asStringCollection.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2711
    (text size < 1) ifTrue:[^self].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2712
    aPrintStream bold.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2713
    aPrintStream nextPutLine:(text at:1).
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2714
    (text size >= 2) ifTrue:[
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2715
	(comment := aMethod comment) notNil ifTrue:[
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2716
	    aPrintStream italic.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2717
	    aPrintStream spaces:((text at:2) indexOfNonSeparatorStartingAt:1).
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2718
	    aPrintStream nextPutLine:aMethod comment.
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  2719
	]
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2720
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2721
    aPrintStream normal
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2722
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2723
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2724
      Float printOutProtocolOn:Stdout 
620
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
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2727
    "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
  2728
    "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
  2729
! !
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2730
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2731
!ClassDescription methodsFor:'queries'!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2732
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2733
allCategories
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2734
    "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
  2735
     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
  2736
     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
  2737
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2738
    |coll|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2739
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2740
    coll := OrderedCollection new.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2741
    self addAllCategoriesTo:coll.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2742
    ^ coll
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2743
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2744
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2745
     Point categories  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2746
     Point allCategories 
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2747
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2748
     Point class categories   
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2749
     Point class allCategories  
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2750
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2751
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2752
    "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
  2753
    "Created: 1.4.1997 / 15:57:41 / stefan"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2754
!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2755
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2756
categories
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2757
    "Return a collection of all method-categories known in the receiver class.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2758
     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
  2759
     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
  2760
5384
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2761
    |newList|
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2762
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2763
    newList := Set new.
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2764
    self methodDictionary do:[:aMethod |
5384
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2765
        |cat|
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2766
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2767
        cat := aMethod category.
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2768
        cat isNil ifTrue:[
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2769
            cat := '* no category *'
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2770
        ].
8f624b47eebe categories
Claus Gittinger <cg@exept.de>
parents: 5374
diff changeset
  2771
        newList add:cat
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2772
    ].
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2773
    ^ newList
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2774
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2775
    "
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2776
     Point categories    
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2777
     Point class categories  
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2778
    "
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
    "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
  2781
    "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
  2782
    "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
  2783
!
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2784
5554
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2785
isObsolete 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2786
    "return true, if the receiver is obsolete 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2787
     (i.e. has been replaced by a different class or was removed, 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2788
      but is still referenced by instanced)"
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2789
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2790
    |cat|
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2791
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2792
    cat := self category.
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2793
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2794
    ^ cat = 'obsolete' 
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2795
      or:[cat = 'removed'
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2796
      or:[cat = '* removed *'
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2797
      or:[cat = '* obsolete *']]]
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2798
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2799
    "Modified: 10.9.1996 / 14:02:07 / cg"
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2800
    "Modified: 1.4.1997 / 15:49:49 / stefan"
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2801
!
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  2802
3621
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2803
sourceCodeForMethod:aMethod at:aSelector
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2804
    ^ aMethod source
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2805
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2806
    "Created: / 19.6.1998 / 02:28:09 / cg"
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2807
!
d98d21976dec had to move #sourceCodeForMethod up.
Claus Gittinger <cg@exept.de>
parents: 3616
diff changeset
  2808
3616
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2809
whichCategoryIncludesSelector:aSelector
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2810
    "return the category under which the method for aSelector is
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2811
     classified"
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2812
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2813
    ^ (self compiledMethodAt:aSelector) category
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2814
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2815
    "Created: / 19.6.1998 / 00:25:48 / cg"
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2816
    "Modified: / 19.6.1998 / 01:00:07 / cg"
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2817
!
c2f0a1519163 added #whichCategoryIncludesSelector
Claus Gittinger <cg@exept.de>
parents: 3606
diff changeset
  2818
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2819
whichClassDefinesInstVar:aVariableName
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2820
    "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
  2821
     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
  2822
     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
  2823
     many throw away intermediate objects."
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2824
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2825
    |cls|
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2826
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2827
    cls := self.
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2828
    [cls notNil] whileTrue:[
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2829
	(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
  2830
	cls := cls superclass
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2831
    ].
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2832
    ^ nil
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2833
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2834
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2835
     StandardSystemView whichClassDefinesInstVar:'label'  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2836
     StandardSystemView whichClassDefinesInstVar:'paint'  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2837
     StandardSystemView whichClassDefinesInstVar:'foo'  
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2838
    "
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2839
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  2840
    "Created: 2.4.1997 / 01:12:27 / stefan"
2701
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2841
!
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2842
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2843
whichSelectorsAccess:instVarName
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2844
    "return a collection of selectors for methods which access
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2845
     an instance variable"
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2846
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2847
    |set|
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2848
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2849
    set := IdentitySet new.
5369
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  2850
    self selectorsAndMethodsDo:[:sel :mthd |
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  2851
        (mthd accessedInstVars includes:instVarName) ifTrue:[
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  2852
            set add:sel
fca9dd911c93 use #selectorsAndMethodsDo:
Claus Gittinger <cg@exept.de>
parents: 5346
diff changeset
  2853
        ]
2701
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2854
    ].
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2855
    ^ set.
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2856
15b5260a9e91 more ST80 compatibility
Claus Gittinger <cg@exept.de>
parents: 2689
diff changeset
  2857
    "Created: 19.6.1997 / 17:51:50 / cg"
620
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2858
! !
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2859
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2860
!ClassDescription methodsFor:'special accessing'!
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2861
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2862
setInstanceVariableString:aString
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2863
    "set the classes instvarnames string - no recompilation
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2864
     or updates are done and no changeList records are written.
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2865
     This is NOT for general use."
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2866
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2867
    instvars := aString.
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2868
! !
c7353f86a302 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 528
diff changeset
  2869
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2870
!ClassDescription methodsFor:'subclass creation'!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2871
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2872
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
  2873
    "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
  2874
     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
  2875
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2876
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2877
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2878
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2879
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2880
    self isVariable ifFalse:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2881
        ^ self class
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2882
            name:nameSymbol  
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2883
            inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2884
            subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2885
            instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2886
            variable:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2887
            words:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2888
            pointers:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2889
            classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2890
            poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2891
            category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2892
            comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2893
            changed:true 
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2894
    ].
2435
08f60d7c2c11 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 2365
diff changeset
  2895
    ^ self 
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2896
        perform:(self definitionSelector)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2897
        withArguments:(Array with:nameSymbol 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2898
                           with:instVarNameString 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2899
                           with:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2900
                           with:pool 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2901
                           with:cat).
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2902
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2903
    "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
  2904
    "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
  2905
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2906
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2907
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
  2908
    "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
  2909
     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
  2910
3977
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2911
    |rslt|
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2912
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2913
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2914
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2915
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2916
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2917
    self isVariable ifTrue:[
3977
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2918
        Class nameSpaceQuerySignal answer:aNameSpace
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2919
        do:[
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2920
            rslt := self
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2921
                subclass:nameSymbol 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2922
                instanceVariableNames:instVarNameString 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2923
                classVariableNames:classVarString 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2924
                poolDictionaries:pool 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2925
                category:cat 
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2926
        ].
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2927
        ^ rslt
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2928
    ].
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2929
    ^ self class
3977
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2930
        name:nameSymbol  
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2931
        inEnvironment:aNameSpace
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2932
        subclassOf:self
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2933
        instanceVariableNames:instVarNameString
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2934
        variable:false
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2935
        words:true
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2936
        pointers:true
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2937
        classVariableNames:classVarString
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2938
        poolDictionaries:pool
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2939
        category:cat
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2940
        comment:nil
57eb1e1f6dd0 avoid return from unwind-block
Claus Gittinger <cg@exept.de>
parents: 3965
diff changeset
  2941
        changed:true
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2942
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2943
    "Created: 8.2.1997 / 19:41:44 / cg"
2893
8ba406da6b22 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 2891
diff changeset
  2944
    "Modified: 31.8.1997 / 07:48:14 / cg"
2365
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2945
!
407104ea10db additional entry, passing the environment
Claus Gittinger <cg@exept.de>
parents: 1912
diff changeset
  2946
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2947
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
  2948
    "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
  2949
     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
  2950
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2951
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2952
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2953
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2954
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2955
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2956
        self isBytes ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2957
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2958
                '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
  2959
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2960
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2961
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2962
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2963
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2964
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2965
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2966
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2967
        variable:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2968
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2969
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2970
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2971
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2972
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2973
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2974
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2975
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2976
    "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
  2977
    "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
  2978
    "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
  2979
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2980
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2981
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
  2982
    "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
  2983
     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
  2984
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2985
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2986
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2987
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  2988
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2989
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2990
        self isDoubles ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2991
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2992
                '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
  2993
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2994
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2995
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  2996
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2997
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2998
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  2999
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3000
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3001
        variable:#double 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3002
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3003
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3004
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3005
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3006
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3007
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3008
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3009
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3010
    "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
  3011
    "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
  3012
    "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
  3013
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3014
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3015
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
  3016
    "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
  3017
     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
  3018
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3019
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3020
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3021
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3022
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3023
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3024
        self isFloats ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3025
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3026
                '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
  3027
        ].
1715
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
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3030
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3031
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3032
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3033
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3034
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3035
        variable:#float 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3036
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3037
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3038
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3039
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3040
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3041
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3042
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3043
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3044
    "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
  3045
    "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
  3046
    "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
  3047
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3048
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3049
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
  3050
    "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
  3051
     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
  3052
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3053
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3054
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3055
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3056
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3057
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3058
        self isLongLongs ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3059
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3060
                '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
  3061
        ].
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3062
    ].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3063
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3064
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3065
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3066
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3067
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3068
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3069
        variable:#longLong
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3070
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3071
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3072
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3073
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3074
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3075
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3076
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3077
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3078
    "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
  3079
!
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3080
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3081
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
  3082
    "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
  3083
     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
  3084
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3085
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3086
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3087
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3088
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3089
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3090
        self isLongs ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3091
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3092
                'cannot make a variable 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
  3093
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3094
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3095
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3096
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3097
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3098
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3099
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3100
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3101
        variable:#long 
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3102
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3103
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3104
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3105
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3106
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3107
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3108
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3109
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3110
    "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
  3111
    "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
  3112
    "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
  3113
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3114
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3115
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
  3116
    "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
  3117
     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
  3118
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3119
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3120
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3121
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3122
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3123
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3124
        self isSignedLongLongs ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3125
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3126
                '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
  3127
        ].
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3128
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3129
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3130
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3131
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3132
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3133
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3134
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3135
        variable:#signedLongLong
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3136
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3137
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3138
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3139
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3140
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3141
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3142
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3143
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3144
    "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
  3145
!
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3146
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3147
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
  3148
    "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
  3149
     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
  3150
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3151
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3152
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3153
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3154
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3155
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3156
        self isSignedLongs ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3157
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3158
                '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
  3159
        ].
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
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3163
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3164
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3165
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3166
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3167
        variable:#signedLong
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3168
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3169
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3170
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3171
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3172
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3173
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3174
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3175
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3176
    "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
  3177
    "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
  3178
    "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
  3179
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3180
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3181
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
  3182
    "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
  3183
     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
  3184
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3185
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3186
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3187
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3188
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3189
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3190
        self isSignedWords ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3191
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3192
                '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
  3193
        ].
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
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3197
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3198
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3199
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3200
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3201
        variable:#signedWord
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3202
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3203
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3204
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3205
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3206
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3207
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3208
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3209
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3210
    "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
  3211
    "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
  3212
    "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
  3213
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3214
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3215
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
  3216
    "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
  3217
     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
  3218
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3219
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3220
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3221
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3222
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3223
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3224
        self isPointers ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3225
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3226
                '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
  3227
        ]
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
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3230
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3231
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3232
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3233
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3234
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3235
        variable:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3236
        words:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3237
        pointers:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3238
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3239
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3240
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3241
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3242
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3243
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3244
    "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
  3245
    "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
  3246
    "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
  3247
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3248
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3249
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
  3250
    "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
  3251
     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
  3252
4302
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3253
    self isLoaded ifFalse:[
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3254
        ^ self loadAndResendMessage
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3255
    ].
b16969865f9f changed the way subclass-creation messages are handled
Claus Gittinger <cg@exept.de>
parents: 4112
diff changeset
  3256
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3257
    self isVariable ifTrue:[
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3258
        self isWords ifFalse:[
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3259
            ^ self error:
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3260
                'cannot make a variable 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
  3261
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3262
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3263
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3264
    ^ self class
4056
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3265
        name:nameSymbol
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3266
        inEnvironment:(Class nameSpaceQuerySignal query)
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3267
        subclassOf:self
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3268
        instanceVariableNames:instVarNameString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3269
        variable:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3270
        words:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3271
        pointers:false
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3272
        classVariableNames:classVarString
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3273
        poolDictionaries:pool
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3274
        category:cat
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3275
        comment:nil
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3276
        changed:true
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3277
be7526a49a8b Use #query instead of #raise when invoking QuerySignals
Stefan Vogel <sv@exept.de>
parents: 4049
diff changeset
  3278
    "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
  3279
    "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
  3280
    "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
  3281
! !
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3282
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3283
!ClassDescription methodsFor:'subclass creation - private classes'!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3284
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3285
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
  3286
    "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
  3287
     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
  3288
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3289
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3290
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3291
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3292
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3293
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3294
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3295
    self isVariable ifFalse:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3296
        newClass := self class
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3297
            name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3298
            inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3299
            subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3300
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3301
            variable:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3302
            words:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3303
            pointers:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3304
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3305
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3306
            category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3307
            comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3308
            changed:true.
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3309
        ^ newClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3310
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3311
    self isBytes ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3312
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3313
            variableByteSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3314
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3315
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3316
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3317
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3318
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3319
    self isLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3320
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3321
            variableLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3322
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3323
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3324
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3325
            privateIn:aClass
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3326
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3327
    self isLongLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3328
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3329
            variableLongLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3330
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3331
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3332
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3333
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3334
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3335
    self isFloats ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3336
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3337
            variableFloatSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3338
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3339
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3340
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3341
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3342
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3343
    self isDoubles ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3344
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3345
            variableDoubleSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3346
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3347
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3348
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3349
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3350
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3351
    self isWords ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3352
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3353
            variableWordSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3354
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3355
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3356
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3357
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3358
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3359
    self isSignedWords ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3360
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3361
            variableSignedWordSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3362
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3363
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3364
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3365
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3366
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3367
    self isSignedLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3368
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3369
            variableSignedLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3370
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3371
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3372
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3373
            privateIn:aClass
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3374
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3375
    self isSignedLongLongs ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3376
        ^ self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3377
            variableSignedLongLongSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3378
            instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3379
            classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3380
            poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3381
            privateIn:aClass
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3382
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3383
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3384
    ^ self
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3385
        variableSubclass:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3386
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3387
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3388
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3389
        privateIn:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3390
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3391
    "Created: / 11.10.1996 / 16:30:53 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3392
    "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
  3393
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3394
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3395
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
  3396
    "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
  3397
     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
  3398
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3399
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3400
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3401
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3402
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3403
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3404
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3405
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3406
        self isBytes ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3407
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3408
                '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
  3409
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3410
    ].
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
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3413
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3414
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3415
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3416
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3417
        variable:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3418
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3419
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3420
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3421
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3422
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3423
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3424
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3425
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3426
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3427
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3428
    "Created: / 11.10.1996 / 16:31:27 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3429
    "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
  3430
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3431
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3432
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
  3433
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3434
    "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
  3435
     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
  3436
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3437
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3438
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3439
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3440
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3441
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3442
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3443
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3444
        self isDoubles ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3445
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3446
                '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
  3447
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3448
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3449
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3450
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3451
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3452
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3453
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3454
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3455
        variable:#double 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3456
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3457
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3458
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3459
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3460
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3461
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3462
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3463
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3464
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3465
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3466
    "Created: / 11.10.1996 / 16:32:23 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3467
    "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
  3468
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3469
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3470
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
  3471
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3472
    "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
  3473
     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
  3474
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3475
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3476
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3477
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3478
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3479
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3480
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3481
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3482
        self isFloats ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3483
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3484
                '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
  3485
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3486
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3487
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3488
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3489
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3490
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3491
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3492
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3493
        variable:#float 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3494
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3495
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3496
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3497
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3498
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3499
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3500
        changed:true.
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
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3503
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3504
    "Created: / 11.10.1996 / 16:32:37 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3505
    "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
  3506
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3507
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3508
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
  3509
    "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
  3510
     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
  3511
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3512
    |newClass|
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3513
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3514
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3515
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3516
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3517
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3518
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3519
        self isLongLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3520
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3521
                '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
  3522
        ].
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3523
    ].
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3524
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3525
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3526
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3527
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3528
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3529
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3530
        variable:#longLong 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3531
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3532
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3533
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3534
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3535
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3536
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3537
        changed:true.
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3538
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3539
    ^ newClass
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3540
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3541
    "Created: / 11.10.1996 / 16:32:48 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3542
    "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
  3543
!
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3544
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3545
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
  3546
    "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
  3547
     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
  3548
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3549
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3550
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3551
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3552
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3553
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3554
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3555
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3556
        self isLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3557
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3558
                '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
  3559
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3560
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3561
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3562
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3563
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3564
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3565
        subclassOf:self
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
        variable:#long 
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3568
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3569
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3570
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3571
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3572
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3573
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3574
        changed:true.
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3575
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3576
    ^ newClass
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3577
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3578
    "Created: / 11.10.1996 / 16:32:48 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3579
    "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
  3580
!
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3581
3965
cef66fdfff9e allow suppress of dialog when filed-in classes violate conventions
Claus Gittinger <cg@exept.de>
parents: 3918
diff changeset
  3582
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
  3583
    "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
  3584
     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
  3585
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3586
    |newClass|
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3587
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3588
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3589
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3590
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3591
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3592
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3593
        self isSignedLongLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3594
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3595
                '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
  3596
        ].
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3597
    ].
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3598
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3599
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3600
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3601
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3602
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3603
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3604
        variable:#signedLongLong
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3605
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3606
        pointers:false
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
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3610
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3611
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3612
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3613
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3614
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3615
    "Created: / 11.10.1996 / 16:46:30 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3616
    "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
  3617
!
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
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
  3620
    "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
  3621
     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
  3622
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3623
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3624
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3625
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3626
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3627
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3628
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3629
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3630
        self isSignedLongs ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3631
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3632
                '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
  3633
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3634
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3635
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3636
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3637
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3638
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3639
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3640
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3641
        variable:#signedLong
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3642
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3643
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3644
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3645
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3646
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3647
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3648
        changed:true.
3918
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3649
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3650
    ^ newClass
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3651
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3652
    "Created: / 11.10.1996 / 16:46:30 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3653
    "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
  3654
!
32af25a0d71e added new subclass messages for longLong and signedLongLong indexed classes
Claus Gittinger <cg@exept.de>
parents: 3687
diff changeset
  3655
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3656
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
  3657
    "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
  3658
     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
  3659
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3660
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3661
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3662
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3663
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3664
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3665
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3666
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3667
        self isSignedWords ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3668
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3669
                '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
  3670
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3671
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3672
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3673
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3674
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3675
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3676
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3677
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3678
        variable:#signedWord
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3679
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3680
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3681
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3682
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3683
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3684
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3685
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3686
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3687
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3688
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3689
    "Created: / 11.10.1996 / 16:46:44 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3690
    "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
  3691
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3692
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3693
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
  3694
    "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
  3695
     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
  3696
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3697
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3698
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3699
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3700
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3701
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3702
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3703
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3704
        self isPointers ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3705
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3706
                '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
  3707
        ]
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3708
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3709
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3710
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3711
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3712
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3713
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3714
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3715
        variable:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3716
        words:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3717
        pointers:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3718
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3719
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3720
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3721
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3722
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3723
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3724
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3725
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3726
    "Created: / 11.10.1996 / 16:54:33 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3727
    "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
  3728
!
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3729
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3730
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
  3731
    "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
  3732
     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
  3733
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3734
    |newClass|
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3735
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3736
    self isLoaded ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3737
        ^ self loadAndResendMessage
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3738
    ].
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3739
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3740
    self isVariable ifTrue:[
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3741
        self isWords ifFalse:[
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3742
            ^ self error:
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3743
                '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
  3744
        ].
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3745
    ].
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3746
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3747
    newClass := self class
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3748
        name:nameSymbol
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3749
        inEnvironment:aClass
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3750
        subclassOf:self
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3751
        instanceVariableNames:instVarNameString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3752
        variable:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3753
        words:true
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3754
        pointers:false
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3755
        classVariableNames:classVarString
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3756
        poolDictionaries:pool
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3757
        category:(aClass category)
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3758
        comment:nil
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3759
        changed:true.
1715
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3760
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3761
    ^ newClass
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3762
4329
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3763
    "Created: / 11.10.1996 / 16:54:48 / cg"
a257c6391263 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 4302
diff changeset
  3764
    "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
  3765
! !
8bd2a2d8fbb4 moved subclass creation methods up to ClassDescription
Claus Gittinger <cg@exept.de>
parents: 1669
diff changeset
  3766
4604
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3767
!ClassDescription::PackageRedefinition methodsFor:'default actions'!
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3768
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3769
defaultAction
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3770
    "the default action is to return #keep."
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3771
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3772
    ^ #keep
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3773
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3774
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3775
! !
a08bfac91f07 migrated redefinitionSignals to new exception scheme
Claus Gittinger <cg@exept.de>
parents: 4358
diff changeset
  3776
5554
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  3777
!ClassDescription::ClassRedefinitionNotification methodsFor:'queries'!
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  3778
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  3779
description
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  3780
    ^ 'attempt to redefine class from different package'
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  3781
! !
28520e96cca9 category changes
Claus Gittinger <cg@exept.de>
parents: 5553
diff changeset
  3782
5515
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  3783
!ClassDescription::MethodRedefinitionNotification methodsFor:'queries'!
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  3784
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  3785
description
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  3786
    ^ 'attempt to redefine method from different package'
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  3787
! !
4adb4b3a7475 category only
Claus Gittinger <cg@exept.de>
parents: 5465
diff changeset
  3788
1740
baa0d76a9c68 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 1715
diff changeset
  3789
!ClassDescription class methodsFor:'documentation'!
662
df7953db3847 version method at the end
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  3790
df7953db3847 version method at the end
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  3791
version
5631
d0965449b419 added #addInstVarName & #removeInstVarName
Claus Gittinger <cg@exept.de>
parents: 5581
diff changeset
  3792
    ^ '$Header: /cvs/stx/stx/libbasic/ClassDescription.st,v 1.109 2000-09-26 12:41:53 cg Exp $'
662
df7953db3847 version method at the end
Claus Gittinger <cg@exept.de>
parents: 620
diff changeset
  3793
! !
2666
7981b615b48a Make Metaclass a subclass of ClassDescription instead of Class.
Stefan Vogel <sv@exept.de>
parents: 2533
diff changeset
  3794
ClassDescription initialize!