From ee148eaba0454101bfbf1a827236d75b9be21049 Mon Sep 17 00:00:00 2001 From: "Ilya.Kazakevich" Date: Tue, 16 Jan 2024 19:40:13 +0100 Subject: [PATCH] [python] fix jupyter packages GitOrigin-RevId: 4e5f0656c7b83e3129f144dc4f5436bcf9883fd8 --- .../com/intellij/jupyter/core}/icons/JupyterCoreIcons.java | 2 +- jupyter/intellij.jupyter.core.iml | 1 + jupyter/resources/META-INF/jupyter-core.xml | 2 +- .../intellij/jupyter/core}/jupyter/JupyterFileType.kt | 4 ++-- .../intellij/jupyter/core}/jupyter/JupyterLanguage.kt | 4 ++-- .../intellij/jupyter/core}/jupyter/JupyterPsiBundle.kt | 2 +- .../jupyter/core}/jupyter/preview/JupyterCefHttpHandler.kt | 2 +- .../jupyter/core}/jupyter/preview/JupyterHttpUtils.kt | 2 +- .../intellij/jupyter/core}/lang/NotebookLanguage.kt | 2 +- jupyter/viewOnly/resources/META-INF/jupyter-view-only.xml | 4 ++-- .../jupyter}/viewOnly/JupyterViewOnlyFileEditor.kt | 7 +++---- .../intellij/jupyter}/viewOnly/JupyterViewOnlyHandler.kt | 4 ++-- .../intellij/jupyter}/viewOnly/JupyterViewOnlyProvider.kt | 4 ++-- .../build/images/IntellijIconClassGeneratorConfig.kt | 5 +++++ 14 files changed, 25 insertions(+), 20 deletions(-) rename jupyter/{src => gen/com/intellij/jupyter/core}/icons/JupyterCoreIcons.java (93%) rename jupyter/src/{org/jetbrains/plugins/notebooks => com/intellij/jupyter/core}/jupyter/JupyterFileType.kt (88%) rename jupyter/src/{org/jetbrains/plugins/notebooks => com/intellij/jupyter/core}/jupyter/JupyterLanguage.kt (79%) rename jupyter/src/{org/jetbrains/plugins/notebooks => com/intellij/jupyter/core}/jupyter/JupyterPsiBundle.kt (92%) rename jupyter/src/{org/jetbrains/plugins/notebooks => com/intellij/jupyter/core}/jupyter/preview/JupyterCefHttpHandler.kt (98%) rename jupyter/src/{org/jetbrains/plugins/notebooks => com/intellij/jupyter/core}/jupyter/preview/JupyterHttpUtils.kt (95%) rename jupyter/src/{org/jetbrains/plugins/notebooks/core/api => com/intellij/jupyter/core}/lang/NotebookLanguage.kt (81%) rename jupyter/viewOnly/src/{org/jetbrains/plugins/notebooks/jupyter/preview => com/intellij/jupyter}/viewOnly/JupyterViewOnlyFileEditor.kt (93%) rename jupyter/viewOnly/src/{org/jetbrains/plugins/notebooks/jupyter/preview => com/intellij/jupyter}/viewOnly/JupyterViewOnlyHandler.kt (71%) rename jupyter/viewOnly/src/{org/jetbrains/plugins/notebooks/jupyter/preview => com/intellij/jupyter}/viewOnly/JupyterViewOnlyProvider.kt (89%) diff --git a/jupyter/src/icons/JupyterCoreIcons.java b/jupyter/gen/com/intellij/jupyter/core/icons/JupyterCoreIcons.java similarity index 93% rename from jupyter/src/icons/JupyterCoreIcons.java rename to jupyter/gen/com/intellij/jupyter/core/icons/JupyterCoreIcons.java index 15bf18c1182e..4f65a7563004 100644 --- a/jupyter/src/icons/JupyterCoreIcons.java +++ b/jupyter/gen/com/intellij/jupyter/core/icons/JupyterCoreIcons.java @@ -1,4 +1,4 @@ -package icons; +package com.intellij.jupyter.core.icons; import com.intellij.ui.IconManager; import org.jetbrains.annotations.NotNull; diff --git a/jupyter/intellij.jupyter.core.iml b/jupyter/intellij.jupyter.core.iml index 2281bc0cce0e..e086f0a21c6c 100644 --- a/jupyter/intellij.jupyter.core.iml +++ b/jupyter/intellij.jupyter.core.iml @@ -5,6 +5,7 @@ + diff --git a/jupyter/resources/META-INF/jupyter-core.xml b/jupyter/resources/META-INF/jupyter-core.xml index e9e2e19008f6..f4e330fb925b 100644 --- a/jupyter/resources/META-INF/jupyter-core.xml +++ b/jupyter/resources/META-INF/jupyter-core.xml @@ -4,7 +4,7 @@ diff --git a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterFileType.kt b/jupyter/src/com/intellij/jupyter/core/jupyter/JupyterFileType.kt similarity index 88% rename from jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterFileType.kt rename to jupyter/src/com/intellij/jupyter/core/jupyter/JupyterFileType.kt index 6d8652b498f0..1c0fbbefd42e 100644 --- a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterFileType.kt +++ b/jupyter/src/com/intellij/jupyter/core/jupyter/JupyterFileType.kt @@ -1,10 +1,10 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter +package com.intellij.jupyter.core.jupyter import com.intellij.openapi.fileTypes.LanguageFileType import com.intellij.openapi.vfs.CharsetToolkit import com.intellij.openapi.vfs.VirtualFile -import icons.JupyterCoreIcons +import com.intellij.jupyter.core.icons.JupyterCoreIcons import org.jetbrains.annotations.NonNls import javax.swing.Icon diff --git a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterLanguage.kt b/jupyter/src/com/intellij/jupyter/core/jupyter/JupyterLanguage.kt similarity index 79% rename from jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterLanguage.kt rename to jupyter/src/com/intellij/jupyter/core/jupyter/JupyterLanguage.kt index d86697f93a6b..96aa17dcd4b5 100644 --- a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterLanguage.kt +++ b/jupyter/src/com/intellij/jupyter/core/jupyter/JupyterLanguage.kt @@ -1,10 +1,10 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter +package com.intellij.jupyter.core.jupyter import com.intellij.lang.Language import com.intellij.openapi.fileTypes.FileType import com.intellij.openapi.fileTypes.LanguageFileType -import org.jetbrains.plugins.notebooks.core.api.lang.NotebookLanguage +import com.intellij.jupyter.core.lang.NotebookLanguage object JupyterLanguage : Language(NotebookLanguage, "Jupyter") diff --git a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterPsiBundle.kt b/jupyter/src/com/intellij/jupyter/core/jupyter/JupyterPsiBundle.kt similarity index 92% rename from jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterPsiBundle.kt rename to jupyter/src/com/intellij/jupyter/core/jupyter/JupyterPsiBundle.kt index ec134dd69f44..46d5fc80eb9b 100644 --- a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/JupyterPsiBundle.kt +++ b/jupyter/src/com/intellij/jupyter/core/jupyter/JupyterPsiBundle.kt @@ -1,5 +1,5 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter +package com.intellij.jupyter.core.jupyter import com.intellij.DynamicBundle import org.jetbrains.annotations.Nls diff --git a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/preview/JupyterCefHttpHandler.kt b/jupyter/src/com/intellij/jupyter/core/jupyter/preview/JupyterCefHttpHandler.kt similarity index 98% rename from jupyter/src/org/jetbrains/plugins/notebooks/jupyter/preview/JupyterCefHttpHandler.kt rename to jupyter/src/com/intellij/jupyter/core/jupyter/preview/JupyterCefHttpHandler.kt index 7847c60c6209..3cd36ce9e036 100644 --- a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/preview/JupyterCefHttpHandler.kt +++ b/jupyter/src/com/intellij/jupyter/core/jupyter/preview/JupyterCefHttpHandler.kt @@ -1,5 +1,5 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter.preview +package com.intellij.jupyter.core.jupyter.preview import com.intellij.openapi.application.ApplicationManager diff --git a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/preview/JupyterHttpUtils.kt b/jupyter/src/com/intellij/jupyter/core/jupyter/preview/JupyterHttpUtils.kt similarity index 95% rename from jupyter/src/org/jetbrains/plugins/notebooks/jupyter/preview/JupyterHttpUtils.kt rename to jupyter/src/com/intellij/jupyter/core/jupyter/preview/JupyterHttpUtils.kt index 38850d4d2b74..03d552738e59 100644 --- a/jupyter/src/org/jetbrains/plugins/notebooks/jupyter/preview/JupyterHttpUtils.kt +++ b/jupyter/src/com/intellij/jupyter/core/jupyter/preview/JupyterHttpUtils.kt @@ -1,5 +1,5 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter.preview +package com.intellij.jupyter.core.jupyter.preview import org.apache.http.client.utils.URIBuilder import org.jetbrains.ide.BuiltInServerManager diff --git a/jupyter/src/org/jetbrains/plugins/notebooks/core/api/lang/NotebookLanguage.kt b/jupyter/src/com/intellij/jupyter/core/lang/NotebookLanguage.kt similarity index 81% rename from jupyter/src/org/jetbrains/plugins/notebooks/core/api/lang/NotebookLanguage.kt rename to jupyter/src/com/intellij/jupyter/core/lang/NotebookLanguage.kt index a5c9df50e296..79c130a9c2ba 100644 --- a/jupyter/src/org/jetbrains/plugins/notebooks/core/api/lang/NotebookLanguage.kt +++ b/jupyter/src/com/intellij/jupyter/core/lang/NotebookLanguage.kt @@ -1,4 +1,4 @@ -package org.jetbrains.plugins.notebooks.core.api.lang +package com.intellij.jupyter.core.lang import com.intellij.lang.Language diff --git a/jupyter/viewOnly/resources/META-INF/jupyter-view-only.xml b/jupyter/viewOnly/resources/META-INF/jupyter-view-only.xml index d71970695a2d..db764da0d677 100644 --- a/jupyter/viewOnly/resources/META-INF/jupyter-view-only.xml +++ b/jupyter/viewOnly/resources/META-INF/jupyter-view-only.xml @@ -3,7 +3,7 @@ - - + + diff --git a/jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyFileEditor.kt b/jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyFileEditor.kt similarity index 93% rename from jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyFileEditor.kt rename to jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyFileEditor.kt index e84128441153..6c4aeae9ca3f 100644 --- a/jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyFileEditor.kt +++ b/jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyFileEditor.kt @@ -1,5 +1,5 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter.preview.viewOnly +package com.intellij.jupyter.viewOnly import com.intellij.ide.ui.LafManagerListener @@ -17,13 +17,12 @@ import kotlinx.coroutines.CoroutineScope import kotlinx.coroutines.Dispatchers import kotlinx.coroutines.cancel import kotlinx.coroutines.flow.MutableStateFlow -import kotlinx.coroutines.flow.collect import kotlinx.coroutines.launch import org.cef.browser.CefBrowser import org.cef.browser.CefFrame import org.cef.handler.CefLoadHandlerAdapter -import org.jetbrains.plugins.notebooks.jupyter.preview.JupyterCefHttpHandlerBase -import org.jetbrains.plugins.notebooks.jupyter.preview.addPathSegment +import com.intellij.jupyter.core.jupyter.preview.JupyterCefHttpHandlerBase +import com.intellij.jupyter.core.jupyter.preview.addPathSegment import java.beans.PropertyChangeListener import java.nio.ByteBuffer import javax.swing.JComponent diff --git a/jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyHandler.kt b/jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyHandler.kt similarity index 71% rename from jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyHandler.kt rename to jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyHandler.kt index 9d7c0ca4c43e..c3148ec9307c 100644 --- a/jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyHandler.kt +++ b/jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyHandler.kt @@ -1,7 +1,7 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter.preview.viewOnly +package com.intellij.jupyter.viewOnly -import org.jetbrains.plugins.notebooks.jupyter.preview.JupyterCefHttpHandlerBase +import com.intellij.jupyter.core.jupyter.preview.JupyterCefHttpHandlerBase class JupyterViewOnlyHandler : JupyterCefHttpHandlerBase(absolutePathFiles = listOf( "/ipywidgets.html", diff --git a/jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyProvider.kt b/jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyProvider.kt similarity index 89% rename from jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyProvider.kt rename to jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyProvider.kt index 366cc11a514a..4e2c45924c69 100644 --- a/jupyter/viewOnly/src/org/jetbrains/plugins/notebooks/jupyter/preview/viewOnly/JupyterViewOnlyProvider.kt +++ b/jupyter/viewOnly/src/com/intellij/jupyter/viewOnly/JupyterViewOnlyProvider.kt @@ -1,5 +1,5 @@ // Copyright 2000-2021 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file. -package org.jetbrains.plugins.notebooks.jupyter.preview.viewOnly +package com.intellij.jupyter.viewOnly import com.intellij.openapi.fileEditor.FileEditor import com.intellij.openapi.fileEditor.FileEditorPolicy @@ -8,7 +8,7 @@ import com.intellij.openapi.fileTypes.FileTypeRegistry import com.intellij.openapi.project.DumbAware import com.intellij.openapi.project.Project import com.intellij.openapi.vfs.VirtualFile -import org.jetbrains.plugins.notebooks.jupyter.JupyterFileType +import com.intellij.jupyter.core.jupyter.JupyterFileType internal class JupyterViewOnlyProvider : FileEditorProvider, DumbAware { override fun accept(project: Project, file: VirtualFile): Boolean = FileTypeRegistry.getInstance().isFileOfType(file, JupyterFileType) diff --git a/platform/build-scripts/icons/src/org/jetbrains/intellij/build/images/IntellijIconClassGeneratorConfig.kt b/platform/build-scripts/icons/src/org/jetbrains/intellij/build/images/IntellijIconClassGeneratorConfig.kt index 8fef0efcf0bc..06b1fa703721 100644 --- a/platform/build-scripts/icons/src/org/jetbrains/intellij/build/images/IntellijIconClassGeneratorConfig.kt +++ b/platform/build-scripts/icons/src/org/jetbrains/intellij/build/images/IntellijIconClassGeneratorConfig.kt @@ -67,6 +67,11 @@ class IntellijIconClassGeneratorConfig : IconClasses() { iconDirectory = "icons/com/jetbrains/localization", ) + "intellij.jupyter.core"-> IntellijIconClassGeneratorModuleConfig( + className = "JupyterCoreIcons", + packageName = "com.intellij.jupyter.core.icons", + iconDirectory = "icons/org.jetbrains.plugins.notebooks.jupyter", + ) "intellij.spring.mvc.core" -> IntellijIconClassGeneratorModuleConfig( className = "SpringMvcApiIcons",