[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[cross-project-issues-dev] Wildcard string matching: removal of org.eclipse.ui.internal.misc.StringMatcher
|
Hi,
I plan to remove class org.eclipse.ui.internal.misc.StringMatcher in 4.17 M2.
This is an *internal* non-API class in bundle org.eclipse.ui.workbench.
As far as I see there are three direct uses of this class outside of Eclipse platform:
* Mylyn Context: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564946
* Babel Plugins: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564952
* Viatra: https://bugs.eclipse.org/bugs/show_bug.cgi?id=564950
(I found those via a Google search; there might be more.)
These projects should migrate away from importing org.eclipse.ui.internal.misc.StringMatcher.
There is an official API class org.eclipse.ui.dialogs.SearchPattern that can be used
to get the functionality of org.eclipse.ui.internal.misc.StringMatcher.
Since org.eclipse.core.runtime 3.18.0 there is also an API class
org.eclipse.core.text.StringMatcher that implements basic wildcard matching.
The current org.eclipse.ui.internal.misc.StringMatcher does more; it splits the pattern
on whitespace and tries to match sub-patterns against words in the text. There is a
new replacement for this called org.eclipse.ui.internal.misc.TextMatcher since
org.eclipse.ui.workbench 3.120.0, but that is also an internal non-API class.
If your code needs this word-splitting behavior, use org.eclipse.ui.dialogs.SearchPattern,
which has existed for a long time already. Otherwise use org.eclipse.core.text.StringMatcher.
Cheers,
Thomas