Revision: 19839
          http://sourceforge.net/p/gate/code/19839
Author:   markagreenwood
Date:     2016-12-01 22:59:53 +0000 (Thu, 01 Dec 2016)
Log Message:
-----------
fixed the search so that it continues to work even after a document edit

Modified Paths:
--------------
    gate/trunk/src/main/gate/gui/docview/DocumentEditor.java

Modified: gate/trunk/src/main/gate/gui/docview/DocumentEditor.java
===================================================================
--- gate/trunk/src/main/gate/gui/docview/DocumentEditor.java    2016-12-01 
02:23:33 UTC (rev 19838)
+++ gate/trunk/src/main/gate/gui/docview/DocumentEditor.java    2016-12-01 
22:59:53 UTC (rev 19839)
@@ -958,7 +958,6 @@
     protected void initLocalData() {
       pattern = null;
       nextMatchStartsFrom = 0;
-      content = document.getContent().toString();
       findFirstAction = new AbstractAction("Find first") {
         {
           putValue(SHORT_DESCRIPTION, "Finds first match");
@@ -967,6 +966,7 @@
 
         @Override
         public void actionPerformed(ActionEvent evt) {
+          String content = document.getContent().toString();
           refresh();
           if(!isValidRegularExpression()) return;
           boolean found = false;
@@ -1020,6 +1020,7 @@
 
         @Override
         public void actionPerformed(ActionEvent evt) {
+          String content = document.getContent().toString();
           refresh();
           if(!isValidRegularExpression()) return;
           boolean found = false;
@@ -1269,8 +1270,6 @@
 
     int nextMatchStartsFrom;
 
-    String content;
-
     Action findFirstAction;
 
     Action findNextAction;

This was sent by the SourceForge.net collaborative development platform, the 
world's largest Open Source development site.


------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most 
engaging tech sites, SlashDot.org! http://sdm.link/slashdot
_______________________________________________
GATE-cvs mailing list
GATE-cvs@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/gate-cvs

Reply via email to