Better hint in MethodPO: show class names only for up to 3 classes...
authorJan Vrany <jan.vrany@fit.cvut.cz>
Fri, 23 Jan 2015 19:19:02 +0100
changeset 376 55bc1e532591
parent 375 5e95400de5f8
child 377 c686ea588575
Better hint in MethodPO: show class names only for up to 3 classes... ...otherwise show how many implementors are there.
SmallSense__MethodPO.st
--- a/SmallSense__MethodPO.st	Fri Jan 23 19:17:53 2015 +0100
+++ b/SmallSense__MethodPO.st	Fri Jan 23 19:19:02 2015 +0100
@@ -87,9 +87,16 @@
 !
 
 hint
-    ^ (classes collect:[:each | each nameWithoutPrefix ]) asArray asStringWith:' , '.
+    classes size == 1 ifTrue:[ 
+        ^ classes anElement nameWithoutNameSpacePrefix.
+    ].
+    classes size < 3 ifTrue:[ 
+        ^ (classes collect:[:each | each nameWithoutPrefix ]) asArray asStringWith:' , '.
+    ].
+    ^ '%1 implementors' bindWith: classes size.
 
     "Created: / 20-05-2014 / 12:27:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 23-01-2015 / 19:15:24 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 label