You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@uima.apache.org by pk...@apache.org on 2013/09/26 14:48:01 UTC

svn commit: r1526468 - in /uima/sandbox/ruta/trunk: ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java

Author: pkluegl
Date: Thu Sep 26 12:48:01 2013
New Revision: 1526468

URL: http://svn.apache.org/r1526468
Log:
UIMA-3306
- ignore case in filter fields

Modified:
    uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java
    uima/sandbox/ruta/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java

Modified: uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java?rev=1526468&r1=1526467&r2=1526468&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-addons/src/main/java/org/apache/uima/ruta/utils/ui/SelectTypesDialog.java Thu Sep 26 12:48:01 2013
@@ -15,7 +15,7 @@
  * KIND, either express or implied.  See the License for the
  * specific language governing permissions and limitations
  * under the License.
-*/
+ */
 
 package org.apache.uima.ruta.utils.ui;
 
@@ -44,7 +44,6 @@ import org.eclipse.swt.widgets.TableItem
 import org.eclipse.swt.widgets.Text;
 import org.eclipse.swt.widgets.Widget;
 
-
 public class SelectTypesDialog extends Dialog implements Listener {
 
   private Shell shell;
@@ -65,7 +64,6 @@ public class SelectTypesDialog extends D
 
   private List<String> initialTypes;
 
-
   public SelectTypesDialog(Shell shell, List<String> allTypes, List<String> selectedTypes) {
     super(shell);
     this.shell = shell;
@@ -212,7 +210,8 @@ public class SelectTypesDialog extends D
     aTypeName = aTypeName.toLowerCase();
     for (String type : allTypes) {
       String candidateTypeName = type.toLowerCase();
-      if (StringUtils.isBlank(aTypeName) || candidateTypeName.indexOf(aTypeName) != -1) {
+      if (StringUtils.isBlank(aTypeName)
+              || candidateTypeName.toLowerCase().indexOf(aTypeName.toLowerCase()) != -1) {
 
         if (StringUtils.isEmpty(topEntry)) {
           topEntry = type;
@@ -237,14 +236,14 @@ public class SelectTypesDialog extends D
         TableItem ti = (TableItem) item;
         TableItem[] selection = list.getSelection();
         for (TableItem tableItem : selection) {
-          if(tableItem != ti) {
+          if (tableItem != ti) {
             if (ti.getChecked()) {
               tableItem.setChecked(true);
               selectedTypes.add(tableItem.getText());
             } else {
               selectedTypes.remove(tableItem.getText());
               tableItem.setChecked(false);
-            }           
+            }
           }
         }
         if (ti.getChecked()) {

Modified: uima/sandbox/ruta/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java
URL: http://svn.apache.org/viewvc/uima/sandbox/ruta/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java?rev=1526468&r1=1526467&r2=1526468&view=diff
==============================================================================
--- uima/sandbox/ruta/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java (original)
+++ uima/sandbox/ruta/trunk/ruta-ep-caseditor/src/main/java/org/apache/uima/ruta/caseditor/view/tree/AnnotationTreeViewPage.java Thu Sep 26 12:48:01 2013
@@ -477,9 +477,9 @@ public class AnnotationTreeViewPage exte
       boolean offsetConstraint = pos == -1
               || (annotationFS.getBegin() <= pos && annotationFS.getEnd() >= pos);
       boolean typeConstraint = StringUtils.isEmpty(manualTypeFilter)
-              || annotationFS.getType().getName().indexOf(manualTypeFilter) != -1;
+              || annotationFS.getType().getName().toLowerCase().indexOf(manualTypeFilter.toLowerCase()) != -1;
       boolean textConstraint = StringUtils.isEmpty(manualTextFilter)
-              || annotationFS.getCoveredText().indexOf(manualTextFilter) != -1;
+              || annotationFS.getCoveredText().toLowerCase().indexOf(manualTextFilter.toLowerCase()) != -1;
       if (offsetConstraint && typeConstraint && textConstraint) {
         root.insertFS(annotationFS, withParents);
       }