mirror of
https://gitflic.ru/project/openide/openide.git
synced 2026-09-27 10:03:11 +07:00
cleanup
This commit is contained in:
@@ -22,7 +22,6 @@ import com.intellij.openapi.actionSystem.AnAction;
|
||||
import com.intellij.openapi.actionSystem.AnActionEvent;
|
||||
import com.intellij.openapi.actionSystem.CommonDataKeys;
|
||||
import com.intellij.openapi.actionSystem.DataContext;
|
||||
import com.intellij.openapi.actionSystem.PlatformDataKeys;
|
||||
import com.intellij.openapi.project.DumbAware;
|
||||
import com.intellij.openapi.project.Project;
|
||||
import com.intellij.openapi.wm.IdeFocusManager;
|
||||
@@ -53,6 +52,7 @@ public class PyOpenDebugConsoleAction extends AnAction implements DumbAware {
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public void actionPerformed(final AnActionEvent e) {
|
||||
final Project project = e.getData(CommonDataKeys.PROJECT);
|
||||
if (project != null) {
|
||||
|
||||
@@ -63,7 +63,7 @@ public class PythonDebugLanguageConsoleView extends JPanel implements ConsoleVie
|
||||
|
||||
public PythonDebugLanguageConsoleView(final Project project, Sdk sdk, ConsoleView consoleView) {
|
||||
super(new CardLayout());
|
||||
myPydevConsoleView = createConsoleView(project, sdk);
|
||||
myPydevConsoleView = new PythonConsoleView(project, "Python Console", sdk);
|
||||
myTextConsole = consoleView;
|
||||
|
||||
add(myTextConsole.getComponent(), TEXT_CONSOLE_PANEL);
|
||||
@@ -85,10 +85,6 @@ public class PythonDebugLanguageConsoleView extends JPanel implements ConsoleVie
|
||||
getPydevConsoleView().executeCode(code, e);
|
||||
}
|
||||
|
||||
private static PythonConsoleView createConsoleView(Project project, Sdk sdk) {
|
||||
return new PythonConsoleView(project, "Python Console", sdk);
|
||||
}
|
||||
|
||||
private void doShowConsole(String type) {
|
||||
CardLayout cl = (CardLayout)(getLayout());
|
||||
cl.show(this, type);
|
||||
|
||||
@@ -40,7 +40,6 @@ import com.jetbrains.python.PythonHelpersLocator;
|
||||
import com.jetbrains.python.console.PythonConsoleView;
|
||||
import com.jetbrains.python.console.PythonDebugConsoleCommunication;
|
||||
import com.jetbrains.python.console.PythonDebugLanguageConsoleView;
|
||||
import com.jetbrains.python.console.pydev.ConsoleCommunication;
|
||||
import com.jetbrains.python.run.AbstractPythonRunConfiguration;
|
||||
import com.jetbrains.python.run.CommandLinePatcher;
|
||||
import com.jetbrains.python.run.PythonCommandLineState;
|
||||
@@ -123,19 +122,14 @@ public class PyDebugRunner extends GenericProgramRunner {
|
||||
@NotNull final ExecutionResult result,
|
||||
@NotNull PyDebugProcess debugProcess) {
|
||||
ExecutionConsole console = result.getExecutionConsole();
|
||||
ProcessHandler processHandler = result.getProcessHandler();
|
||||
|
||||
if (console instanceof PythonDebugLanguageConsoleView) {
|
||||
PythonConsoleView pythonConsoleView = ((PythonDebugLanguageConsoleView)console).getPydevConsoleView();
|
||||
pythonConsoleView.setConsoleCommunication(new PythonDebugConsoleCommunication(project, debugProcess));
|
||||
|
||||
|
||||
ConsoleCommunication consoleCommunication = new PythonDebugConsoleCommunication(project, debugProcess);
|
||||
pythonConsoleView.setConsoleCommunication(consoleCommunication);
|
||||
|
||||
ProcessHandler processHandler = result.getProcessHandler();
|
||||
PydevDebugConsoleExecuteActionHandler consoleExecuteActionHandler = new PydevDebugConsoleExecuteActionHandler(pythonConsoleView,
|
||||
processHandler,
|
||||
consoleCommunication);
|
||||
|
||||
new PythonDebugConsoleCommunication(project, debugProcess));
|
||||
pythonConsoleView.setExecutionHandler(consoleExecuteActionHandler);
|
||||
|
||||
debugProcess.getSession().addSessionListener(consoleExecuteActionHandler);
|
||||
|
||||
Reference in New Issue
Block a user