extensions.st
changeset 377 c686ea588575
parent 373 1365a78e6e36
child 378 359fd8380abd
--- a/extensions.st	Fri Jan 23 19:19:02 2015 +0100
+++ b/extensions.st	Sat Jan 24 01:58:51 2015 +0000
@@ -589,6 +589,37 @@
     "Created: / 25-11-2013 / 12:27:58 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
+!Tools::NewSystemBrowser methodsFor:'menu actions-searching-SmallSense'!
+
+searchMenuOpenNavigatorOnDeclarations
+    "Open a SmallSense navigator on definitions (i.e.,
+     navugating to a class or or method implementor)"
+
+    | result |    
+
+    result := SmallSense::Navigator open.
+    result isBehavior ifTrue:[ 
+        self switchToClass: result.
+        ^ self
+    ].
+    result isMethod ifTrue:[ 
+        self switchToClass: result mclass selector: result selector.
+        ^ self
+    ].
+    result isCollection ifTrue:[ 
+        (result allSatisfy:[:e|e isMethod]) ifTrue:[ 
+            self  spawnMethodBrowserForSearch:[ result ] 
+                  sortBy:#class 
+                  in:#newBuffer 
+                  label:(resources string: 'Implementors of %1' with: result anElement selector storeString)
+        ].
+        ^ self
+    ].
+    ^ self
+
+    "Created: / 23-01-2015 / 20:31:26 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+! !
+
 !Tools::NewSystemBrowser methodsFor:'private-searching-smallsense'!
 
 smallSenseSearchCompletion:patternString
@@ -725,30 +756,9 @@
             | key |
 
             key := anEvent key.
-            key == #Find ifTrue:[ 
-                (anEvent targetView isSameOrComponentOf:self codeView) ifFalse:[ 
-                    | result |    
-
-                    result := SmallSense::Navigator open.
-                    result isBehavior ifTrue:[ 
-                        self switchToClass: result.
-                        ^ true
-                    ].
-                    result isMethod ifTrue:[ 
-                        self switchToClass: result mclass selector: result selector.
-                        ^ true
-                    ].
-                    result isCollection ifTrue:[ 
-                        (result allSatisfy:[:e|e isMethod]) ifTrue:[ 
-                            self  spawnMethodBrowserForSearch:[ result ] 
-                                  sortBy:#class 
-                                  in:#newBuffer 
-                                  label:(resources string: 'Implementors of %1' with: result anElement selector storeString)
-                        ].
-                        ^ true
-                    ].
-                    ^ true
-                ].
+            key == #CtrlT ifTrue:[ 
+                self searchMenuOpenNavigatorOnDeclarations.
+                ^ true
             ].
         ]
     ].
@@ -759,7 +769,7 @@
     "
 
     "Created: / 10-01-2015 / 13:37:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
-    "Modified: / 14-01-2015 / 16:30:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
+    "Modified: / 24-01-2015 / 01:47:53 / Jan Vrany <jan.vrany@fit.cvut.cz>"
 ! !
 
 !Tools::NewSystemBrowser class methodsFor:'utilities'!