[R] decouple R from visualization module

Use RNotebookAppearance instead of abstract notebook appearance

GitOrigin-RevId: 0d6364c8bbb646c1c325b06e8666ae956222bc8f
This commit is contained in:
Igor Slobodskov
2025-04-23 18:20:57 +00:00
committed by intellij-monorepo-bot
parent b1a58215ae
commit e3ecc3ce36
2 changed files with 0 additions and 38 deletions
@@ -4,7 +4,6 @@ package com.intellij.notebooks.ui.visualization
import com.intellij.notebooks.ui.visualization.NotebookEditorAppearance.Companion.NOTEBOOK_APPEARANCE_KEY
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.EditorKind
import com.intellij.openapi.editor.colors.EditorColors
import com.intellij.openapi.editor.impl.EditorImpl
import java.awt.Graphics
import java.awt.Rectangle
@@ -41,23 +40,4 @@ object NotebookUtil {
actionBetweenBackgroundAndStripe()
}
fun paintCaretRow(editor: EditorImpl, g: Graphics, lines: IntRange) {
if (editor.settings.isCaretRowShown) {
val caretModel = editor.caretModel
val caretLine = caretModel.logicalPosition.line
if (caretLine in lines) {
g.color = editor.colorsScheme.getColor(EditorColors.CARET_ROW_COLOR)
g.fillRect(
0,
editor.visualLineToY(caretModel.visualPosition.line),
g.clipBounds.width,
editor.lineHeight
)
}
}
}
}
@@ -1,18 +0,0 @@
package com.intellij.notebooks.ui.visualization.markerRenderers
import com.intellij.notebooks.ui.visualization.NotebookUtil.paintCaretRow
import com.intellij.openapi.editor.Editor
import com.intellij.openapi.editor.impl.EditorImpl
import com.intellij.openapi.editor.markup.RangeHighlighter
import java.awt.Graphics
import java.awt.Rectangle
class NotebookTextCellBackgroundLineMarkerRenderer(private val highlighter: RangeHighlighter) : NotebookLineMarkerRenderer() {
override fun paint(editor: Editor, g: Graphics, r: Rectangle) {
editor as EditorImpl
val lines = IntRange(editor.document.getLineNumber(highlighter.startOffset), editor.document.getLineNumber(highlighter.endOffset))
paintCaretRow(editor, g, lines)
}
}