author | Claus Gittinger <cg@exept.de> |
Sun, 14 Apr 2013 20:24:14 +0200 | |
changeset 3215 | b2aed720bfd8 |
parent 2493 | 457dd1375734 |
child 3219 | 92e64a42ab4e |
child 3442 | b1ba67bb6c9c |
permissions | -rw-r--r-- |
2493 | 1 |
"{ Package: 'stx:libbasic3' }" |
2 |
||
3 |
Object subclass:#ChangeDeltaInformation |
|
4 |
instanceVariableNames:'shortDeltaSymbol' |
|
5 |
classVariableNames:'Unknown Identical Different Added Removed IdenticalButWhiteSpace |
|
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
6 |
IdenticalButFormat IdenticalSemantically Conflict' |
2493 | 7 |
poolDictionaries:'' |
8 |
category:'System-Changes' |
|
9 |
! |
|
10 |
||
11 |
!ChangeDeltaInformation class methodsFor:'documentation'! |
|
12 |
||
13 |
documentation |
|
14 |
" |
|
15 |
delta used to return a symbol (#=, #~, #+ or #-); |
|
16 |
for more detail, use instances of me: |
|
17 |
Unknown delta is unknown |
|
18 |
Identical exactly the same |
|
19 |
IdenticalButWhiteSpace code is formatted different, but AST is the same |
|
20 |
SemanticallyIdentical code is different, but semantically the same |
|
21 |
(for example, ifNil: -> isNil ifTrue:) |
|
22 |
Different code is different |
|
23 |
Added method/class is added by change |
|
24 |
Removed method/class is removed by change |
|
25 |
" |
|
26 |
! ! |
|
27 |
||
28 |
!ChangeDeltaInformation class methodsFor:'initialization'! |
|
29 |
||
30 |
initialize |
|
31 |
Unknown := self new shortDeltaSymbol:#'?'. "/ delta is unknown |
|
32 |
Identical := self new shortDeltaSymbol:#'='. "/ exactly the same |
|
33 |
IdenticalButWhiteSpace := self new shortDeltaSymbol:#'W'. "/ code is the same except for indentation |
|
34 |
IdenticalButFormat := self new shortDeltaSymbol:#'F'. "/ code is formatted different, but AST is the same |
|
35 |
IdenticalSemantically := self new shortDeltaSymbol:#'%'. "/ code is different, but semantically the same |
|
36 |
"/ (for example, ifNil: -> isNil ifTrue:) |
|
37 |
Different := self new shortDeltaSymbol:#'~'. "/ code is different |
|
38 |
Added := self new shortDeltaSymbol:#'+'. "/ method/class is added by change |
|
39 |
Removed := self new shortDeltaSymbol:#'-'. "/ method/class is removed by change |
|
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
40 |
Conflict := self new shortDeltaSymbol:#'!!'. "/ package conflict - overwrites existing method |
2493 | 41 |
|
42 |
"Created: / 31-08-2011 / 10:09:24 / cg" |
|
43 |
! ! |
|
44 |
||
45 |
!ChangeDeltaInformation class methodsFor:'accessing'! |
|
46 |
||
47 |
added |
|
48 |
"method/class is added by change" |
|
49 |
||
50 |
^ Added |
|
51 |
||
52 |
"Modified (comment): / 31-08-2011 / 10:20:51 / cg" |
|
53 |
! |
|
54 |
||
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
55 |
conflict |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
56 |
"method overwrites existing method from another package" |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
57 |
|
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
58 |
^ Conflict |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
59 |
! |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
60 |
|
2493 | 61 |
different |
62 |
"code is different" |
|
63 |
||
64 |
^ Different |
|
65 |
||
66 |
"Modified (comment): / 31-08-2011 / 10:21:07 / cg" |
|
67 |
! |
|
68 |
||
69 |
identical |
|
70 |
"exactly the same" |
|
71 |
||
72 |
^ Identical |
|
73 |
||
74 |
"Modified (comment): / 31-08-2011 / 10:21:18 / cg" |
|
75 |
! |
|
76 |
||
77 |
identicalButFormat |
|
78 |
"code is formatted different, but AST is the same" |
|
79 |
||
80 |
^ IdenticalButFormat |
|
81 |
||
82 |
"Created: / 31-08-2011 / 10:23:18 / cg" |
|
83 |
! |
|
84 |
||
85 |
identicalButWhiteSpace |
|
86 |
"code is the same except for indentation" |
|
87 |
||
88 |
^ IdenticalButWhiteSpace |
|
89 |
||
90 |
"Modified (comment): / 31-08-2011 / 10:23:49 / cg" |
|
91 |
! |
|
92 |
||
93 |
identicalSemantically |
|
94 |
"code is different, but semantically the same. |
|
95 |
(for example, ifNil: -> isNil ifTrue:)" |
|
96 |
||
97 |
^ IdenticalSemantically |
|
98 |
||
99 |
"Modified (comment): / 31-08-2011 / 10:24:04 / cg" |
|
100 |
! |
|
101 |
||
102 |
removed |
|
103 |
"method/class is removed by change" |
|
104 |
||
105 |
^ Removed |
|
106 |
||
107 |
"Modified (comment): / 31-08-2011 / 10:24:14 / cg" |
|
108 |
! |
|
109 |
||
110 |
unknown |
|
111 |
"another change / cannot figure out what has changed" |
|
112 |
||
113 |
^ Unknown |
|
114 |
||
115 |
"Created: / 31-08-2011 / 10:20:13 / cg" |
|
116 |
! ! |
|
117 |
||
118 |
!ChangeDeltaInformation methodsFor:'accessing'! |
|
119 |
||
120 |
shortDeltaSymbol |
|
121 |
^ shortDeltaSymbol |
|
122 |
||
123 |
"Created: / 31-08-2011 / 10:39:01 / cg" |
|
124 |
! |
|
125 |
||
126 |
shortDeltaSymbol:something |
|
127 |
shortDeltaSymbol := something. |
|
128 |
||
129 |
"Created: / 31-08-2011 / 10:39:05 / cg" |
|
130 |
! ! |
|
131 |
||
132 |
!ChangeDeltaInformation class methodsFor:'documentation'! |
|
133 |
||
134 |
version |
|
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
135 |
^ '$Header: /cvs/stx/stx/libbasic3/ChangeDeltaInformation.st,v 1.2 2013-04-14 18:24:14 cg Exp $' |
2493 | 136 |
! |
137 |
||
138 |
version_CVS |
|
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
139 |
^ '$Header: /cvs/stx/stx/libbasic3/ChangeDeltaInformation.st,v 1.2 2013-04-14 18:24:14 cg Exp $' |
2493 | 140 |
! ! |
141 |
||
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
142 |
|
2493 | 143 |
ChangeDeltaInformation initialize! |