[jupyter] PY-85570 Jupyter: refactor Debuger

Merge-request: IJ-MR-182197
Merged-by: Nikita Ashihmin <Nikita.Ashihmin@jetbrains.com>

GitOrigin-RevId: 8ffafbef27f10a733e98a261c7cdddb75636b07e
This commit is contained in:
Nikita Ashihmin
2025-11-12 16:29:13 +00:00
committed by intellij-monorepo-bot
parent c304e71274
commit 2550bd72b9
2 changed files with 3 additions and 3 deletions
@@ -29,7 +29,6 @@ interface NotebookCellLines {
NO(false, false),
TOP(true, false),
BOTTOM(false, true),
TOP_AND_BOTTOM(true, true)
}
data class Interval(
@@ -103,7 +102,6 @@ interface NotebookCellLines {
}
fun getContentText(file: VirtualFile): String {
val document = FileDocumentManager.getInstance().getDocument(file)!!
return getContentText(document).toString()
}
@@ -18,8 +18,10 @@ object NotebookDataContext {
val DataContext.notebookEditor: EditorImpl?
get() {
val component = getData(PlatformCoreDataKeys.CONTEXT_COMPONENT)
val editor = getData(PlatformCoreDataKeys.EDITOR)
if (editor is EditorImpl && NotebookCellLines.hasSupport(editor))
return editor
val component = getData(PlatformCoreDataKeys.CONTEXT_COMPONENT)
val noteEditor = NotebookDataContextUtils.getCurrentEditor(editor, component) ?: return null
if (NotebookDataContextUtils.hasFocusedSearchReplaceComponent(noteEditor, component))
return null