#REFACTORING by cg
authorClaus Gittinger <cg@exept.de>
Fri, 09 Dec 2016 13:45:39 +0100
changeset 5996 120d210b278d
parent 5995 a44c8b27bbad
child 5997 3bfbd15008fe
#REFACTORING by cg class: WorkspaceCompletionSupport changed: #computeCompletions use isDebugView instead of class == DebugView or isKindOf:DebugView (to allow replacing the debugger)
WorkspaceCompletionSupport.st
--- a/WorkspaceCompletionSupport.st	Fri Dec 09 13:44:48 2016 +0100
+++ b/WorkspaceCompletionSupport.st	Fri Dec 09 13:45:39 2016 +0100
@@ -32,11 +32,12 @@
 
 computeCompletions
 
-    |suggestions implementations actions contextOrNil|
+    |topView suggestions implementations actions contextOrNil|
 
-    "/ a hack
-    (editView topView isKindOf: DebugView) ifTrue:[
-        contextOrNil := editView topView selectedContext.
+    "/ a hack - we get better completions, if we know the current context
+    topView := editView topView.
+    (topView notNil and:[topView isDebugView]) ifTrue:[
+        contextOrNil := topView selectedContext.
     ].
 
     UserInformation ignoreIn:[