ClassChange.st
author Claus Gittinger <cg@exept.de>
Wed, 18 Jun 2003 17:44:53 +0200
changeset 1300 3847c8f8a4f5
parent 1286 621aac0264a7
child 1303 36df29ea195d
permissions -rw-r--r--
handle NS.Classname (vw files) translate vw namespaces
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
3
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     1
"
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     2
 COPYRIGHT (c) 1993 by Claus Gittinger
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
     3
	      All Rights Reserved
3
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     4
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     5
 This software is furnished under a license and may be used
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     6
 only in accordance with the terms of that license and with the
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     8
 be provided or otherwise made available to, or used by, any
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
     9
 other person.  No title to or ownership of the software is
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
    10
 hereby transferred.
263f814933d4 *** empty log message ***
claus
parents: 0
diff changeset
    11
"
0
470788421600 Initial revision
claus
parents:
diff changeset
    12
932
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
    13
"{ Package: 'stx:libbasic3' }"
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
    14
0
470788421600 Initial revision
claus
parents:
diff changeset
    15
Change subclass:#ClassChange
1233
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
    16
	instanceVariableNames:'className package'
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
    17
	classVariableNames:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
    18
	poolDictionaries:''
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
    19
	category:'System-Changes'
0
470788421600 Initial revision
claus
parents:
diff changeset
    20
!
470788421600 Initial revision
claus
parents:
diff changeset
    21
634
eb5a3f4f4539 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
    22
!ClassChange class methodsFor:'documentation'!
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    23
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    24
copyright
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    25
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    26
 COPYRIGHT (c) 1993 by Claus Gittinger
38
claus
parents: 10
diff changeset
    27
	      All Rights Reserved
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    28
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    29
 This software is furnished under a license and may be used
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    30
 only in accordance with the terms of that license and with the
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    31
 inclusion of the above copyright notice.   This software may not
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    32
 be provided or otherwise made available to, or used by, any
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    33
 other person.  No title to or ownership of the software is
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    34
 hereby transferred.
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    35
"
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    36
!
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    37
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    38
documentation
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    39
"
45
claus
parents: 39
diff changeset
    40
    Abstract superclass for class related changes
1162
4af27057a3ce comment
Claus Gittinger <cg@exept.de>
parents: 1096
diff changeset
    41
    They are typically held in a ChangeSet.
235
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
    42
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
    43
    [author:]
3ebfdc6edab9 documentation
Claus Gittinger <cg@exept.de>
parents: 101
diff changeset
    44
        Claus Gittinger
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    45
"
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    46
! !
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    47
634
eb5a3f4f4539 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
    48
!ClassChange class methodsFor:'instance creation'!
85
c354e2f81394 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 68
diff changeset
    49
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    50
class:aClass
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    51
    ^ self new class:aClass
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    52
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    53
    "Created: 3.12.1995 / 14:01:32 / cg"
1096
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
    54
!
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
    55
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
    56
class:aClass source:source
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
    57
    ^ self new class:aClass source:source
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
    58
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
    59
    "Created: 3.12.1995 / 14:01:32 / cg"
9
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    60
! !
f5b6ab00bdf6 *** empty log message ***
claus
parents: 3
diff changeset
    61
0
470788421600 Initial revision
claus
parents:
diff changeset
    62
!ClassChange methodsFor:'accessing'!
470788421600 Initial revision
claus
parents:
diff changeset
    63
850
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    64
changeClass
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    65
    "the class of the change (nil if not present)"
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    66
1201
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    67
    |className ns cls|
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
    68
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
    69
    className := self className.
850
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    70
    className isNil ifTrue:[^ nil].
1201
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    71
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    72
    ns := (Class nameSpaceQuerySignal query) ? Smalltalk.
1203
379d9644b880 care for non-namespaces (owning classes)
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
    73
    ns isNameSpace ifFalse:[
379d9644b880 care for non-namespaces (owning classes)
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
    74
        ns := Smalltalk
379d9644b880 care for non-namespaces (owning classes)
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
    75
    ].
379d9644b880 care for non-namespaces (owning classes)
Claus Gittinger <cg@exept.de>
parents: 1201
diff changeset
    76
1201
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    77
    cls := ns classNamed:className.
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    78
    cls isNil ifTrue:[
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    79
        ns ~~ Smalltalk ifTrue:[
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    80
            cls := Smalltalk classNamed:className
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    81
        ].
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    82
    ].
f3966132ad65 care for namespace setting
Claus Gittinger <cg@exept.de>
parents: 1197
diff changeset
    83
    ^ cls
850
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    84
!
5efe4b98c509 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 801
diff changeset
    85
1040
552c3a8b2b5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
    86
changeClass:aClass
552c3a8b2b5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
    87
    "set the class of the change"
552c3a8b2b5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
    88
552c3a8b2b5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
    89
    className := aClass name.
552c3a8b2b5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
    90
!
552c3a8b2b5c *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 962
diff changeset
    91
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    92
class:aClass
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    93
    "set the class of the change"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    94
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    95
    className := aClass name.
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    96
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    97
    "Created: 3.12.1995 / 14:01:45 / cg"
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
    98
    "Modified: 15.7.1996 / 09:28:26 / cg"
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
    99
!
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   100
1096
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   101
class:aClass source:newSource
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   102
    "set both class and source of the change"
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   103
1286
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   104
    self className:(aClass name) source:newSource
1096
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   105
!
4a949a840bb3 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1046
diff changeset
   106
0
470788421600 Initial revision
claus
parents:
diff changeset
   107
className 
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   108
    "return the className of the change"
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   109
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   110
    ^ self cutNameSpaceOf:className
378
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   111
f106015c98a6 commentary
Claus Gittinger <cg@exept.de>
parents: 235
diff changeset
   112
    "Modified: 15.7.1996 / 09:28:35 / cg"
654
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   113
!
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   114
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   115
className:aString 
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   116
    "set the className of the change"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   117
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   118
    className := aString
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   119
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   120
    "Modified: / 15.7.1996 / 09:28:35 / cg"
edeb63d98088 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 634
diff changeset
   121
    "Created: / 16.2.1998 / 13:05:36 / cg"
1233
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   122
!
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   123
1286
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   124
className:newClassName source:newSource
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   125
    "set both className and source of the change"
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   126
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   127
newSource isString ifFalse:[self halt].
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   128
newClassName isString ifFalse:[self halt].
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   129
    className := newClassName.
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   130
    source := newSource.
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   131
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   132
    "Created: 3.12.1995 / 14:01:45 / cg"
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   133
    "Modified: 15.7.1996 / 09:28:26 / cg"
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   134
!
621aac0264a7 catch non-string source args
Claus Gittinger <cg@exept.de>
parents: 1233
diff changeset
   135
1233
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   136
package
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   137
    "return the value of the instance variable 'package' (automatically generated)"
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   138
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   139
    ^ package
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   140
!
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   141
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   142
package:something
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   143
    "set the value of the instance variable 'package' (automatically generated)"
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   144
4eef6fafcffb james' package changes
james
parents: 1203
diff changeset
   145
    package := something.
0
470788421600 Initial revision
claus
parents:
diff changeset
   146
! !
470788421600 Initial revision
claus
parents:
diff changeset
   147
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   148
!ClassChange methodsFor:'applying'!
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   149
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   150
apply
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   151
    "apply the change"
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   152
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   153
    Parser evaluate:(self source)
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   154
"/    |ns|
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   155
"/
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   156
"/    ns := Class nameSpaceQuerySignal isHandled 
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   157
"/            ifTrue:[ Class nameSpaceQuerySignal query ]
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   158
"/            ifFalse:[ self nameSpace ].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   159
"/
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   160
"/    Class nameSpaceQuerySignal answer:ns do:[
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   161
"/        Parser evaluate:(self source)
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   162
"/    ].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   163
!
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   164
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   165
fullClassName
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   166
    |ns|
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   167
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   168
    "/ used to be ^ className;
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   169
    "/
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   170
    "/ now include a translation from vw namespace to stx nameSpace
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   171
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   172
    ns := self nameSpaceName.
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   173
    ns = 'Smalltalk' ifTrue:[^ self className].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   174
    ^ ns , '::' , self className
1046
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   175
!
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   176
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   177
nameSpace
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   178
    |nsName nameSpace|
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   179
1046
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   180
    (nsName := self nameSpaceName) notNil ifTrue:[
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   181
        ^ NameSpace name:nsName.
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   182
    ].
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   183
    ^ Smalltalk
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   184
!
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   185
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   186
nameSpaceName
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   187
    |ns cnm idx|
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   188
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   189
    (className includes:$:) ifTrue:[
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   190
        "/ in a namespace
1046
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   191
        ^ className upTo:$:.
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   192
    ].
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   193
    (idx := className indexOf:$.) ~~ 0 ifTrue:[
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   194
        "/ in a namespace
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   195
        ns := className copyTo:(idx - 1).
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   196
        cnm := className copyFrom:(idx + 1).
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   197
        "cheat: VW namespaces"
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   198
        ^ self nameSpaceForVWNamespace:ns class:cnm ifAbsent:ns
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   199
    ].
1046
450ef3136cc3 care for the nameSpace in a class-definition
Claus Gittinger <cg@exept.de>
parents: 1043
diff changeset
   200
    ^ nil
859
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   201
! !
5d50d068c63b keep track of the nameSpace
Claus Gittinger <cg@exept.de>
parents: 850
diff changeset
   202
962
3821ab69b939 category change
Claus Gittinger <cg@exept.de>
parents: 932
diff changeset
   203
!ClassChange methodsFor:'printing & storing'!
101
9a1c22e807e0 more changeSet stuff
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
   204
9a1c22e807e0 more changeSet stuff
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
   205
printOn:aStream
801
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   206
    "append a user printed representation of the receiver to aStream.
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   207
     The format is suitable for a human - not meant to be read back."
b84b61eaa2f6 comment
Claus Gittinger <cg@exept.de>
parents: 654
diff changeset
   208
911
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 859
diff changeset
   209
    source isNil ifTrue:[
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 859
diff changeset
   210
        aStream nextPutAll:'an empty change'.
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 859
diff changeset
   211
        ^ self
cecf421ee767 VW5i compatibility
Claus Gittinger <cg@exept.de>
parents: 859
diff changeset
   212
    ].
1043
ce8626431253 *** empty log message ***
Claus Gittinger <cg@exept.de>
parents: 1041
diff changeset
   213
    aStream nextPutAll:(self class name , ' - ' , source string asCollectionOfLines first , '...').
101
9a1c22e807e0 more changeSet stuff
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
   214
! !
9a1c22e807e0 more changeSet stuff
Claus Gittinger <cg@exept.de>
parents: 100
diff changeset
   215
932
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   216
!ClassChange methodsFor:'queries'!
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   217
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   218
cutNameSpaceOf:aString
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   219
    |dotIndex|
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   220
1197
bc742b87f66d more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1196
diff changeset
   221
    aString notNil ifTrue:[
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   222
        dotIndex := aString indexOf:$..
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   223
        dotIndex ~~ 0 ifTrue:[
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   224
            ^ aString copyFrom:dotIndex+1
1197
bc742b87f66d more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1196
diff changeset
   225
        ].
1196
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   226
    ].
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   227
    ^ aString
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   228
!
928f537ddeac more for vw-XML fileIn
Claus Gittinger <cg@exept.de>
parents: 1162
diff changeset
   229
932
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   230
isClassChange
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   231
    ^ true
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   232
!
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   233
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   234
nameSpaceForVWNamespace:ns class:className ifAbsent:default
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   235
    ns = 'Core' ifTrue:[^ 'Smalltalk'].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   236
    ns = 'Kernel' ifTrue:[^ 'Smalltalk'].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   237
    ns = 'Graphics' ifTrue:[^ 'Smalltalk'].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   238
    ns = 'OS' ifTrue:[^ 'Smalltalk'].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   239
    ns = 'Smalltalk' ifTrue:[^ 'Smalltalk'].
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   240
    ^ default value
932
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   241
! !
8028d375f842 #isClassChange query
Claus Gittinger <cg@exept.de>
parents: 918
diff changeset
   242
634
eb5a3f4f4539 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 378
diff changeset
   243
!ClassChange class methodsFor:'documentation'!
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   244
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   245
version
1300
3847c8f8a4f5 handle NS.Classname (vw files)
Claus Gittinger <cg@exept.de>
parents: 1286
diff changeset
   246
    ^ '$Header: /cvs/stx/stx/libbasic3/ClassChange.st,v 1.36 2003-06-18 15:44:53 cg Exp $'
100
d09e51d14901 project changeSet fixes
Claus Gittinger <cg@exept.de>
parents: 85
diff changeset
   247
! !