ChangeDeltaInformation.st
author Claus Gittinger <cg@exept.de>
Mon, 20 Aug 2018 10:11:25 +0200
changeset 4346 6604af2f1554
parent 3682 a590e9e018e3
child 3838 474d8ec95b33
permissions -rw-r--r--
#OTHER by cg class: FileBasedSourceCodeManager class removed: #version_FileRepository
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
3682
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   143
!ChangeDeltaInformation class methodsFor:'utilities'!
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   144
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   145
changeDeltaFor:changeText changeClass:changeClass selector:methodSelector
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   146
    "utility: give a changed method's source, compare against the current version in the system"
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   147
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   148
    |currentText method t1 t2|
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   149
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   150
    changeClass isNil ifTrue:[ ^ '+'].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   151
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   152
    (methodSelector isNil or:[changeClass theNonMetaclass isLoaded not]) ifTrue:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   153
        ^ '?'
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   154
    ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   155
    (changeClass includesSelector:methodSelector asSymbol) ifFalse:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   156
        ^ '+'.
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   157
    ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   158
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   159
    method := changeClass compiledMethodAt:methodSelector asSymbol.
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   160
    Error handle:[:ex |
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   161
        Transcript showCR:'Error while accessing methods current source: ',ex description.
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   162
    ] do:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   163
        currentText := method source.
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   164
    ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   165
    currentText isNil ifTrue:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   166
        "/ cannot access the source code - assume changed
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   167
        ^ '!!'.
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   168
    ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   169
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   170
    changeText asString string withoutTrailingSeparators = currentText asString string withoutTrailingSeparators ifTrue:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   171
        ^ '='
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   172
    ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   173
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   174
    t1 := currentText asCollectionOfLines collect:[:s | s withTabsExpanded].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   175
    t2 := changeText asCollectionOfLines collect:[:s | s withTabsExpanded].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   176
    t1 = t2 ifTrue:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   177
        ^ '='
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   178
    ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   179
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   180
    RBParser notNil ifTrue:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   181
        |tree1 tree2|
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   182
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   183
        tree1 := RBParser parseMethod:currentText onError:[:aString :pos | ^ '!!'].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   184
        tree2 := RBParser parseMethod:changeText onError:[:aString :pos | ^ '!!'].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   185
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   186
        tree1 = tree2 ifTrue:[
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   187
            ^ '~'
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   188
        ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   189
    ].
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   190
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   191
    ^ ' '
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   192
! !
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   193
2493
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   194
!ChangeDeltaInformation methodsFor:'accessing'!
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   195
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   196
shortDeltaSymbol
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   197
    ^ shortDeltaSymbol
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   198
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   199
    "Created: / 31-08-2011 / 10:39:01 / cg"
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   200
!
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   201
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   202
shortDeltaSymbol:something
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   203
    shortDeltaSymbol := something.
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   204
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   205
    "Created: / 31-08-2011 / 10:39:05 / cg"
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   206
! !
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   207
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   208
!ChangeDeltaInformation class methodsFor:'documentation'!
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   209
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   210
version
3682
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   211
    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeDeltaInformation.st,v 1.4 2014-12-11 20:47:41 cg Exp $'
2493
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   212
!
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   213
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   214
version_CVS
3682
a590e9e018e3 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 3442
diff changeset
   215
    ^ '$Header: /cvs/stx/stx/libbasic3/ChangeDeltaInformation.st,v 1.4 2014-12-11 20:47:41 cg Exp $'
2493
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   216
! !
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   217
3215
b2aed720bfd8 class: ChangeDeltaInformation
Claus Gittinger <cg@exept.de>
parents: 2493
diff changeset
   218
2493
457dd1375734 initial checkin
Claus Gittinger <cg@exept.de>
parents:
diff changeset
   219
ChangeDeltaInformation initialize!