mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
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:
committed by
intellij-monorepo-bot
parent
03ad733315
commit
cf93e63cd1
@@ -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);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user