Tools_MethodList.st
changeset 9451 79d033f585b9
parent 9448 f9258f99d465
child 9462 1b58e3fee05b
equal deleted inserted replaced
9450:ceb357dd5ad1 9451:79d033f585b9
  1379     ]
  1379     ]
  1380 ! !
  1380 ! !
  1381 
  1381 
  1382 !MethodList methodsFor:'private-presentation'!
  1382 !MethodList methodsFor:'private-presentation'!
  1383 
  1383 
  1384 emphasisForCoverageInformationOfMethod:aMethod
  1384 colorForCoverageInformationOfMethod:aMethod
  1385     aMethod isInstrumented ifFalse:[^ nil].
  1385     aMethod isInstrumented ifFalse:[^ nil].
  1386     aMethod category = 'documentation' ifTrue:[^ nil].
  1386     aMethod category = 'documentation' ifTrue:[^ nil].
  1387 
  1387 
  1388     aMethod hasBeenCalled ifTrue:[
  1388     aMethod hasBeenCalled ifTrue:[
  1389         aMethod haveAllBlocksBeenExecuted ifTrue:[
  1389         aMethod haveAllBlocksBeenExecuted ifTrue:[
  1390             ^ UserPreferences current emphasisForInstrumentedFullyCoveredCode
  1390             ^ UserPreferences current colorForInstrumentedFullyCoveredCode
  1391         ] ifFalse:[
  1391         ].
  1392             ^ UserPreferences current emphasisForInstrumentedPartiallyCoveredCode
  1392         ^ UserPreferences current colorForInstrumentedPartiallyCoveredCode
  1393         ].
  1393     ].
  1394     ] ifFalse:[
  1394     ^ UserPreferences current colorForInstrumentedNeverCalledCode
  1395         ^ UserPreferences current emphasisForInstrumentedNeverCalledCode
  1395 
  1396     ].
  1396     "Created: / 30-04-2010 / 11:53:38 / cg"
  1397 
       
  1398     "Modified: / 27-04-2010 / 19:27:49 / cg"
       
  1399 !
  1397 !
  1400 
  1398 
  1401 listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst
  1399 listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst
  1402     "answer a method list entry 
  1400     "answer a method list entry 
  1403      gimmics: 
  1401      gimmics: 
  1404         adding a little image to breakPointed methods,
  1402         adding a little image to breakPointed methods,
  1405         inheritance indicators,
  1403         inheritance indicators,
  1406         highlight accessors of variable"
  1404         highlight accessors of variable"
  1407 
  1405 
  1408     |clsName s icn variablesToHighlight classVarsToHighLight 
  1406     |clsName s icn variablesToHighlight classVarsToHighLight 
  1409      doHighLight doHighLightRed emp cat l redefIcon 
  1407      doHighLight doHighLightRed clr emp cat l redefIcon 
  1410      metrics complexity complexityString complexityIcon mark|
  1408      metrics complexity complexityString complexityIcon mark|
  1411 
  1409 
  1412     aMethod isNil ifTrue:[
  1410     aMethod isNil ifTrue:[
  1413         "/ a non-existing (pseudo) method (such as required protocol)
  1411         "/ a non-existing (pseudo) method (such as required protocol)
  1414         ^ selector colorizeAllWith:Color red.
  1412         ^ selector colorizeAllWith:Color red.
  1505             s := s , ' {' , cat "asText allItalic" , '}'
  1503             s := s , ' {' , cat "asText allItalic" , '}'
  1506         ]
  1504         ]
  1507     ].
  1505     ].
  1508 
  1506 
  1509     self showCoverageInformation value ifTrue:[
  1507     self showCoverageInformation value ifTrue:[
  1510         emp := self emphasisForCoverageInformationOfMethod:aMethod.
  1508         clr := self colorForCoverageInformationOfMethod:aMethod.
  1511         emp notNil ifTrue:[
  1509         clr notNil ifTrue:[
  1512             s := self colorize:s with:emp.
  1510             s := self colorize:s with:(#color->clr).
  1513             "/ aMethod isInstrumented ifTrue:[
  1511             "/ aMethod isInstrumented ifTrue:[
  1514             "/     icn := self instrumentationIcon
  1512             "/     icn := self instrumentationIcon
  1515             "/ ].
  1513             "/ ].
  1516         ].
  1514         ].
  1517     ] ifFalse:[
  1515     ] ifFalse:[
  1581         ^ l
  1579         ^ l
  1582     ].
  1580     ].
  1583     ^ s
  1581     ^ s
  1584 
  1582 
  1585     "Created: / 22-10-1996 / 19:51:00 / cg"
  1583     "Created: / 22-10-1996 / 19:51:00 / cg"
  1586     "Modified: / 27-04-2010 / 16:14:07 / cg"
  1584     "Modified: / 30-04-2010 / 11:54:32 / cg"
  1587 ! !
  1585 ! !
  1588 
  1586 
  1589 !MethodList methodsFor:'private-watching'!
  1587 !MethodList methodsFor:'private-watching'!
  1590 
  1588 
  1591 startWatchProcess
  1589 startWatchProcess
  1631 ! !
  1629 ! !
  1632 
  1630 
  1633 !MethodList class methodsFor:'documentation'!
  1631 !MethodList class methodsFor:'documentation'!
  1634 
  1632 
  1635 version
  1633 version
  1636     ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.46 2010-04-27 17:28:25 cg Exp $'
  1634     ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.47 2010-04-30 09:54:59 cg Exp $'
  1637 !
  1635 !
  1638 
  1636 
  1639 version_CVS
  1637 version_CVS
  1640     ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.46 2010-04-27 17:28:25 cg Exp $'
  1638     ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.47 2010-04-30 09:54:59 cg Exp $'
  1641 ! !
  1639 ! !