KTNB-235, PY-64586: Split intellij.python.jupyter.tables and intellij.python.pydev

GitOrigin-RevId: e417ef93a7ad78672df99631f3053fe36b8c681b
This commit is contained in:
Ilya Muradyan
2024-05-08 10:52:35 +03:00
committed by intellij-monorepo-bot
parent 04f715635a
commit 36ec2d65b0
22 changed files with 62 additions and 30 deletions

1
.idea/modules.xml generated
View File

@@ -909,6 +909,7 @@
<module fileurl="file://$PROJECT_DIR$/plugins/ml-local-models/intellij.ml.models.local.iml" filepath="$PROJECT_DIR$/plugins/ml-local-models/intellij.ml.models.local.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/ml-local-models/java/intellij.ml.models.local.java.iml" filepath="$PROJECT_DIR$/plugins/ml-local-models/java/intellij.ml.models.local.java.iml" />
<module fileurl="file://$PROJECT_DIR$/platform/built-in-server/client/node-rpc-client/intellij.nodeRpcClient.iml" filepath="$PROJECT_DIR$/platform/built-in-server/client/node-rpc-client/intellij.nodeRpcClient.iml" />
<module fileurl="file://$PROJECT_DIR$/notebooks/tables/intellij.notebooks.tables.iml" filepath="$PROJECT_DIR$/notebooks/tables/intellij.notebooks.tables.iml" />
<module fileurl="file://$PROJECT_DIR$/notebooks/notebook-ui/intellij.notebooks.ui.iml" filepath="$PROJECT_DIR$/notebooks/notebook-ui/intellij.notebooks.ui.iml" />
<module fileurl="file://$PROJECT_DIR$/notebooks/visualization/intellij.notebooks.visualization.iml" filepath="$PROJECT_DIR$/notebooks/visualization/intellij.notebooks.visualization.iml" />
<module fileurl="file://$PROJECT_DIR$/plugins/package-search/intellij.packageSearch.iml" filepath="$PROJECT_DIR$/plugins/package-search/intellij.packageSearch.iml" />

View File

@@ -10,6 +10,7 @@
<content>
<module name="intellij.notebooks.visualization"/>
<module name="intellij.notebooks.ui"/>
<module name="intellij.notebooks.tables"/>
<module name="intellij.xml.xmlbeans"/>
<module name="intellij.platform.ide.newUiOnboarding"/>
<module name="intellij.platform.ml.embeddings"/>

View File

@@ -185,6 +185,7 @@
<orderEntry type="module" module-name="intellij.toml" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.platform.tracing.ide" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.notebooks.visualization" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.notebooks.tables" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.keymap.eclipse" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.keymap.visualStudio" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.keymap.netbeans" scope="RUNTIME" />

View File

@@ -0,0 +1,13 @@
<?xml version="1.0" encoding="UTF-8"?>
<module type="JAVA_MODULE" version="4">
<component name="NewModuleRootManager" inherit-compiler-output="true">
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/resources" type="java-resource" />
<sourceFolder url="file://$MODULE_DIR$/src" isTestSource="false" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
<orderEntry type="library" name="kotlin-stdlib" level="project" />
</component>
</module>

View File

@@ -0,0 +1,2 @@
<idea-plugin package="com.intellij.notebooks.tables">
</idea-plugin>

View File

@@ -0,0 +1,5 @@
package com.intellij.notebooks.tables
enum class CommandOutputType {
STREAM, DISPLAY
}

View File

@@ -0,0 +1,3 @@
package com.intellij.notebooks.tables
interface TableCommandParameters

View File

@@ -0,0 +1,5 @@
package com.intellij.notebooks.tables
enum class TableCommandType {
DF_INFO, SLICE, DF_DESCRIBE
}

View File

@@ -95,7 +95,7 @@ class PluginClassLoader(
init {
var logStreamCandidate: Writer? = null
var debugFilePath = System.getProperty("plugin.classloader.debug", "")
var debugFilePath = System.getProperty("plugin.classloader.debug", "")
if (!debugFilePath.isEmpty()) {
try {
if (debugFilePath.startsWith("~/") || debugFilePath.startsWith("~\\")) {

View File

@@ -6,6 +6,7 @@
<content>
<module name="intellij.notebooks.visualization"/>
<module name="intellij.notebooks.ui"/>
<module name="intellij.notebooks.tables"/>
<module name="intellij.platform.ide.newUiOnboarding"/>
<module name="intellij.platform.ml.embeddings"/>
<module name="intellij.ide.startup.importSettings"/>

View File

@@ -148,5 +148,6 @@
<orderEntry type="module" module-name="intellij.commandInterface" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.python.community.impl.huggingFace" scope="RUNTIME" />
<orderEntry type="module" module-name="intellij.python.syntax" />
<orderEntry type="module" module-name="intellij.notebooks.tables" />
</component>
</module>

View File

@@ -20,5 +20,6 @@
<orderEntry type="module" module-name="intellij.platform.ide.util.io" />
<orderEntry type="module" module-name="intellij.platform.debugger.impl" />
<orderEntry type="module" module-name="intellij.python.syntax.core" />
<orderEntry type="module" module-name="intellij.notebooks.tables" />
</component>
</module>

View File

@@ -10,12 +10,12 @@ import com.intellij.xdebugger.frame.XStackFrame;
import com.intellij.xdebugger.frame.XValueChildrenList;
import com.jetbrains.python.debugger.pydev.ProcessDebugger;
import com.jetbrains.python.debugger.pydev.PyDebugCallback;
import com.jetbrains.python.debugger.pydev.TableCommandType;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandBuilder;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandResult;
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.notebooks.tables.TableCommandParameters;
import com.intellij.notebooks.tables.TableCommandType;
import java.util.List;

View File

@@ -14,9 +14,10 @@ import com.jetbrains.python.console.pydev.PydevCompletionVariant;
import com.jetbrains.python.debugger.*;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandBuilder;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandResult;
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.notebooks.tables.TableCommandParameters;
import com.intellij.notebooks.tables.TableCommandType;
import java.io.IOException;
import java.util.*;
@@ -112,7 +113,7 @@ public class ClientModeMultiProcessDebugger implements ProcessDebugger {
@Override
public boolean isConnected() {
return allDebuggers().stream().anyMatch(RemoteDebugger::isConnected);
return ContainerUtil.exists(allDebuggers(), RemoteDebugger::isConnected);
}
@Override

View File

@@ -16,9 +16,10 @@ import com.jetbrains.python.console.pydev.PydevCompletionVariant;
import com.jetbrains.python.debugger.*;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandBuilder;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandResult;
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.notebooks.tables.TableCommandParameters;
import com.intellij.notebooks.tables.TableCommandType;
import java.io.IOException;
import java.io.PrintWriter;

View File

@@ -10,9 +10,10 @@ import com.jetbrains.python.console.pydev.PydevCompletionVariant;
import com.jetbrains.python.debugger.*;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandBuilder;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandResult;
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.notebooks.tables.TableCommandParameters;
import com.intellij.notebooks.tables.TableCommandType;
import java.util.Collection;
import java.util.List;

View File

@@ -23,12 +23,13 @@ import com.jetbrains.python.debugger.*;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommand;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandBuilder;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandResult;
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters;
import com.jetbrains.python.debugger.pydev.transport.ClientModeDebuggerTransport;
import com.jetbrains.python.debugger.pydev.transport.DebuggerTransport;
import com.jetbrains.python.debugger.pydev.transport.ServerModeDebuggerTransport;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.notebooks.tables.TableCommandParameters;
import com.intellij.notebooks.tables.TableCommandType;
import java.net.ServerSocket;
import java.security.SecureRandom;

View File

@@ -3,7 +3,8 @@ package com.jetbrains.python.debugger.pydev
import com.intellij.util.asSafely
import com.jetbrains.python.debugger.pydev.tables.PyDevCommandParameters
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters
import com.intellij.notebooks.tables.TableCommandParameters
import com.intellij.notebooks.tables.TableCommandType
class TableCommand(debugger: RemoteDebugger?,
threadId: String?,
@@ -11,9 +12,9 @@ class TableCommand(debugger: RemoteDebugger?,
private val initExpr: String,
private val commandType: TableCommandType,
private val tableCommandParameters: TableCommandParameters?) : AbstractFrameCommand<String?>(debugger,
CMD_TABLE_EXEC,
threadId,
frameId) {
CMD_TABLE_EXEC,
threadId,
frameId) {
var commandResult: String? = null
override fun buildPayload(payload: Payload) {
@@ -34,7 +35,3 @@ class TableCommand(debugger: RemoteDebugger?,
commandResult = response.payload
}
}
enum class TableCommandType {
DF_INFO, SLICE, DF_DESCRIBE
}

View File

@@ -0,0 +1,6 @@
// Copyright 2000-2024 JetBrains s.r.o. and contributors. Use of this source code is governed by the Apache 2.0 license.
package com.jetbrains.python.debugger.pydev.tables
import com.intellij.notebooks.tables.TableCommandParameters
class PyDevCommandParameters(val start: Int, val end: Int) : TableCommandParameters

View File

@@ -1,10 +0,0 @@
// Copyright 2000-2021 JetBrains s.r.o. Use of this source code is governed by the Apache 2.0 license that can be found in the LICENSE file.
package com.jetbrains.python.debugger.pydev.tables
enum class CommandOutputType {
STREAM, DISPLAY
}
interface TableCommandParameters {}
class PyDevCommandParameters(val start: Int, val end: Int) : TableCommandParameters

View File

@@ -32,11 +32,9 @@ import com.jetbrains.python.debugger.containerview.PyViewNumericContainerAction;
import com.jetbrains.python.debugger.pydev.GetVariableCommand;
import com.jetbrains.python.debugger.pydev.ProcessDebugger;
import com.jetbrains.python.debugger.pydev.SetUserTypeRenderersCommand;
import com.jetbrains.python.debugger.pydev.TableCommandType;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandBuilder;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandResult;
import com.jetbrains.python.debugger.pydev.tables.PyDevCommandParameters;
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters;
import com.jetbrains.python.debugger.settings.PyDebuggerSettings;
import com.jetbrains.python.debugger.variablesview.usertyperenderers.ConfigureTypeRenderersHyperLink;
import com.jetbrains.python.debugger.variablesview.usertyperenderers.PyUserNodeRenderer;
@@ -48,6 +46,8 @@ import org.apache.thrift.TException;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import org.jetbrains.annotations.TestOnly;
import com.intellij.notebooks.tables.TableCommandParameters;
import com.intellij.notebooks.tables.TableCommandType;
import java.util.ArrayList;
import java.util.Collections;
@@ -946,7 +946,7 @@ public abstract class PydevConsoleCommunication extends AbstractConsoleCommunica
}
@Override
public void sendRichOutput(Map<String, String> data) throws TException {
public void sendRichOutput(Map<String, String> data) {
if (myConsoleView == null) return;
if (data.isEmpty()) return;
PyConsoleOutputCustomizer.Companion.getInstance().showRichOutput(myConsoleView, data);

View File

@@ -60,7 +60,6 @@ import com.jetbrains.python.debugger.containerview.PyViewNumericContainerAction;
import com.jetbrains.python.debugger.pydev.*;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandBuilder;
import com.jetbrains.python.debugger.pydev.dataviewer.DataViewerCommandResult;
import com.jetbrains.python.debugger.pydev.tables.TableCommandParameters;
import com.jetbrains.python.debugger.settings.PyDebuggerSettings;
import com.jetbrains.python.debugger.smartstepinto.PySmartStepIntoContext;
import com.jetbrains.python.debugger.smartstepinto.PySmartStepIntoHandler;
@@ -77,6 +76,8 @@ import com.jetbrains.python.testing.AbstractPythonTestRunConfiguration;
import org.jetbrains.annotations.Nls;
import org.jetbrains.annotations.NotNull;
import org.jetbrains.annotations.Nullable;
import com.intellij.notebooks.tables.TableCommandParameters;
import com.intellij.notebooks.tables.TableCommandType;
import java.io.IOException;
import java.net.ServerSocket;