Skip to content

Commit

Permalink
[564950] Removes internal platform API usage
Browse files Browse the repository at this point in the history
The class ElementSelectionDialog uses an internal API that will be
removed in Platform 2020-09 that has a clean replacement available in
earlier Platform APIs.

Change-Id: Ic300f5fd2cffde2c838faa16b0ce6c79a01c3d97
Signed-off-by: Zoltan Ujhelyi <[email protected]>(cherry picked from commit bf64b47)
  • Loading branch information
ujhelyiz committed Aug 6, 2020
1 parent 49f8b5a commit 555aa95
Showing 1 changed file with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,14 +31,13 @@
import org.eclipse.swt.widgets.Table;
import org.eclipse.swt.widgets.TableItem;
import org.eclipse.swt.widgets.Text;
import org.eclipse.ui.dialogs.SearchPattern;
import org.eclipse.ui.dialogs.SelectionStatusDialog;
import org.eclipse.ui.internal.misc.StringMatcher;

/**
* @author Tamas Szabo
*
*/
@SuppressWarnings("restriction")
public class ElementSelectionDialog extends SelectionStatusDialog {

private StyledCellLabelProvider labelProvider;
Expand All @@ -57,9 +56,10 @@ private static class ImportFilter extends ViewerFilter {

@Override
public boolean select(Viewer viewer, Object parentElement, Object element) {
StringMatcher matcher = new StringMatcher("*" + filterString + "*", true, false);
SearchPattern matcher = new SearchPattern(SearchPattern.RULE_PATTERN_MATCH);
matcher.setPattern('*' + filterString + '*');
String label = element == null ? "" : element.toString();
return matcher.match(label);
return matcher.matches(label);
}

}
Expand Down

0 comments on commit 555aa95

Please sign in to comment.