Package org.python.pydev.ui.interpreters

Examples of org.python.pydev.ui.interpreters.PythonInterpreterManager


        //setPythonInterpreterManager(new StubInterpreterManager(true));
        //setJythonInterpreterManager(new StubInterpreterManager(false));

        //changed: the interpreter manager is always set in the initialization (initialization
        //has some problems if that's not done).
        setPythonInterpreterManager(new PythonInterpreterManager(preferences));
        setJythonInterpreterManager(new JythonInterpreterManager(preferences));
        setIronpythonInterpreterManager(new IronpythonInterpreterManager(preferences));

        handlePing();
View Full Code Here


    /**
     * Sets the interpreter manager we should use
     * @param path
     */
    protected void setInterpreterManager(String path) {
        PythonInterpreterManager interpreterManager = new PythonInterpreterManager(this.getPreferences());

        InterpreterInfo info;
        info = (InterpreterInfo) interpreterManager.createInterpreterInfo(TestDependent.PYTHON_EXE,
                new NullProgressMonitor(), false);
        TestDependent.PYTHON_EXE = info.executableOrJar;
        if (path != null) {
            info = new InterpreterInfo(info.getVersion(), info.executableOrJar,
                    PythonPathHelper.parsePythonPathFromStr(path, new ArrayList<String>()));
        }

        interpreterManager.setInfos(new IInterpreterInfo[] { info }, null, null);
        PydevPlugin.setPythonInterpreterManager(interpreterManager);
    }
View Full Code Here

                    return Boolean.TRUE;
                }
            };
            PydevPlugin.setJythonInterpreterManager(new JythonInterpreterManager(PydevPlugin.getDefault()
                    .getPreferenceStore()));
            PydevPlugin.setPythonInterpreterManager(new PythonInterpreterManager(PydevPlugin.getDefault()
                    .getPreferenceStore()));

            ProjectModulesManager.IN_TESTS = true;

            NullProgressMonitor monitor = new NullProgressMonitor();
View Full Code Here

        pythonpath.add(libDir.toString());

        final InterpreterInfo info = new InterpreterInfo("2.6", TestDependent.PYTHON_EXE, pythonpath);

        IPreferenceStore preferences = new PreferenceStore();
        final PythonInterpreterManager manager = new PythonInterpreterManager(preferences);
        PydevPlugin.setPythonInterpreterManager(manager);
        manager.setInfos(new IInterpreterInfo[] { info }, new HashSet<String>(), null);

        final AdditionalSystemInterpreterInfo additionalInfo = new AdditionalSystemInterpreterInfo(manager,
                info.getExecutableOrJar());
        AdditionalSystemInterpreterInfo.setAdditionalSystemInfo(manager, info.getExecutableOrJar(), additionalInfo);

        //Don't load it (otherwise it'll get the 'proper' info).
        //AdditionalSystemInterpreterInfo.loadAdditionalSystemInfo(manager, info.getExecutableOrJar());

        final ISystemModulesManager modulesManager = info.getModulesManager();
        assertEquals(0, modulesManager.getSize(false));
        assertEquals(0, additionalInfo.getAllTokens().size());

        InterpreterInfoBuilder builder = new InterpreterInfoBuilder();
        builder.setInfo(info, 0);

        waitUntilCondition(new ICallback<String, Object>() {

            public String call(Object arg) {
                int size = modulesManager.getSize(false);
                if (size == 3) {
                    return null;
                }
                return "Expected size = 3, found: " + size;
            }
        });

        waitUntilCondition(new ICallback<String, Object>() {

            public String call(Object arg) {
                try {
                    AbstractAdditionalDependencyInfo additionalSystemInfo = AdditionalSystemInterpreterInfo
                            .getAdditionalSystemInfo(manager, manager.getInterpreterInfos()[0].getExecutableOrJar(),
                                    true);
                    if (additionalInfo != additionalSystemInfo) {
                        throw new RuntimeException("Expecting it to be the same instance.");
                    }
                } catch (MisconfigurationException e) {
View Full Code Here

TOP

Related Classes of org.python.pydev.ui.interpreters.PythonInterpreterManager

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.