Fix in method completion: do not offer synthetic methods.
authorJan Vrany <jan.vrany@fit.cvut.cz>
Tue, 22 Oct 2013 12:14:07 +0100
changeset 136 a1c1b160f2ca
parent 135 f40d2ac07f38
child 137 12232e62cf54
Fix in method completion: do not offer synthetic methods.
SmallSense__CompletionEngine.st
SmallSense__SmalltalkCompletionEngine.st
--- a/SmallSense__CompletionEngine.st	Tue Oct 22 11:11:14 2013 +0100
+++ b/SmallSense__CompletionEngine.st	Tue Oct 22 12:14:07 2013 +0100
@@ -58,7 +58,7 @@
 
     Smalltalk allClassesDo:[:class|
         class selectorsAndMethodsDo:[:selector :mthd |             
-            ((selector startsWith: prefix) and:[filter value: mthd]) ifTrue:[
+            ((selector startsWith: prefix) and:[mthd isSynthetic not and:[filter value: mthd]]) ifTrue:[
                 | class skip |
 
                 class := mthd mclass superclass.
@@ -88,6 +88,6 @@
     ]
 
     "Created: / 03-10-2013 / 17:56:25 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 17-10-2013 / 01:05:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 22-10-2013 / 12:13:32 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
--- a/SmallSense__SmalltalkCompletionEngine.st	Tue Oct 22 11:11:14 2013 +0100
+++ b/SmallSense__SmalltalkCompletionEngine.st	Tue Oct 22 12:14:07 2013 +0100
@@ -205,9 +205,11 @@
                 ].
             ] ifFalse:[
                 class selectorsAndMethodsDo: [:selector :met | 
-                    result add: (MethodPO 
-                                name: selector
-                                class: met mclass).
+                    met isSynthetic ifFalse:[
+                        result add: (MethodPO 
+                                    name: selector
+                                    class: met mclass).
+                    ]
                 ].
             ].
             class := class superclass.
@@ -215,7 +217,7 @@
     ].
 
     "Created: / 26-11-2011 / 17:03:21 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 17-10-2013 / 01:04:46 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 22-10-2013 / 12:13:07 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 !
 
 addPools