You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@opennlp.apache.org by jo...@apache.org on 2011/11/18 13:13:54 UTC

svn commit: r1203620 - /incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/EntityContentProvider.java

Author: joern
Date: Fri Nov 18 12:13:53 2011
New Revision: 1203620

URL: http://svn.apache.org/viewvc?rev=1203620&view=rev
Log:
OPENNLP-392 Improved selection handling after one was skipped.

Modified:
    incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/EntityContentProvider.java

Modified: incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/EntityContentProvider.java
URL: http://svn.apache.org/viewvc/incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/EntityContentProvider.java?rev=1203620&r1=1203619&r2=1203620&view=diff
==============================================================================
--- incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/EntityContentProvider.java (original)
+++ incubator/opennlp/sandbox/caseditor-opennlp-plugin/src/main/java/org/apache/opennlp/caseditor/namefinder/EntityContentProvider.java Fri Nov 18 12:13:53 2011
@@ -98,6 +98,10 @@ public class EntityContentProvider imple
         // TODO: Refactor this code branch ...
         //       Now it only needs to remove all intersecting entites from the
         //       candidate list and add the entity itself to the confirmed list
+        
+        int selectionIndex = EntityContentProvider.this.entityListViewer.
+            getTable().getSelectionIndex();
+        
         if (!entityList.isEmpty()) {
           Entity entity = entityList.get(0);
           entity.setBeginIndex(annotation.getBegin());
@@ -122,9 +126,6 @@ public class EntityContentProvider imple
             }
           }
           
-          int selectionIndex = EntityContentProvider.this.entityListViewer.
-              getTable().getSelectionIndex();
-          
           if (selectionIndex != -1) {
             if (selectionIndex < entityListViewer.
                 getTable().getItemCount()) {