class: Tools::CodeView2
authorClaus Gittinger <cg@exept.de>
Wed, 05 Mar 2014 14:41:18 +0100
changeset 14110 c671dfc959ef
parent 14109 6269ce6fbb65
child 14111 c9f199317b1c
class: Tools::CodeView2 changed: #codeCompletion smell
Tools__CodeView2.st
--- a/Tools__CodeView2.st	Wed Mar 05 14:41:07 2014 +0100
+++ b/Tools__CodeView2.st	Wed Mar 05 14:41:18 2014 +0100
@@ -1898,20 +1898,21 @@
 !CodeView2 methodsFor:'private'!
 
 codeCompletion
-    |cls|
-
+    "/ I found this code 3 times (CodeView2, NewSystemBrowser and DebugView) - smell? 
+    "/ (can we move that to a utility - probably DoWhatIMeanSupport)
+
+    |cls language|
 
     cls := self classHolder value.
-    cls isNil ifTrue:[
-        self showInfo:'No class'.
-        ^ self.
+    cls notNil ifTrue:[
+        language := cls programmingLanguage
     ].
     UserInformation handle:[:ex |
         self showInfo:(ex messageText).
         ex proceed.
     ] do:[
         self withWaitCursorDo:[
-            DoWhatIMeanSupport codeCompletionForLanguage: cls programmingLanguage class:cls context:nil codeView:self.
+            DoWhatIMeanSupport codeCompletionForLanguage:language class:cls context:nil codeView:self.
         ]
     ].
     ^ self.
@@ -3877,15 +3878,15 @@
 !CodeView2 class methodsFor:'documentation'!
 
 version
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.141 2014-03-04 12:52:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.142 2014-03-05 13:41:18 cg Exp $'
 !
 
 version_CVS
-    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.141 2014-03-04 12:52:57 cg Exp $'
+    ^ '$Header: /cvs/stx/stx/libtool/Tools__CodeView2.st,v 1.142 2014-03-05 13:41:18 cg Exp $'
 !
 
 version_SVN
-    ^ '$Id: Tools__CodeView2.st,v 1.141 2014-03-04 12:52:57 cg Exp $'
+    ^ '$Id: Tools__CodeView2.st,v 1.142 2014-03-05 13:41:18 cg Exp $'
 ! !