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