Tools_MethodList.st
changeset 8197 3b1c5bd94fdd
parent 7994 f771c4d3e4d0
child 8198 f4b0d497d1e6
--- a/Tools_MethodList.st	Fri Jun 13 11:16:51 2008 +0200
+++ b/Tools_MethodList.st	Fri Jun 13 11:22:30 2008 +0200
@@ -19,7 +19,8 @@
 		lastShowClass lastShowCategory lastShowClassFirst
 		showMethodInheritance lastMethodClass lastMethodClassesSubclasses
 		classAndSelectorsRedefinedBySubclassesOfClass showClass
-		showMethodComplexity showMethodTypeIcon'
+		showMethodComplexity showMethodTypeIcon
+		showImageResourceMethodsImages'
 	classVariableNames:'ShowComplexityValue'
 	poolDictionaries:''
 	category:'Interface-Browsers-New'
@@ -174,6 +175,7 @@
         #showMethodInheritance
         #showMethodComplexity
         #showMethodTypeIcon
+        #showImageResourceMethodsImages
         #sortBy
       ).
 ! !
@@ -241,6 +243,24 @@
     ^ self selectionHolder:aValueHolder
 !
 
+showImageResourceMethodsImages
+    showImageResourceMethodsImages isNil ifTrue:[
+        showImageResourceMethodsImages := false asValue.
+        showImageResourceMethodsImages addDependent:self
+    ].
+    ^  showImageResourceMethodsImages
+!
+
+showImageResourceMethodsImages:aValueHolder
+    showImageResourceMethodsImages notNil ifTrue:[
+        showImageResourceMethodsImages removeDependent:self
+    ].
+    showImageResourceMethodsImages := aValueHolder.
+    showImageResourceMethodsImages notNil ifTrue:[
+        showImageResourceMethodsImages addDependent:self
+    ].
+!
+
 showMethodComplexity
     showMethodComplexity isNil ifTrue:[
         showMethodComplexity := false asValue.
@@ -1369,6 +1389,18 @@
     ].
 
     icn isNil ifTrue:[
+        showImageResourceMethodsImages value ~~ false ifTrue:[
+            aMethod hasResource ifTrue:[
+                (aMethod resources includesKey:#image) ifTrue:[
+                    aMethod mclass isMeta ifTrue:[
+                        icn := aMethod valueWithReceiver:nil arguments:nil .
+                    ].
+                ].
+            ].
+        ].
+    ].
+
+    icn isNil ifTrue:[
         showMethodTypeIcon value ~~ false ifTrue:[
             icn := self resourceIconForMethod:aMethod.
         ].
@@ -1454,18 +1486,18 @@
 
     (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.
+                ShowComplexityValue == true ifTrue:[
+                    complexityString := '{' , complexity printString , '}'.
+                    s := complexityString , ' ' , s.
+                ].
+                "/ icn := icn ? complexityIcon.
+                s := LabelAndIcon icon:complexityIcon string:s.
         ].
-        "/ icn := icn ? complexityIcon.
-        s := LabelAndIcon icon:complexityIcon string:s.
-].
     ].
 
     showMethodInheritance value ~~ false ifTrue:[
@@ -1531,5 +1563,5 @@
 !MethodList class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.28 2008-03-03 09:37:49 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools_MethodList.st,v 1.29 2008-06-13 09:22:30 cg Exp $'
 ! !