#DOCUMENTATION by cg
authorClaus Gittinger <cg@exept.de>
Sat, 07 May 2016 15:28:42 +0200
changeset 5714 7da163a68f57
parent 5713 83f67e5544b8
child 5715 8baebc416a38
#DOCUMENTATION by cg class: TextView comment/format in: #searchUsingSearchAction: #searchUsingSearchAction:ifAbsent:
TextView.st
--- a/TextView.st	Sat May 07 14:46:59 2016 +0200
+++ b/TextView.st	Sat May 07 15:28:42 2016 +0200
@@ -4403,33 +4403,41 @@
 !
 
 searchUsingSearchAction:direction
+    "search using a searchaction which has been given by someone else.
+     Typically, this is the embedding browser, which has provided an action for
+      a language aware search (as opposed to a naive string search)"
+
     self
-	searchUsingSearchAction:direction
-	ifAbsent:[
-		    self sensor compressKeyPressEventsWithKey:#FindNext.
-		    self showNotFound
-		 ]
+        searchUsingSearchAction:direction
+        ifAbsent:[
+                    self sensor compressKeyPressEventsWithKey:#FindNext.
+                    self showNotFound
+                 ]
 !
 
 searchUsingSearchAction:direction ifAbsent:notFoundAction
+    "search using a searchaction which has been given by someone else.
+     Typically, this is the embedding browser, which has provided an action for
+      a language aware search (as opposed to a naive string search)"
+      
     |pos startLine startCol|
 
     pos :=  direction == #backward
-		ifTrue:[self startPositionForSearchBackward]
-		ifFalse:[self startPositionForSearchForward].
+                ifTrue:[self startPositionForSearchBackward]
+                ifFalse:[self startPositionForSearchForward].
     startLine := pos y.
     startCol := pos x.
 
     searchAction notNil ifTrue:[
-	searchAction
-	    value:direction
-	    value:startLine
-	    value:startCol
-	    value:[:line :col | self selectFromLine:line toLine:line]
-	    value:notFoundAction.
-	self hasSelection ifTrue: [
-	    self changeTypeOfSelectionTo: #searchAction.
-	].
+        searchAction
+            value:direction
+            value:startLine
+            value:startCol
+            value:[:line :col | self selectFromLine:line toLine:line]
+            value:notFoundAction.
+        self hasSelection ifTrue: [
+            self changeTypeOfSelectionTo: #searchAction.
+        ].
     ].
 !