From f428a650609525af1c412c52d498c97e4abe3e9f Mon Sep 17 00:00:00 2001 From: Vladimir Lagunov Date: Mon, 14 Feb 2022 23:21:01 +0700 Subject: [PATCH] DS-2110 Jupyter: support 3rd-party content manager Jupytext for remote servers GitOrigin-RevId: 896d0ca4a64b6af9b0bd758397c04d769065cc41 --- .../plugins/notebooks/core/api/lang/NotebookLanguage.kt | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/jupyter/src/org/jetbrains/plugins/notebooks/core/api/lang/NotebookLanguage.kt b/jupyter/src/org/jetbrains/plugins/notebooks/core/api/lang/NotebookLanguage.kt index f7e2ba48246c..540c4dc0e989 100644 --- a/jupyter/src/org/jetbrains/plugins/notebooks/core/api/lang/NotebookLanguage.kt +++ b/jupyter/src/org/jetbrains/plugins/notebooks/core/api/lang/NotebookLanguage.kt @@ -1,9 +1,14 @@ package org.jetbrains.plugins.notebooks.core.api.lang import com.intellij.lang.Language +import com.intellij.openapi.fileTypes.FileType +import com.intellij.openapi.fileTypes.LanguageFileType /** * General language for notebooks. * To share some of the common features for the notebooks, their language should use [NotebookLanguage] as base one. */ object NotebookLanguage: Language("Notebook") + +val FileType.isNotebookLanguage: Boolean + get() = (this as? LanguageFileType)?.language?.baseLanguage is NotebookLanguage \ No newline at end of file