85 ! ! |
85 ! ! |
86 |
86 |
87 !CodeNavigationService class methodsFor:'accessing - defaults'! |
87 !CodeNavigationService class methodsFor:'accessing - defaults'! |
88 |
88 |
89 defaultAssignmentEmphasis |
89 defaultAssignmentEmphasis |
|
90 "must only define a background - otherwise, syntax highlight fg is lost" |
|
91 |
90 DefaultAssignmentEmphasis isNil ifTrue:[ |
92 DefaultAssignmentEmphasis isNil ifTrue:[ |
91 ^ Array with:(#backgroundColor -> (UserPreferences current assignmentBackgroundColorForNavigationService)) |
93 ^ Array with:(#backgroundColor -> (UserPreferences current assignmentBackgroundColorForNavigationService)) |
92 ]. |
94 ]. |
93 ^ DefaultAssignmentEmphasis |
95 ^ DefaultAssignmentEmphasis |
94 ! |
96 ! |
95 |
97 |
96 defaultSelectorEmphasis |
98 defaultSelectorEmphasis |
|
99 "must only define a background - otherwise, syntax highlight fg is lost" |
|
100 |
97 DefaultSelectorEmphasis isNil ifTrue:[ |
101 DefaultSelectorEmphasis isNil ifTrue:[ |
98 ^ Array with:(#backgroundColor -> (UserPreferences current selectorBackgroundColorForNavigationService)) |
102 ^ Array with:(#backgroundColor -> (UserPreferences current selectorBackgroundColorForNavigationService)) |
99 ]. |
103 ]. |
100 ^ DefaultSelectorEmphasis |
104 ^ DefaultSelectorEmphasis |
101 |
105 |
102 "Modified: / 21-08-2011 / 09:58:18 / cg" |
106 "Modified: / 21-08-2011 / 09:58:18 / cg" |
103 ! |
107 ! |
104 |
108 |
105 defaultVariableEmphasis |
109 defaultVariableEmphasis |
|
110 "must only define a background - otherwise, syntax highlight fg is lost" |
|
111 |
106 DefaultVariableEmphasis isNil ifTrue:[ |
112 DefaultVariableEmphasis isNil ifTrue:[ |
107 ^ Array with:(#backgroundColor -> (UserPreferences current variableBackgroundColorForNavigationService)) |
113 ^ Array with:(#backgroundColor -> (UserPreferences current variableBackgroundColorForNavigationService)) |
108 ]. |
114 ]. |
109 ^ DefaultVariableEmphasis |
115 ^ DefaultVariableEmphasis |
110 |
116 |
391 !CodeNavigationService methodsFor:'initialization'! |
397 !CodeNavigationService methodsFor:'initialization'! |
392 |
398 |
393 initialize |
399 initialize |
394 |
400 |
395 super initialize. |
401 super initialize. |
|
402 |
|
403 "the following must only define a background - otherwise, syntax highlight fg is lost" |
396 selectorEmphasis := self class defaultSelectorEmphasis. |
404 selectorEmphasis := self class defaultSelectorEmphasis. |
397 variableEmphasis := self class defaultVariableEmphasis. |
405 variableEmphasis := self class defaultVariableEmphasis. |
398 assignmentEmphasis := self class defaultAssignmentEmphasis. |
406 assignmentEmphasis := self class defaultAssignmentEmphasis. |
399 linesToRedraw := OrderedCollection new. |
407 linesToRedraw := OrderedCollection new. |
400 |
408 |
622 ifTrue:[ startCol ] |
630 ifTrue:[ startCol ] |
623 ifFalse:[ line indexOfNonSeparator ]. |
631 ifFalse:[ line indexOfNonSeparator ]. |
624 end := (lineNo = endLine) |
632 end := (lineNo = endLine) |
625 ifTrue:[ endCol ] |
633 ifTrue:[ endCol ] |
626 ifFalse:[ line size ]. |
634 ifFalse:[ line size ]. |
627 line setRuns:(line runs asArray). |
635 line |
628 "/ line |
636 emphasisFrom:(start max: 1) |
629 "/ emphasisFrom:(start max: 1) |
|
630 "/ to:(end min: line size) |
|
631 "/ put: currentEmphasis. |
|
632 line |
|
633 emphasizeFrom:(start max: 1) |
|
634 to:(end min: line size) |
637 to:(end min: line size) |
635 with: currentEmphasis. |
638 add: currentEmphasis. |
636 line setRuns:(line runs asRunArray). |
|
637 |
639 |
638 linesToRedraw add: lineNo. |
640 linesToRedraw add: lineNo. |
639 |
641 |
640 "Created: / 25-06-2010 / 14:15:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
642 "Created: / 25-06-2010 / 14:15:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
641 "Modified: / 08-07-2011 / 13:02:51 / cg" |
643 "Modified: / 08-07-2011 / 13:02:51 / cg" |
705 ! ! |
707 ! ! |
706 |
708 |
707 !CodeNavigationService class methodsFor:'documentation'! |
709 !CodeNavigationService class methodsFor:'documentation'! |
708 |
710 |
709 version |
711 version |
710 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.29 2013-07-04 17:06:40 cg Exp $' |
712 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.30 2013-07-04 19:28:51 cg Exp $' |
711 ! |
713 ! |
712 |
714 |
713 version_CVS |
715 version_CVS |
714 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.29 2013-07-04 17:06:40 cg Exp $' |
716 ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeNavigationService.st,v 1.30 2013-07-04 19:28:51 cg Exp $' |
715 ! |
717 ! |
716 |
718 |
717 version_SVN |
719 version_SVN |
718 ^ '$Id: Tools__CodeNavigationService.st,v 1.29 2013-07-04 17:06:40 cg Exp $' |
720 ^ '$Id: Tools__CodeNavigationService.st,v 1.30 2013-07-04 19:28:51 cg Exp $' |
719 ! ! |
721 ! ! |
720 |
722 |