@Override protected IStatus run(IProgressMonitor monitor) { String pattern; synchronized (navigationLock) { if (monitor.isCanceled() || StringUtility.isNullOrEmpty(m_filterText)) { return Status.CANCEL_STATUS; } pattern = StringUtility.toRegExPattern(m_filterText.toLowerCase()); pattern = pattern + ".*"; } // this call must be outside lock! handleSearchPattern(pattern); return Status.OK_STATUS; }
@Override protected void execChangedValue() throws ProcessingException { String s = StringUtility.emptyIfNull(getValue()).trim(); if (s.length() > 0) { if (!s.endsWith("*")) { s = s + "*"; } if (!s.startsWith("*")) { s = "*" + s; } m_lowercaseFilterPattern = Pattern.compile( StringUtility.toRegExPattern(s.toLowerCase(LocaleThreadLocal.get()))); getSecondTreeField().getTree().addNodeFilter(this); } else { getSecondTreeField().getTree().removeNodeFilter(this); } }