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