151 All lines from line1 to line2 get an end-of-line comment |
151 All lines from line1 to line2 get an end-of-line comment |
152 in the first col." |
152 in the first col." |
153 |
153 |
154 |e| |
154 |e| |
155 |
155 |
156 (selectionStartCol == 1 and:[selectionEndCol == 0]) ifTrue:[ |
156 selectionStartLine notNil ifTrue:[ |
157 self commentFrom:selectionStartLine to:selectionEndLine-1 |
157 (selectionStartCol == 1 and:[selectionEndCol == 0]) ifTrue:[ |
158 ] ifFalse:[ |
158 self commentFrom:selectionStartLine to:selectionEndLine-1 |
159 self insert:$" atLine:selectionStartLine col:selectionStartCol. |
159 ] ifFalse:[ |
160 e := selectionEndCol + 1. |
160 self insert:$" atLine:selectionStartLine col:selectionStartCol. |
161 selectionStartLine == selectionEndLine ifTrue:[e := e + 1]. |
161 e := selectionEndCol + 1. |
162 self insert:$" atLine:selectionEndLine col:e. |
162 selectionStartLine == selectionEndLine ifTrue:[e := e + 1]. |
163 self selectFromLine:selectionStartLine col:selectionStartCol |
163 self insert:$" atLine:selectionEndLine col:e. |
164 toLine:selectionEndLine col:e. |
164 self selectFromLine:selectionStartLine col:selectionStartCol |
165 ] |
165 toLine:selectionEndLine col:e. |
|
166 ] |
|
167 ] |
|
168 |
|
169 "Modified: 12.11.1996 / 11:32:40 / cg" |
166 ! |
170 ! |
167 |
171 |
168 editMenu |
172 editMenu |
169 "return the popUpMenu; |
173 "return the popUpMenu; |
170 to make this independent from what is defined in superclasses, |
174 to make this independent from what is defined in superclasses, |
237 All lines from line1 to line2 get an end-of-line comment |
241 All lines from line1 to line2 get an end-of-line comment |
238 in the first col." |
242 in the first col." |
239 |
243 |
240 |e| |
244 |e| |
241 |
245 |
242 (selectionStartCol == 1 and:[selectionEndCol == 0]) ifTrue:[ |
246 selectionStartLine notNil ifTrue:[ |
243 self uncommentFrom:selectionStartLine to:selectionEndLine-1 |
247 (selectionStartCol == 1 and:[selectionEndCol == 0]) ifTrue:[ |
244 ] ifFalse:[ |
248 self uncommentFrom:selectionStartLine to:selectionEndLine-1 |
245 ((self characterAtLine:selectionStartLine col:selectionStartCol) == $" |
249 ] ifFalse:[ |
246 and:[(self characterAtLine:selectionEndLine col:selectionEndCol) == $"]) ifTrue:[ |
250 ((self characterAtLine:selectionStartLine col:selectionStartCol) == $" |
247 self deleteCharAtLine:selectionEndLine col:selectionEndCol. |
251 and:[(self characterAtLine:selectionEndLine col:selectionEndCol) == $"]) ifTrue:[ |
248 self deleteCharAtLine:selectionStartLine col:selectionStartCol. |
252 self deleteCharAtLine:selectionEndLine col:selectionEndCol. |
249 e := selectionEndCol - 1. |
253 self deleteCharAtLine:selectionStartLine col:selectionStartCol. |
250 selectionStartLine == selectionEndLine ifTrue:[e := e - 1]. |
254 e := selectionEndCol - 1. |
251 self selectFromLine:selectionStartLine col:selectionStartCol |
255 selectionStartLine == selectionEndLine ifTrue:[e := e - 1]. |
252 toLine:selectionEndLine col:e. |
256 self selectFromLine:selectionStartLine col:selectionStartCol |
253 ] |
257 toLine:selectionEndLine col:e. |
254 ] |
258 ] |
|
259 ] |
|
260 ] |
|
261 |
|
262 "Modified: 12.11.1996 / 11:32:57 / cg" |
255 ! ! |
263 ! ! |
256 |
264 |
257 !CodeView class methodsFor:'documentation'! |
265 !CodeView class methodsFor:'documentation'! |
258 |
266 |
259 version |
267 version |
260 ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.30 1996-04-25 16:44:11 cg Exp $' |
268 ^ '$Header: /cvs/stx/stx/libwidg/CodeView.st,v 1.31 1996-11-12 10:33:36 cg Exp $' |
261 ! ! |
269 ! ! |