author | Claus Gittinger <cg@exept.de> |
Wed, 05 Feb 2014 18:51:47 +0100 | |
changeset 3442 | b1ba67bb6c9c |
parent 3215 | b2aed720bfd8 |
child 3682 | a590e9e018e3 |
permissions | -rw-r--r-- |
3442 | 1 |
" |
2 |
COPYRIGHT (c) 2006 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 |
" |
|
2493 | 12 |
"{ Package: 'stx:libbasic3' }" |
13 |
||
14 |
Object subclass:#ChangeDeltaInformation |
|
15 |
instanceVariableNames:'shortDeltaSymbol' |
|
16 |
classVariableNames:'Unknown Identical Different Added Removed IdenticalButWhiteSpace |
|
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
17 |
IdenticalButFormat IdenticalSemantically Conflict' |
2493 | 18 |
poolDictionaries:'' |
19 |
category:'System-Changes' |
|
20 |
! |
|
21 |
||
22 |
!ChangeDeltaInformation class methodsFor:'documentation'! |
|
23 |
||
3442 | 24 |
copyright |
25 |
" |
|
26 |
COPYRIGHT (c) 2006 by eXept Software AG |
|
27 |
All Rights Reserved |
|
28 |
||
29 |
This software is furnished under a license and may be used |
|
30 |
only in accordance with the terms of that license and with the |
|
31 |
inclusion of the above copyright notice. This software may not |
|
32 |
be provided or otherwise made available to, or used by, any |
|
33 |
other person. No title to or ownership of the software is |
|
34 |
hereby transferred. |
|
35 |
" |
|
36 |
! |
|
37 |
||
2493 | 38 |
documentation |
39 |
" |
|
40 |
delta used to return a symbol (#=, #~, #+ or #-); |
|
41 |
for more detail, use instances of me: |
|
42 |
Unknown delta is unknown |
|
43 |
Identical exactly the same |
|
44 |
IdenticalButWhiteSpace code is formatted different, but AST is the same |
|
45 |
SemanticallyIdentical code is different, but semantically the same |
|
46 |
(for example, ifNil: -> isNil ifTrue:) |
|
47 |
Different code is different |
|
48 |
Added method/class is added by change |
|
49 |
Removed method/class is removed by change |
|
50 |
" |
|
51 |
! ! |
|
52 |
||
53 |
!ChangeDeltaInformation class methodsFor:'initialization'! |
|
54 |
||
55 |
initialize |
|
56 |
Unknown := self new shortDeltaSymbol:#'?'. "/ delta is unknown |
|
57 |
Identical := self new shortDeltaSymbol:#'='. "/ exactly the same |
|
58 |
IdenticalButWhiteSpace := self new shortDeltaSymbol:#'W'. "/ code is the same except for indentation |
|
59 |
IdenticalButFormat := self new shortDeltaSymbol:#'F'. "/ code is formatted different, but AST is the same |
|
60 |
IdenticalSemantically := self new shortDeltaSymbol:#'%'. "/ code is different, but semantically the same |
|
61 |
"/ (for example, ifNil: -> isNil ifTrue:) |
|
62 |
Different := self new shortDeltaSymbol:#'~'. "/ code is different |
|
63 |
Added := self new shortDeltaSymbol:#'+'. "/ method/class is added by change |
|
64 |
Removed := self new shortDeltaSymbol:#'-'. "/ method/class is removed by change |
|
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
65 |
Conflict := self new shortDeltaSymbol:#'!!'. "/ package conflict - overwrites existing method |
2493 | 66 |
|
67 |
"Created: / 31-08-2011 / 10:09:24 / cg" |
|
68 |
! ! |
|
69 |
||
70 |
!ChangeDeltaInformation class methodsFor:'accessing'! |
|
71 |
||
72 |
added |
|
73 |
"method/class is added by change" |
|
74 |
||
75 |
^ Added |
|
76 |
||
77 |
"Modified (comment): / 31-08-2011 / 10:20:51 / cg" |
|
78 |
! |
|
79 |
||
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
80 |
conflict |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
81 |
"method overwrites existing method from another package" |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
82 |
|
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
83 |
^ Conflict |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
84 |
! |
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
85 |
|
2493 | 86 |
different |
87 |
"code is different" |
|
88 |
||
89 |
^ Different |
|
90 |
||
91 |
"Modified (comment): / 31-08-2011 / 10:21:07 / cg" |
|
92 |
! |
|
93 |
||
94 |
identical |
|
95 |
"exactly the same" |
|
96 |
||
97 |
^ Identical |
|
98 |
||
99 |
"Modified (comment): / 31-08-2011 / 10:21:18 / cg" |
|
100 |
! |
|
101 |
||
102 |
identicalButFormat |
|
103 |
"code is formatted different, but AST is the same" |
|
104 |
||
105 |
^ IdenticalButFormat |
|
106 |
||
107 |
"Created: / 31-08-2011 / 10:23:18 / cg" |
|
108 |
! |
|
109 |
||
110 |
identicalButWhiteSpace |
|
111 |
"code is the same except for indentation" |
|
112 |
||
113 |
^ IdenticalButWhiteSpace |
|
114 |
||
115 |
"Modified (comment): / 31-08-2011 / 10:23:49 / cg" |
|
116 |
! |
|
117 |
||
118 |
identicalSemantically |
|
119 |
"code is different, but semantically the same. |
|
120 |
(for example, ifNil: -> isNil ifTrue:)" |
|
121 |
||
122 |
^ IdenticalSemantically |
|
123 |
||
124 |
"Modified (comment): / 31-08-2011 / 10:24:04 / cg" |
|
125 |
! |
|
126 |
||
127 |
removed |
|
128 |
"method/class is removed by change" |
|
129 |
||
130 |
^ Removed |
|
131 |
||
132 |
"Modified (comment): / 31-08-2011 / 10:24:14 / cg" |
|
133 |
! |
|
134 |
||
135 |
unknown |
|
136 |
"another change / cannot figure out what has changed" |
|
137 |
||
138 |
^ Unknown |
|
139 |
||
140 |
"Created: / 31-08-2011 / 10:20:13 / cg" |
|
141 |
! ! |
|
142 |
||
143 |
!ChangeDeltaInformation methodsFor:'accessing'! |
|
144 |
||
145 |
shortDeltaSymbol |
|
146 |
^ shortDeltaSymbol |
|
147 |
||
148 |
"Created: / 31-08-2011 / 10:39:01 / cg" |
|
149 |
! |
|
150 |
||
151 |
shortDeltaSymbol:something |
|
152 |
shortDeltaSymbol := something. |
|
153 |
||
154 |
"Created: / 31-08-2011 / 10:39:05 / cg" |
|
155 |
! ! |
|
156 |
||
157 |
!ChangeDeltaInformation class methodsFor:'documentation'! |
|
158 |
||
159 |
version |
|
3442 | 160 |
^ '$Header: /cvs/stx/stx/libbasic3/ChangeDeltaInformation.st,v 1.3 2014-02-05 17:51:47 cg Exp $' |
2493 | 161 |
! |
162 |
||
163 |
version_CVS |
|
3442 | 164 |
^ '$Header: /cvs/stx/stx/libbasic3/ChangeDeltaInformation.st,v 1.3 2014-02-05 17:51:47 cg Exp $' |
2493 | 165 |
! ! |
166 |
||
3215
b2aed720bfd8
class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents:
2493
diff
changeset
|
167 |
|
2493 | 168 |
ChangeDeltaInformation initialize! |