18280
|
1 |
"{ Encoding: utf8 }"
|
|
2 |
|
1750
|
3 |
"
|
|
4 |
COPYRIGHT (c) 1998 by eXept Software AG
|
|
5 |
All Rights Reserved
|
|
6 |
|
|
7 |
This software is furnished under a license and may be used
|
|
8 |
only in accordance with the terms of that license and with the
|
|
9 |
inclusion of the above copyright notice. This software may not
|
|
10 |
be provided or otherwise made available to, or used by, any
|
|
11 |
other person. No title to or ownership of the software is
|
|
12 |
hereby transferred.
|
|
13 |
"
|
17937
|
14 |
"{ Package: 'stx:libtool' }"
|
1750
|
15 |
|
17937
|
16 |
"{ NameSpace: Smalltalk }"
|
6816
|
17 |
|
1749
|
18 |
EditTextView subclass:#RCSConflictEditTextView
|
|
19 |
instanceVariableNames:''
|
|
20 |
classVariableNames:''
|
|
21 |
poolDictionaries:''
|
|
22 |
category:'Views-Text'
|
|
23 |
!
|
|
24 |
|
|
25 |
!RCSConflictEditTextView class methodsFor:'documentation'!
|
|
26 |
|
1750
|
27 |
copyright
|
|
28 |
"
|
|
29 |
COPYRIGHT (c) 1998 by eXept Software AG
|
|
30 |
All Rights Reserved
|
1749
|
31 |
|
1750
|
32 |
This software is furnished under a license and may be used
|
|
33 |
only in accordance with the terms of that license and with the
|
|
34 |
inclusion of the above copyright notice. This software may not
|
|
35 |
be provided or otherwise made available to, or used by, any
|
|
36 |
other person. No title to or ownership of the software is
|
|
37 |
hereby transferred.
|
|
38 |
"
|
|
39 |
|
|
40 |
!
|
|
41 |
|
|
42 |
documentation
|
|
43 |
"
|
|
44 |
like an editTextView, but adds two buttons to search forward/backward
|
|
45 |
for next change.
|
|
46 |
"
|
1749
|
47 |
! !
|
|
48 |
|
|
49 |
!RCSConflictEditTextView methodsFor:'actions'!
|
|
50 |
|
|
51 |
moveToNextChanged
|
|
52 |
"somewhat of a kludge - simply search for the next text-item"
|
|
53 |
|
18280
|
54 |
self moveToNextChangedAfter:self lastLineShown
|
|
55 |
|
|
56 |
"Modified: / 27-07-1998 / 12:29:24 / cg"
|
|
57 |
"Modified: / 23-07-2018 / 09:53:59 / Claus Gittinger"
|
|
58 |
!
|
|
59 |
|
|
60 |
moveToNextChangedAfter:startLine
|
|
61 |
"somewhat of a kludge - simply search for the next text-item"
|
|
62 |
|
1749
|
63 |
|start end lnNr max list|
|
|
64 |
|
18280
|
65 |
start := startLine + 1.
|
1749
|
66 |
|
|
67 |
list := self list.
|
|
68 |
max := list size.
|
|
69 |
lnNr := start.
|
|
70 |
|
|
71 |
[(lnNr > max or:[(list at:lnNr) isText])
|
|
72 |
] whileFalse:[
|
|
73 |
lnNr := lnNr + 1
|
|
74 |
].
|
|
75 |
|
|
76 |
(lnNr <= max) ifTrue:[
|
|
77 |
(end isNil or:[lnNr < end]) ifTrue:[
|
|
78 |
end := lnNr.
|
|
79 |
]
|
|
80 |
].
|
|
81 |
|
|
82 |
end notNil ifTrue:[
|
|
83 |
self scrollToLine:end
|
|
84 |
] ifFalse:[
|
17937
|
85 |
self beepInEditor
|
1749
|
86 |
].
|
|
87 |
|
18280
|
88 |
"Created: / 23-07-2018 / 09:53:43 / Claus Gittinger"
|
1749
|
89 |
!
|
|
90 |
|
|
91 |
moveToPreviousChanged
|
|
92 |
"somewhat of a kludge - simply search for the previous text-item"
|
|
93 |
|
|
94 |
|start end found lnNr list|
|
|
95 |
|
|
96 |
start := firstLineShown - 1.
|
|
97 |
end := 1.
|
|
98 |
found := false.
|
|
99 |
|
|
100 |
start > 1 ifTrue:[
|
|
101 |
list := self list.
|
|
102 |
lnNr := list size.
|
|
103 |
|
|
104 |
lnNr >= start ifTrue:[
|
|
105 |
lnNr := start
|
|
106 |
].
|
|
107 |
|
|
108 |
[(lnNr == end or:[(list at:lnNr) isText])
|
|
109 |
] whileFalse:[
|
|
110 |
lnNr := lnNr - 1
|
|
111 |
].
|
|
112 |
(list at:lnNr) isText ifTrue:[
|
|
113 |
end := lnNr.
|
|
114 |
found := true.
|
|
115 |
"/ skip multiple text-lines
|
|
116 |
[end > 1 and:[(list at:(end-1)) isText]] whileTrue:[
|
|
117 |
end := end - 1
|
|
118 |
].
|
|
119 |
]
|
|
120 |
].
|
|
121 |
found ifTrue:[
|
|
122 |
self scrollToLine:end
|
|
123 |
] ifFalse:[
|
17937
|
124 |
self beepInEditor
|
1749
|
125 |
]
|
|
126 |
|
|
127 |
"Created: / 27.7.1998 / 12:25:34 / cg"
|
|
128 |
"Modified: / 27.7.1998 / 12:31:26 / cg"
|
|
129 |
! !
|
|
130 |
|
|
131 |
!RCSConflictEditTextView methodsFor:'initialization'!
|
|
132 |
|
|
133 |
initialize
|
|
134 |
|panel buttonPrev buttonNext|
|
|
135 |
|
|
136 |
super initialize.
|
|
137 |
|
|
138 |
"set up-down buttons"
|
|
139 |
|
|
140 |
panel := VerticalPanelView in:self.
|
|
141 |
|
|
142 |
buttonPrev := Button label:'-' in:panel.
|
|
143 |
buttonNext := Button label:'+' in:panel.
|
|
144 |
buttonPrev extent:15@22.
|
|
145 |
buttonNext extent:15@22.
|
|
146 |
panel origin:0.0 @ 1.0 corner:(15 + SimpleView viewSpacing) @ 1.0.
|
|
147 |
panel topInset:(2 * (buttonPrev preferredExtent y)) negated.
|
|
148 |
|
|
149 |
"set actions"
|
|
150 |
|
|
151 |
buttonPrev pressAction:[
|
|
152 |
buttonPrev turnOff.
|
|
153 |
self moveToPreviousChanged
|
|
154 |
].
|
|
155 |
|
|
156 |
buttonNext pressAction:[
|
|
157 |
buttonNext turnOff.
|
|
158 |
self moveToNextChanged
|
|
159 |
].
|
|
160 |
self moveToNextChanged.
|
|
161 |
|
|
162 |
"Modified: / 27.7.1998 / 12:22:31 / cg"
|
|
163 |
! !
|
|
164 |
|
|
165 |
!RCSConflictEditTextView class methodsFor:'documentation'!
|
|
166 |
|
|
167 |
version
|
17937
|
168 |
^ '$Header$'
|
1749
|
169 |
! !
|
17937
|
170 |
|