From 3b68a39f0c559587300bdc6e9ce6a5c445d983af Mon Sep 17 00:00:00 2001 From: Dave McKnight Date: Wed, 11 Mar 2015 16:10:18 -0400 Subject: [PATCH] [458647] RSE table views don't support quick search when SWT.VIRTUAL used --- .../UI/org/eclipse/rse/ui/view/SystemTableView.java | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java index 2d524b7bbf6..6a1a90824ec 100644 --- a/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java +++ b/rse/plugins/org.eclipse.rse.ui/UI/org/eclipse/rse/ui/view/SystemTableView.java @@ -2211,19 +2211,22 @@ public class SystemTableView } */ } - else if (event.stateMask == 0){ + else if (event.stateMask == 0){ // now that we use SWT.VIRTUAL, quick search does not automatically work // instead we have to implement this ourselves int sel = getTable().getSelectionIndex(); char c = event.character; + String lowerMatch = new String(""+c).toLowerCase(); //$NON-NLS-1$ + String upperMatch = new String(""+c).toUpperCase(); //$NON-NLS-1$ + TableItem[] items = getTable().getItems(); TableItem found = null; for (int i = sel+1; i < items.length && found == null; i++){ - TableItem item = items[i]; + TableItem item = items[i]; String text = item.getText(); - if (text.startsWith(""+c)){ //$NON-NLS-1$ + if (text.startsWith(lowerMatch) || text.startsWith(upperMatch)){ found = item; } } @@ -2232,7 +2235,7 @@ public class SystemTableView for (int i = 0; i < sel && found == null; i++){ TableItem item = items[i]; String text = item.getText(); - if (text.startsWith(""+c)){ //$NON-NLS-1$ + if (text.startsWith(lowerMatch) || text.startsWith(upperMatch)){ found = item; } }