142 ! ! |
142 ! ! |
143 |
143 |
144 !CodeHighlightingService methodsFor:'change & update'! |
144 !CodeHighlightingService methodsFor:'change & update'! |
145 |
145 |
146 update: aspect with: param from: sender |
146 update: aspect with: param from: sender |
147 |thisIsACodeChange| |
|
148 |
|
149 "JV@2011-12-04: I don't really see the point why the code was changed |
|
150 (see differences between 1.25 and 1.26). However, the change did not |
|
151 preserve the semantics, as the #codeChanged: is sent only iff |
|
152 languageHolder or classHolder change (in r1.26). This is not enough. |
|
153 Consequently, Ctrl-click navigation no longer worked." |
|
154 |
|
155 thisIsACodeChange := false. |
|
156 |
|
157 textView notNil ifTrue:[ |
147 textView notNil ifTrue:[ |
158 "/sender == textView modifiedChannel ifTrue:[^self codeChanged: false]. |
148 "/sender == textView modifiedChannel ifTrue:[^self codeChanged: false]. |
159 thisIsACodeChange := (sender == textView model) |
149 sender == textView model ifTrue:[^self codeChanged: true]. |
160 or:[ (sender == textView and:[aspect == #sizeOfContents]) ]. |
150 (sender == textView and:[aspect == #sizeOfContents]) ifTrue:[^self codeChanged: true]. |
161 ]. |
151 ]. |
162 codeView notNil ifTrue:[ |
152 codeView notNil ifTrue:[ |
163 "JV@2011-12-04: v------------ therefore this change" |
153 sender == codeView languageHolder ifTrue:[^self codeChanged: true]. |
164 thisIsACodeChange := thisIsACodeChange or: [(sender == codeView languageHolder) |
154 sender == codeView classHolder ifTrue:[^self codeChanged: true]. |
165 or:[ sender == codeView classHolder ]] |
|
166 ]. |
|
167 thisIsACodeChange ifTrue:[ |
|
168 self codeChanged: true. |
|
169 ^ self |
|
170 ]. |
155 ]. |
171 super update: aspect with: param from: sender |
156 super update: aspect with: param from: sender |
172 |
157 |
173 "Created: / 06-03-2010 / 19:38:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
158 "Created: / 06-03-2010 / 19:38:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
174 "Modified (format): / 03-12-2011 / 10:31:37 / cg" |
159 "Modified: / 13-09-2011 / 12:00:29 / cg" |
175 "Modified (format): / 04-12-2011 / 22:44:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
160 "Modified: / 16-09-2011 / 17:30:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
176 ! ! |
161 ! ! |
177 |
162 |
178 !CodeHighlightingService methodsFor:'event handling'! |
163 !CodeHighlightingService methodsFor:'event handling'! |
179 |
164 |
180 linesDeletedFrom: start to: end |
165 linesDeletedFrom: start to: end |
309 |
294 |
310 "Created: / 06-03-2010 / 19:34:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
295 "Created: / 06-03-2010 / 19:34:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
311 ! |
296 ! |
312 |
297 |
313 syntaxHighlight |
298 syntaxHighlight |
|
299 |
314 |highlighters prio | |
300 |highlighters prio | |
315 |
301 |
316 (highlighters := self syntaxHighlighters) isEmptyOrNil ifTrue:[ |
302 (highlighters := self syntaxHighlighters) isEmptyOrNil ifTrue:[ |
317 "No higlighter, nothing to do" |
303 "No higlighter, nothing to do" |
318 ^ self |
304 ^self |
319 ]. |
305 ]. |
320 |
|
321 codeView languageHolder value isNil ifTrue:[ |
|
322 ^ self |
|
323 ]. |
|
324 "/ codeView classHolder value isNil ifTrue:[ |
|
325 "/ ^ self |
|
326 "/ ]. |
|
327 |
306 |
328 "/ this clobbers the codeViews modified state; therefore, we have to remember |
307 "/ this clobbers the codeViews modified state; therefore, we have to remember |
329 "/ this info somewhere ... |
308 "/ this info somewhere ... |
330 codeView browser ifNotNil:[ |
309 codeView browser ifNotNil:[ |
331 textView modified ifTrue:[ |
310 textView modified ifTrue:[ |
349 |
328 |
350 job startWithPriority: prio. |
329 job startWithPriority: prio. |
351 |
330 |
352 "Modified: / 07-07-2011 / 12:26:12 / Jan Vrany <jan.vrant@fit.cvut,cz>" |
331 "Modified: / 07-07-2011 / 12:26:12 / Jan Vrany <jan.vrant@fit.cvut,cz>" |
353 "Created: / 29-07-2011 / 11:07:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
332 "Created: / 29-07-2011 / 11:07:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
354 "Modified: / 03-12-2011 / 10:34:01 / cg" |
333 "Modified: / 26-09-2011 / 15:40:23 / cg" |
355 ! |
334 ! |
356 |
335 |
357 syntaxHighlight: delayed |
336 syntaxHighlight: delayed |
358 |
337 |
359 |oldCode oldCodeList newCode elements cls mthd highlighterClasses| |
338 |oldCode oldCodeList newCode elements cls mthd highlighterClasses| |
454 ! ! |
433 ! ! |
455 |
434 |
456 !CodeHighlightingService class methodsFor:'documentation'! |
435 !CodeHighlightingService class methodsFor:'documentation'! |
457 |
436 |
458 version |
437 version |
459 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.27 2011-12-04 21:46:25 vrany Exp $' |
438 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.28 2011-12-07 15:41:14 vrany Exp $' |
460 ! |
439 ! |
461 |
440 |
462 version_CVS |
441 version_CVS |
463 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.27 2011-12-04 21:46:25 vrany Exp $' |
442 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeHighlightingService.st,v 1.28 2011-12-07 15:41:14 vrany Exp $' |
464 ! |
443 ! |
465 |
444 |
466 version_SVN |
445 version_SVN |
467 ^ '§Id: Tools__CodeHighlightingService.st 7715 2011-04-10 16:32:58Z vranyj1 §' |
446 ^ '§Id: Tools__CodeHighlightingService.st 7715 2011-04-10 16:32:58Z vranyj1 §' |
468 ! ! |
447 ! ! |