Lookup: create LookupDisplayStrategy EP to customize a method of displaying of the lookup; would allow removing LookupProvider EP - fix

GitOrigin-RevId: 4d7780dde40e23c94bd4e51d3f34077c81945dc7
This commit is contained in:
Dmitry Osinovskiy
2025-04-14 20:47:23 +00:00
committed by intellij-monorepo-bot
parent 03ad733315
commit cf93e63cd1
2 changed files with 2 additions and 1 deletions
@@ -26,6 +26,7 @@ interface LookupDisplayStrategy {
@Internal
val EP_NAME: ExtensionPointName<LookupDisplayStrategy> = ExtensionPointName("com.intellij.lookup.displayStrategy")
@JvmStatic
fun getStrategy(e: Editor): LookupDisplayStrategy = EP_NAME.extensionList.firstOrNull { it.isAvailable(e) } ?: LookupDisplayAsHintStrategy
}
@@ -138,7 +138,7 @@ public class LookupImpl extends LightweightHint implements LookupEx, Disposable,
myArranger = arranger;
myPresentableArranger = arranger;
this.editor.getColorsScheme().getFontPreferences().copyTo(myFontPreferences);
myDisplayStrategy = LookupDisplayStrategy.Companion.getStrategy(editor);
myDisplayStrategy = LookupDisplayStrategy.getStrategy(editor);
DaemonCodeAnalyzer.getInstance(session.getProject()).disableUpdateByTimer(this);