Package org.python.pydev.debug.newconsole

Examples of org.python.pydev.debug.newconsole.PydevConsoleFactory


        // We need to cancel this automatic recreation because we are launching from scratch again
        monitor.setCanceled(true);
        Display.getDefault().asyncExec(new Runnable() {

            public void run() {
                PydevConsoleFactory pydevConsoleFactory = new PydevConsoleFactory();
                pydevConsoleFactory.openConsole();
            }
        });
    }
View Full Code Here


                    return;
                }
            }

            List<IPythonNature> natures = Collections.singletonList((IPythonNature) nature);
            PydevConsoleFactory consoleFactory = new PydevConsoleFactory();
            PydevConsoleLaunchInfo launchInfo = new PydevIProcessFactory().createLaunch(
                    nature.getRelatedInterpreterManager(),
                    nature.getProjectInterpreter(),
                    nature.getPythonPathNature().getCompleteProjectPythonPath(nature.getProjectInterpreter(),
                            nature.getRelatedInterpreterManager()), nature, natures);

            PydevConsoleInterpreter interpreter = PydevConsoleFactory.createPydevInterpreter(launchInfo, natures);

            String importStr = "";//"from " + selectedProject.getName() + " import settings;";
            importStr = "import " + settingsModule + " as settings;";

            consoleFactory.createConsole(interpreter, "\nfrom django.core import management;" + importStr
                    + "management.setup_environ(settings)\n");

        } catch (Exception e) {
            throw new RuntimeException(e);
        }
View Full Code Here

                ScriptConsole console = getActiveScriptConsole(PydevConsoleConstants.CONSOLE_TYPE);

                if (console == null) {
                    //if no console is available, create it (if possible).
                    PydevConsoleFactory factory = new PydevConsoleFactory();
                    String cmd = null;

                    //Check if the current selection should be sent to the editor.
                    if (InteractiveConsolePrefs.getSendCommandOnCreationFromEditor()) {
                        cmd = getCommandToSend(edit, selection);
                        if (cmd != null) {
                            cmd = "\n" + cmd;
                        }
                    }
                    factory.createConsole(cmd);

                } else {
                    if (console instanceof PydevConsole) {
                        //ok, console available
                        sendCommandToConsole(selection, console, this.edit);
View Full Code Here

TOP

Related Classes of org.python.pydev.debug.newconsole.PydevConsoleFactory

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.