Commit 4cec52c2 authored by Alexander.Glukhov's avatar Alexander.Glukhov Committed by intellij-monorepo-bot
Browse files

[run anything] RunAnythingProvider: do not use legacy API for extension point resolution

GitOrigin-RevId: ce497dc685aec038fd9d1805f05aee7bee10c4a4
parent 9b4520a7
Showing with 2 additions and 5 deletions
+2 -5
......@@ -8,13 +8,13 @@ import com.intellij.openapi.actionSystem.DataKey;
import com.intellij.openapi.extensions.ExtensionPointName;
import com.intellij.openapi.util.NlsContexts;
import com.intellij.openapi.util.NlsSafe;
import com.intellij.util.containers.ContainerUtil;
import com.intellij.util.text.Matcher;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import javax.swing.*;
import java.util.Arrays;
import java.util.Collection;
import java.util.List;
......@@ -172,9 +172,6 @@ public interface RunAnythingProvider<V> {
*/
@Nullable
static RunAnythingProvider findMatchedProvider(@NotNull DataContext dataContext, @NotNull String pattern) {
return Arrays.stream(EP_NAME.getExtensions())
.filter(provider -> provider.findMatchingValue(dataContext, pattern) != null)
.findFirst()
.orElse(null);
return ContainerUtil.find(EP_NAME.getExtensionList(), provider -> provider.findMatchingValue(dataContext, pattern) != null);
}
}
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment