author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Tue, 29 Jan 2013 14:40:26 +0000 | |
branch | jv |
changeset 3121 | 19723298dd2c |
parent 3071 | e7d3b6595759 |
child 3128 | 87750af738dc |
permissions | -rw-r--r-- |
798 | 1 |
" |
2 |
COPYRIGHT (c) 1998 by eXept Software AG |
|
3 |
All Rights Reserved |
|
4 |
||
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
1096 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
653 | 14 |
ClassChange subclass:#ClassRenameChange |
1096 | 15 |
instanceVariableNames:'oldName' |
653 | 16 |
classVariableNames:'' |
17 |
poolDictionaries:'' |
|
18 |
category:'System-Changes' |
|
19 |
! |
|
20 |
||
21 |
!ClassRenameChange class methodsFor:'documentation'! |
|
22 |
||
798 | 23 |
copyright |
24 |
" |
|
25 |
COPYRIGHT (c) 1998 by eXept Software AG |
|
26 |
All Rights Reserved |
|
653 | 27 |
|
798 | 28 |
This software is furnished under a license and may be used |
29 |
only in accordance with the terms of that license and with the |
|
30 |
inclusion of the above copyright notice. This software may not |
|
31 |
be provided or otherwise made available to, or used by, any |
|
32 |
other person. No title to or ownership of the software is |
|
33 |
hereby transferred. |
|
34 |
" |
|
35 |
||
1162 | 36 |
! |
37 |
||
38 |
documentation |
|
39 |
" |
|
40 |
instances represent a class-has-been-renamed change. |
|
41 |
They are typically held in a ChangeSet. |
|
42 |
||
43 |
[author:] |
|
44 |
Claus Gittinger |
|
45 |
" |
|
653 | 46 |
! ! |
47 |
||
48 |
!ClassRenameChange methodsFor:'accessing'! |
|
49 |
||
1234 | 50 |
oldName |
51 |
"return the value of the instance variable 'oldName' (automatically generated)" |
|
52 |
||
53 |
^ oldName |
|
54 |
! |
|
55 |
||
1096 | 56 |
oldName:oldNameArg newName:newNameArg |
57 |
className := newNameArg. |
|
58 |
oldName := oldNameArg |
|
653 | 59 |
|
60 |
"Created: / 16.2.1998 / 14:22:38 / cg" |
|
61 |
! ! |
|
62 |
||
3070 | 63 |
!ClassRenameChange methodsFor:'applying'! |
64 |
||
65 |
apply |
|
66 |
"apply the change" |
|
67 |
||
68 |
|class| |
|
69 |
||
70 |
"JV@2012-07-31: Here, must test agains __OLD__ class" |
|
71 |
||
72 |
class := Smalltalk at: oldName asSymbol. |
|
73 |
class isNil ifTrue:[ |
|
3071 | 74 |
self changeClass notNil ifTrue:[ |
75 |
"Previously applied change?" |
|
76 |
^self. |
|
77 |
]. |
|
3070 | 78 |
self error:('Cannot apply change for missing class: ' , className) mayProceed:true. |
79 |
^ self |
|
80 |
]. |
|
81 |
class autoload. "Most changes cannot be applied to unloaded classes" |
|
82 |
Class nameSpaceQuerySignal answer:self nameSpace do:[ |
|
83 |
Parser evaluate:(self source) |
|
84 |
]. |
|
85 |
||
86 |
"Created: / 31-07-2012 / 18:58:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
87 |
! ! |
|
88 |
||
653 | 89 |
!ClassRenameChange methodsFor:'printing'! |
90 |
||
91 |
printOn:aStream |
|
92 |
aStream nextPutAll:'Smalltalk renameClass:'; |
|
1096 | 93 |
nextPutAll:oldName; |
653 | 94 |
nextPutAll:' to:'; |
1096 | 95 |
nextPutAll:className storeString |
653 | 96 |
|
97 |
"Created: / 16.2.1998 / 14:23:35 / cg" |
|
98 |
! ! |
|
99 |
||
1234 | 100 |
!ClassRenameChange methodsFor:'queries'! |
101 |
||
102 |
isClassRenameChange |
|
103 |
^ true |
|
104 |
! ! |
|
105 |
||
653 | 106 |
!ClassRenameChange class methodsFor:'documentation'! |
107 |
||
108 |
version |
|
3121
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
109 |
^ '$Header: ClassRenameChange.st 1948 2012-07-31 18:04:54Z vranyj1 $' |
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
110 |
! |
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
111 |
|
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
112 |
version_HG |
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
113 |
|
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
114 |
^ '$Changeset: <not expanded> $' |
3012 | 115 |
! |
116 |
||
117 |
version_SVN |
|
3121
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
118 |
^ '§Id: ClassRenameChange.st 1948 2012-07-31 18:04:54Z vranyj1 §' |
3012 | 119 |
! ! |
3121
19723298dd2c
Bugfix: reading of Java class extensions methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3071
diff
changeset
|
120 |