Tools__MethodList.st
changeset 14105 efc7e0052de5
parent 14100 bf291c1fe96f
child 14108 63d31145e7bb
--- a/Tools__MethodList.st	Wed Mar 05 11:10:27 2014 +0100
+++ b/Tools__MethodList.st	Wed Mar 05 11:12:25 2014 +0100
@@ -1637,24 +1637,24 @@
 listEntryForMethod:aMethod selector:selector class:cls showClass:showClass showCategory:showCategory classFirst:showClassFirst suppressInheritanceInfo:suppressInheritanceInfo
     "answer a method list entry
      gimmics:
-	adding a little image to breakPointed methods,
-	inheritance indicators,
-	highlight accessors of variable"
+        adding a little image to breakPointed methods,
+        inheritance indicators,
+        highlight accessors of variable"
 
     |s icn variablesToHighlight classVarsToHighLight
      doHighLight doHighLightRed clr emp cat l redefIcon
      metrics complexity complexityString complexityIcon mark lastResultOrNil|
 
     aMethod isNil ifTrue:[
-	"/ a non-existing (pseudo) method (such as required protocol)
-	^ selector colorizeAllWith:Color red.
+        "/ a non-existing (pseudo) method (such as required protocol)
+        ^ selector colorizeAllWith:Color red.
     ].
 
     showClassFirst ifTrue:[
-	s := aMethod printStringForBrowserWithSelector:selector allBold inClass:cls.
-	s := cls nameInBrowser , ' ' , s
+        s := aMethod printStringForBrowserWithSelector:selector allBold inClass:cls.
+        s := cls nameInBrowser , ' ' , s
     ] ifFalse:[
-	s := aMethod printStringForBrowserWithSelector:selector inClass:cls.
+        s := aMethod printStringForBrowserWithSelector:selector inClass:cls.
     ].
 
     "/
@@ -1662,191 +1662,188 @@
     "/ have higher prio ...
     "/
     (aMethod notNil and:[aMethod isWrapped]) ifTrue:[
-	(s endsWith:' !!') ifTrue:[
-	    s := s copyButLast:2
-	].
-	aMethod isBreakpointed ifTrue:[
-	    icn := self stopIcon
-	] ifFalse:[
-	    aMethod isTimed ifTrue:[
-		icn := self timeIcon
-	    ] ifFalse:[
-		icn := self traceIcon
-	    ]
-	].
+        (s endsWith:' !!') ifTrue:[
+            s := s copyButLast:2
+        ].
+        aMethod isBreakpointed ifTrue:[
+            icn := self stopIcon
+        ] ifFalse:[
+            aMethod isTimed ifTrue:[
+                icn := self timeIcon
+            ] ifFalse:[
+                icn := self traceIcon
+            ]
+        ].
     ].
 
     "/
     "/ breakpoint icons (i.e. break- or trace points inside)
     "/
     icn isNil ifTrue:[
-	(aMethod notNil and:[aMethod isMethodWithBreakpoints]) ifTrue:[
-	    icn := self breakPointedIcon
-	].
+        (aMethod notNil and:[aMethod isMethodWithBreakpoints]) ifTrue:[
+            icn := self breakPointedIcon
+        ].
     ].
 
     icn isNil ifTrue:[
-	self showImageResourceMethodsImages value ~~ false ifTrue:[
-	    (aMethod hasImageResource) ifTrue:[
-		aMethod mclass isMeta ifTrue:[
-		    icn := aMethod valueWithReceiver:nil arguments:nil .
-		].
-	    ].
-	].
+        self showImageResourceMethodsImages value ~~ false ifTrue:[
+            (aMethod hasImageResource) ifTrue:[
+                aMethod mclass isMeta ifTrue:[
+                    icn := aMethod valueWithReceiver:nil arguments:nil .
+                ].
+            ].
+        ].
     ].
 
     icn isNil ifTrue:[
-	showMethodTypeIcon value ~~ false ifTrue:[
-	    icn := self resourceIconForMethod:aMethod.
-	].
-	icn isNil ifTrue:[
-	    aMethod isProtected ifTrue:[
-		icn := self protectedMethodIcon
-	    ] ifFalse:[
-		aMethod isPrivate ifTrue:[
-		    icn := self privateMethodIcon
-		] ifFalse:[
-		    (aMethod isIgnored) ifTrue:[
-			icn := self ignoredMethodIcon
-		    ] ifFalse:[
-			(aMethod isJavaMethod and:[aMethod isAbstract]) ifTrue:[
-			    icn := self abstractMethodIcon
-			]
-		    ]
-		]
-	    ].
-	].
+        showMethodTypeIcon value ~~ false ifTrue:[
+            icn := self resourceIconForMethod:aMethod.
+        ].
+        icn isNil ifTrue:[
+            aMethod isProtected ifTrue:[
+                icn := self protectedMethodIcon
+            ] ifFalse:[
+                aMethod isPrivate ifTrue:[
+                    icn := self privateMethodIcon
+                ] ifFalse:[
+                    (aMethod isIgnored) ifTrue:[
+                        icn := self ignoredMethodIcon
+                    ] ifFalse:[
+                        (aMethod isJavaMethod and:[aMethod isAbstract]) ifTrue:[
+                            icn := self abstractMethodIcon
+                        ]
+                    ]
+                ]
+            ].
+        ].
     ].
     icn isNil ifTrue:[
-	(selector startsWith:'test') ifTrue:[
-	    ((cls isSubclassOf:TestCase)
-	    and:[cls isAbstract not]) ifTrue:[
-		"JV@2011-11-17: Show thumbs even if not all test were run"
+        (selector startsWith:'test') ifTrue:[
+            ((cls isSubclassOf:TestCase)
+            and:[cls isAbstract not]) ifTrue:[
+                "JV@2011-11-17: Show thumbs even if not all test were run"
 
-		lastResultOrNil := cls rememberedOutcomeFor:selector.
-		lastResultOrNil notNil ifTrue:[
-		    |state|
+                lastResultOrNil := cls rememberedOutcomeFor:selector.
+                lastResultOrNil notNil ifTrue:[
+                    |state|
 
-		    state := lastResultOrNil result.
-		    (state == TestResult statePass) ifTrue:[
-			icn := ToolbarIconLibrary testCasePassedIcon
-		    ] ifFalse:[
-			(state == TestResult stateError) ifTrue:[
-			    icn := ToolbarIconLibrary testCaseErrorIcon
-			] ifFalse:[
-			    (state == TestResult stateFail) ifTrue:[
-				icn := ToolbarIconLibrary testCaseFailedIcon
-			    ] ifFalse:[
-				icn := ToolbarIconLibrary testCaseSkippedIcon
-			    ]
-			]
-		    ]
-		].
-	    ].
-	]
+                    state := lastResultOrNil result.
+                    (state == TestResult statePass) ifTrue:[
+                        icn := ToolbarIconLibrary testCasePassedIcon
+                    ] ifFalse:[
+                        (state == TestResult stateError) ifTrue:[
+                            icn := ToolbarIconLibrary testCaseErrorIcon
+                        ] ifFalse:[
+                            (state == TestResult stateFail) ifTrue:[
+                                icn := ToolbarIconLibrary testCaseFailedIcon
+                            ] ifFalse:[
+                                icn := ToolbarIconLibrary testCaseSkippedIcon
+                            ]
+                        ]
+                    ]
+                ].
+            ].
+        ]
     ].
 
     showClass ifTrue:[
-	showClassFirst ifFalse:[
-	    s := s , ' [' , cls name allBold , ']'.
-	]
+        showClassFirst ifFalse:[
+            s := s , ' [' , cls name allBold , ']'.
+        ]
     ].
     (showCategory and:[aMethod mclass supportsMethodCategories]) ifTrue:[
-	cat := aMethod category.
-	cat notNil ifTrue:[
-	    s := s , ' {' , (cat "asText allItalic" colorizeAllWith:Color grey), '}'
-	]
+        cat := aMethod category.
+        cat notNil ifTrue:[
+            s := s , ' {' , (cat "asText allItalic" colorizeAllWith:Color grey), '}'
+        ]
     ].
 
-    self showCoverageInformation value ifTrue:[
-	clr := self colorForCoverageInformationOfMethod:aMethod.
-	clr notNil ifTrue:[
-	    s := self colorize:s with:(#color->clr).
-	    "/ aMethod isInstrumented ifTrue:[
-	    "/     icn := self instrumentationIcon
-	    "/ ].
-	].
+    (self showCoverageInformation value and:[(clr := self colorForCoverageInformationOfMethod:aMethod) notNil]) ifTrue:[
+        s := self colorize:s with:(#color->clr).
+        "/ aMethod isInstrumented ifTrue:[
+        "/     icn := self instrumentationIcon
+        "/ ].
     ] ifFalse:[
-	(ChangeSet current includesChangeForClass:cls selector:selector) ifTrue:[
-	    mark := self class markForBeingInChangeList.
-	    "/ mark := self colorizeForChangedCode:mark.
-	    s := s , mark.
-	    "/ cg: I dont know why this was disabled - it is req'd to
-	    "/ see changed methods in a method list (implementors...)
-	    s := self colorizeForChangedCode:s.
-	].
+        (ChangeSet current includesChangeForClass:cls selector:selector) ifTrue:[
+            mark := self class markForBeingInChangeList.
+            "/ mark := self colorizeForChangedCode:mark.
+            s := s , mark.
+            "/ cg: I dont know why this was disabled - it is req'd to
+            "/ see changed methods in a method list (implementors...)
+            s := self colorizeForChangedCode:s.
+        ].
 
-	(SmallTeam notNil and:[SmallTeam includesChangeForClass:cls selector:selector]) ifTrue:[
-	    s := (self colorizeForChangedCodeInSmallTeam:'!! '),s
-	].
+        (SmallTeam notNil and:[SmallTeam includesChangeForClass:cls selector:selector]) ifTrue:[
+            s := (self colorizeForChangedCodeInSmallTeam:'!! '),s
+        ].
     ].
 
     variablesToHighlight := variableFilter value.
     variablesToHighlight size > 0 ifTrue:[
-	classVarsToHighLight := filterClassVars value.
-	classVarsToHighLight ifTrue:[
-	    doHighLight := self method:aMethod includesRefsToClassVariable:variablesToHighlight.
-	    doHighLight ifTrue:[
-		doHighLightRed := self method:aMethod includesModsOfClassVariable:variablesToHighlight.
-	    ].
-	] ifFalse:[
-	    doHighLight := self method:aMethod includesRefsToInstanceVariable:variablesToHighlight.
-	    doHighLight ifTrue:[
-		doHighLightRed := self method:aMethod includesModsOfInstanceVariable:variablesToHighlight
-	    ]
-	].
-	doHighLight ifTrue:[
-	    s := s allBold.
-	    doHighLightRed ifTrue:[
-		emp := (UserPreferences current emphasisForWrittenVariable)
-	    ] ifFalse:[
-		emp := (UserPreferences current emphasisForReadVariable)
-	    ].
-	    s := s emphasisAllAdd:emp
-	]
+        classVarsToHighLight := filterClassVars value.
+        classVarsToHighLight ifTrue:[
+            doHighLight := self method:aMethod includesRefsToClassVariable:variablesToHighlight.
+            doHighLight ifTrue:[
+                doHighLightRed := self method:aMethod includesModsOfClassVariable:variablesToHighlight.
+            ].
+        ] ifFalse:[
+            doHighLight := self method:aMethod includesRefsToInstanceVariable:variablesToHighlight.
+            doHighLight ifTrue:[
+                doHighLightRed := self method:aMethod includesModsOfInstanceVariable:variablesToHighlight
+            ]
+        ].
+        doHighLight ifTrue:[
+            s := s allBold.
+            doHighLightRed ifTrue:[
+                emp := (UserPreferences current emphasisForWrittenVariable)
+            ] ifFalse:[
+                emp := (UserPreferences current emphasisForReadVariable)
+            ].
+            s := s emphasisAllAdd:emp
+        ]
     ].
 
     (showMethodComplexity value == true
     and:[ OOM::MethodMetrics notNil ]) ifTrue:[
-	icn isNil ifTrue:[
-		metrics := OOM::MethodMetrics forMethod:aMethod.
-		complexity := metrics complexity ? 0.
-		complexityIcon := OOM::MethodMetrics iconForComplexity:complexity.
+        icn isNil ifTrue:[
+                metrics := OOM::MethodMetrics forMethod:aMethod.
+                complexity := metrics complexity ? 0.
+                complexityIcon := OOM::MethodMetrics iconForComplexity:complexity.
 
-		ShowComplexityValue == true ifTrue:[
-		    complexityString := '{' , complexity printString , '}'.
-		    s := complexityString , ' ' , s.
-		].
-		"/ icn := icn ? complexityIcon.
-		s := LabelAndIcon icon:complexityIcon string:s.
-	].
+                ShowComplexityValue == true ifTrue:[
+                    complexityString := '{' , complexity printString , '}'.
+                    s := complexityString , ' ' , s.
+                ].
+                "/ icn := icn ? complexityIcon.
+                s := LabelAndIcon icon:complexityIcon string:s.
+        ].
     ].
 
     (showMethodInheritance value ? true) ifTrue:[
-	suppressInheritanceInfo ifTrue:[
-	    redefIcon := self methodEmptyInheritedIcon.
-	] ifFalse:[
-	    redefIcon := self redefinedOrInheritedIconFor:aMethod.
-	].
+        suppressInheritanceInfo ifTrue:[
+            redefIcon := self methodEmptyInheritedIcon.
+        ] ifFalse:[
+            redefIcon := self redefinedOrInheritedIconFor:aMethod.
+        ].
     ].
 
     (icn notNil or:[redefIcon notNil]) ifTrue:[
-	"/eXept version
-	"/l := LabelAndIcon icon:redefIcon string:s.
-	"/l image:icn.
-	"/JV:
-	l := LabelAndIcon icon:icn string:s.
-	l image:redefIcon.
-	icn isNil ifTrue:[l offset: 13].
-	l gap:1.
-	^ l
+        "/eXept version
+        "/l := LabelAndIcon icon:redefIcon string:s.
+        "/l image:icn.
+        "/JV:
+        l := LabelAndIcon icon:icn string:s.
+        l image:redefIcon.
+        icn isNil ifTrue:[l offset: 13].
+        l gap:1.
+        ^ l
     ].
     ^ s
 
     "Created: / 22-10-1996 / 19:51:00 / cg"
     "Modified: / 15-08-2009 / 13:13:32 / Jan Vrany <vranyj1@fel.cvut.cz>"
     "Modified: / 07-03-2012 / 19:06:09 / cg"
-    "Modified: / 16-10-2013 / 01:10:11 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 05-03-2014 / 10:07:51 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !MethodList methodsFor:'private-watching'!
@@ -1896,9 +1893,10 @@
 !MethodList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.98 2014-03-04 09:11:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.99 2014-03-05 10:12:25 vrany Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.98 2014-03-04 09:11:59 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__MethodList.st,v 1.99 2014-03-05 10:12:25 vrany Exp $'
 ! !
+