Package org.python.pydev.core

Examples of org.python.pydev.core.IInterpreterInfo


                };
            };
            contentAssist.setInformationControlCreator(PyContentAssistant.createInformationControlCreator(viewer));
            ILaunch launch = process.getLaunch();
            IDebugTarget debugTarget = launch.getDebugTarget();
            IInterpreterInfo projectInterpreter = null;
            if (debugTarget instanceof PyDebugTarget) {
                PyDebugTarget pyDebugTarget = (PyDebugTarget) debugTarget;
                PythonNature nature = PythonNature.getPythonNature(pyDebugTarget.project);
                if (nature != null) {
                    try {
View Full Code Here


                            }

                        }
                    } else if (additionalInfo instanceof AdditionalSystemInterpreterInfo) {
                        AdditionalSystemInterpreterInfo systemInterpreterInfo = (AdditionalSystemInterpreterInfo) additionalInfo;
                        IInterpreterInfo defaultInterpreterInfo = systemInterpreterInfo.getManager()
                                .getDefaultInterpreterInfo(false);
                        modulesManager = defaultInterpreterInfo.getModulesManager();
                    }
                } catch (Throwable e) {
                    Log.log(e);
                }
View Full Code Here

    }

    public static void recreateAllInfo(IInterpreterManager manager, String interpreter, IProgressMonitor monitor) {
        synchronized (additionalSystemInfoLock) {
            try {
                final IInterpreterInfo interpreterInfo = manager.getInterpreterInfo(interpreter, monitor);
                int grammarVersion = interpreterInfo.getGrammarVersion();
                AbstractAdditionalTokensInfo currInfo = AdditionalSystemInterpreterInfo.getAdditionalSystemInfo(
                        manager, interpreter);
                if (currInfo != null) {
                    currInfo.clearAllInfo();
                }
View Full Code Here

                //project (or vice-versa), so, we must get the interpreter from the interpreter manager!
                return interpreterManager.getDefaultInterpreterInfo(true);
            }

        } else {
            IInterpreterInfo interpreterInfo = interpreterManager.getInterpreterInfo(location, null);
            if (interpreterInfo != null) {
                return interpreterInfo;
            } else {
                File file = new File(location);
                if (!file.exists()) {
View Full Code Here

        PythonNature pythonNature = PythonNature.getPythonNature(p);
        if (pythonNature == null) {
            throw new CoreException(PydevDebugPlugin.makeStatus(IStatus.ERROR, "Project should have a python nature: "
                    + p.getName(), null));
        }
        IInterpreterInfo l = getInterpreterLocation(conf, pythonNature, manager);
        return SimpleRunner.makePythonPathEnvString(pythonNature, l, manager);
    }
View Full Code Here

    public void clearBuiltinMod() {
        this.manager.clearBuiltinMod(this.info.getName());
    }

    public int getGrammarVersion() throws MisconfigurationException {
        IInterpreterInfo info = this.info;
        if (info != null) {
            return info.getGrammarVersion();
        } else {
            return IPythonNature.LATEST_GRAMMAR_VERSION;
        }
    }
View Full Code Here

     * @throws MisconfigurationException
     */
    public static String[] createEnvWithPythonpath(String pythonPathEnvStr, String interpreter,
            IInterpreterManager manager, IPythonNature nature) throws CoreException, MisconfigurationException {
        String[] env = createEnvWithPythonpath(pythonPathEnvStr, nature, manager);
        IInterpreterInfo info = manager.getInterpreterInfo(interpreter, new NullProgressMonitor());
        env = info.updateEnv(env);
        return env;
    }
View Full Code Here

            throw new PythonNatureWithoutProjectException("Project is not set.");
        }

        try {
            String projectInterpreterName = getProjectInterpreterName();
            IInterpreterInfo ret;
            IInterpreterManager relatedInterpreterManager = getRelatedInterpreterManager();
            if (relatedInterpreterManager == null) {
                if (IN_TESTS) {
                    return null;
                }
View Full Code Here

        }
        ArrayList<ProjectConfigError> lst = new ArrayList<ProjectConfigError>();
        if (this.project == null) {
            lst.add(new ProjectConfigError(relatedToProject, "The configured nature has no associated project."));
        }
        IInterpreterInfo info = null;
        try {
            info = this.getProjectInterpreter();

            String executableOrJar = info.getExecutableOrJar();
            if (!new File(executableOrJar).exists()) {
                lst.add(new ProjectConfigError(relatedToProject,
                        "The interpreter configured does not exist in the filesystem: " + executableOrJar));
            }
View Full Code Here

    public IInterpreterInfo[] getExesList() {
        TreeItem[] items = treeWithInterpreters.getItems();
        ArrayList<IInterpreterInfo> infos = new ArrayList<IInterpreterInfo>();
        for (TreeItem exe : items) {
            IInterpreterInfo info = this.nameToInfo.get(getNameFromTreeItem(exe));
            if (info == null) {
                Log.log("Didn't expect interpreter info to be null in the memory: " + exe);
            } else {
                infos.add(info);
            }
View Full Code Here

TOP

Related Classes of org.python.pydev.core.IInterpreterInfo

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.