[inlays] there's no need to cast editor to impl anymore

GitOrigin-RevId: c6fd25777b849ef8577413361ba47b2f67147f74
This commit is contained in:
Dennis Ushakov
2023-11-13 20:35:02 +00:00
committed by intellij-monorepo-bot
parent 4e8a4271dd
commit acece9c630
3 changed files with 3 additions and 3 deletions
@@ -28,7 +28,7 @@ fun createDelegatePresentation(
selectionListener: Consumer<Boolean>,
): 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))
@@ -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()
@@ -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? ->