From acece9c630a22de9ab83ff72f27180dff9a66190 Mon Sep 17 00:00:00 2001 From: Dennis Ushakov Date: Mon, 13 Nov 2023 16:46:08 +0100 Subject: [PATCH] [inlays] there's no need to cast editor to impl anymore GitOrigin-RevId: c6fd25777b849ef8577413361ba47b2f67147f74 --- .../refactoring/introduceParameter/IntroduceParameterHelper.kt | 2 +- .../com/intellij/codeInsight/hints/PresentationUITest.kt | 2 +- python/src/com/jetbrains/python/run/PythonImportErrorFilter.kt | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/java/java-impl-refactorings/src/com/intellij/refactoring/introduceParameter/IntroduceParameterHelper.kt b/java/java-impl-refactorings/src/com/intellij/refactoring/introduceParameter/IntroduceParameterHelper.kt index d055ae1f84ac..5085e11a1bbe 100644 --- a/java/java-impl-refactorings/src/com/intellij/refactoring/introduceParameter/IntroduceParameterHelper.kt +++ b/java/java-impl-refactorings/src/com/intellij/refactoring/introduceParameter/IntroduceParameterHelper.kt @@ -28,7 +28,7 @@ fun createDelegatePresentation( selectionListener: Consumer, ): InlayPresentation { val editor = templateState.editor - val factory = PresentationFactory(editor as EditorImpl) + val factory = PresentationFactory(editor) val textPresentation = WithAttributesPresentation(factory.inset(factory.text(title), 4, 0, 6, 3), INLINE_PARAMETER_HINT_CURRENT, editor, WithAttributesPresentation.AttributesFlags().withIsDefault(true)) diff --git a/platform/lang-impl/testSources/com/intellij/codeInsight/hints/PresentationUITest.kt b/platform/lang-impl/testSources/com/intellij/codeInsight/hints/PresentationUITest.kt index 2a7763ad0c39..83908d0cd72e 100644 --- a/platform/lang-impl/testSources/com/intellij/codeInsight/hints/PresentationUITest.kt +++ b/platform/lang-impl/testSources/com/intellij/codeInsight/hints/PresentationUITest.kt @@ -15,7 +15,7 @@ import java.io.File import javax.imageio.ImageIO class PresentationUITest : LightPlatformCodeInsightTestCase() { - val factory: PresentationFactory by lazy { PresentationFactory(editor as EditorImpl) } + val factory: PresentationFactory by lazy { PresentationFactory(editor) } override fun setUp() { super.setUp() diff --git a/python/src/com/jetbrains/python/run/PythonImportErrorFilter.kt b/python/src/com/jetbrains/python/run/PythonImportErrorFilter.kt index 165e6c69026d..5efa9876e565 100644 --- a/python/src/com/jetbrains/python/run/PythonImportErrorFilter.kt +++ b/python/src/com/jetbrains/python/run/PythonImportErrorFilter.kt @@ -115,7 +115,7 @@ class PythonImportErrorFilter(val project: Project) : Filter { private val virtualFile: VirtualFile, ) : Filter.Result(highlightStartOffset, highlightEndOffset, null), InlayProvider { override fun createInlayRenderer(editor: Editor): EditorCustomElementRenderer { - val factory = PresentationFactory(editor as EditorImpl) + val factory = PresentationFactory(editor) val inlayText = PyBundle.message("run.debug.shadowing.name.import.error.title", virtualFile.name) val presentation = factory.referenceOnHover(factory.roundWithBackground(factory.withReferenceAttributes(factory.text(inlayText))) ) { event: MouseEvent?, _: Point? ->