added: #markMethodArgumentIdentifierFrom:to:
changed:
#markArgumentIdentifierFrom:to:
#markMethodSelectorFrom:to:
#parseMethod
--- a/CodeCoverageHighlighter.st Sun Aug 21 11:42:29 2011 +0200
+++ b/CodeCoverageHighlighter.st Sun Aug 21 12:26:31 2011 +0200
@@ -100,10 +100,10 @@
!CodeCoverageHighlighter methodsFor:'syntax detection'!
markArgumentIdentifierFrom:pos1 to:pos2
- self
- markFrom:pos1 to:pos2
- withEmphasis:(preferences argumentIdentifierEmphasis)
- color:(preferences argumentIdentifierColor)
+"/ self
+"/ markFrom:pos1 to:pos2
+"/ withEmphasis:(preferences argumentIdentifierEmphasis)
+"/ color:(preferences argumentIdentifierColor)
"Created: / 28-04-2010 / 14:14:20 / cg"
!
@@ -181,31 +181,40 @@
"Modified: / 24-05-2011 / 19:43:31 / cg"
!
+markMethodArgumentIdentifierFrom:pos1 to:pos2
+ self
+ markFrom:pos1 to:pos2
+ withEmphasis:(preferences argumentIdentifierEmphasis)
+ color:(preferences argumentIdentifierColor)
+
+ "Created: / 21-08-2011 / 08:12:29 / cg"
+!
+
markMethodSelectorFrom:pos1 to:pos2
|clr|
- methodInvocationInfo notNil ifTrue:[
- methodInvocationInfo hasBeenCalled ifTrue:[
- clr := self colorForCoveredCode
- ] ifFalse:[
- clr := self colorForUncoveredCode
- ].
- ].
- clr notNil ifTrue:[
- "/ sourceText emphasizeFrom:1 to:sourceText size with:(#backgroundColor "#color" -> clr lightened lightened).
- sourceText emphasizeFrom:1 to:sourceText size with:(#color -> clr).
- ].
+"/ methodInvocationInfo notNil ifTrue:[
+"/ methodInvocationInfo hasBeenCalled ifTrue:[
+"/ clr := self colorForCoveredCode
+"/ ] ifFalse:[
+"/ clr := self colorForUncoveredCode
+"/ ].
+"/ ].
+"/ clr notNil ifTrue:[
+"/ "/ sourceText emphasizeFrom:1 to:sourceText size with:(#backgroundColor "#color" -> clr lightened lightened).
+"/ sourceText emphasizeFrom:1 to:sourceText size with:(#color -> clr).
+"/ ].
self
markFrom:pos1 to:pos2
withEmphasis:(preferences methodSelectorEmphasis)
- color:preferences methodSelectorColor.
+ color:(clr ? preferences methodSelectorColor).
"/ emp notNil ifTrue:[
"/ sourceText emphasisFrom:1 to:sourceText size add:emp.
"/ ].
- "Modified: / 23-07-2011 / 12:20:30 / cg"
+ "Modified: / 21-08-2011 / 08:10:36 / cg"
!
markUnknownIdentifierFrom:pos1 to:pos2
@@ -219,6 +228,18 @@
!
parseMethod
+ |clr|
+
+ methodInvocationInfo notNil ifTrue:[
+ methodInvocationInfo hasBeenCalled ifTrue:[
+ clr := self colorForCoveredCode
+ ] ifFalse:[
+ clr := self colorForUncoveredCode
+ ].
+ "/ sourceText emphasizeFrom:1 to:sourceText size with:(#backgroundColor "#color" -> clr lightened lightened).
+ sourceText emphasizeFrom:1 to:sourceText size with:(#color -> clr).
+ ].
+
super parseMethod.
methodInvocationInfo notNil ifTrue:[
@@ -242,5 +263,5 @@
!CodeCoverageHighlighter class methodsFor:'documentation'!
version_CVS
- ^ '$Header: /cvs/stx/stx/libcomp/CodeCoverageHighlighter.st,v 1.4 2011-07-24 07:12:04 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/CodeCoverageHighlighter.st,v 1.5 2011-08-21 10:26:31 cg Exp $'
! !