Examples of ISystemModulesManager


Examples of org.python.pydev.core.ISystemModulesManager

                if (currInfo != null) {
                    currInfo.clearAllInfo();
                }
                InterpreterInfo defaultInterpreterInfo = (InterpreterInfo) manager.getInterpreterInfo(interpreter,
                        monitor);
                ISystemModulesManager m = defaultInterpreterInfo.getModulesManager();
                AbstractAdditionalTokensInfo info = restoreInfoForModuleManager(monitor, m,
                        "(system: " + manager.getManagerRelatedName() + " - " + interpreter + ")",
                        new AdditionalSystemInterpreterInfo(manager, interpreter), null, grammarVersion);

                if (info != null) {
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

        Iterator<String> forcedLibsIterator = this.interpreterInfo.forcedLibsIterator();
        while (forcedLibsIterator.hasNext()) {
            addChild(new ForcedLibGroup(this, this.interpreterInfo, forcedLibsIterator.next()));
        }

        ISystemModulesManager modulesManager = this.interpreterInfo.getModulesManager();
        Set<String> allModuleNames = modulesManager.getAllModuleNames(false, "");
        for (String moduleName : allModuleNames) {
            addChild(new LeafElement(this, moduleName));
        }
    }
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

    }

    public InterpreterInfo(String version, String exe, Collection<String> libs0) {
        this.executableOrJar = exe;
        this.version = version;
        ISystemModulesManager modulesManager = new SystemModulesManager(this);

        this.modulesManager = modulesManager;
        libs.addAll(libs0);
    }
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

            return mod;
        }

        try {
            InterpreterInfo interpreterInfo = this.getInterpreterInfo(projectInterpreterName, null);
            ISystemModulesManager modulesManager = interpreterInfo.getModulesManager();

            mod = modulesManager.getBuiltinModule("__builtin__", false);
            if (mod == null) {
                //Python 3.0 has builtins and not __builtin__
                mod = modulesManager.getBuiltinModule("builtins", false);
            }
            if (mod != null) {
                builtinMod.put(projectInterpreterName, mod);
            }
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

                //This method persists all the modules managers that are within this interpreter manager
                //(so, all the SystemModulesManagers will be saved -- and can be later restored).

                for (InterpreterInfo info : this.exeToInfo.values()) {
                    try {
                        ISystemModulesManager modulesManager = info.getModulesManager();
                        Object pythonPathHelper = modulesManager.getPythonPathHelper();
                        if (!(pythonPathHelper instanceof PythonPathHelper)) {
                            continue;
                        }
                        PythonPathHelper pathHelper = (PythonPathHelper) pythonPathHelper;
                        List<String> pythonpath = pathHelper.getPythonpath();
                        if (pythonpath == null || pythonpath.size() == 0) {
                            continue;
                        }
                        modulesManager.save();
                    } catch (Throwable e) {
                        Log.log(e);
                    }
                }
            }
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

            if (m instanceof IProjectModulesManager) {
                IProjectModulesManager pM = (IProjectModulesManager) m;
                module = pM.getModuleInDirectManager(name, nature, dontSearchInit);

            } else if (m instanceof ISystemModulesManager) {
                ISystemModulesManager systemModulesManager = (ISystemModulesManager) m;
                module = systemModulesManager.getModuleWithoutBuiltins(name, nature, dontSearchInit);

            } else {
                throw new RuntimeException("Unexpected: " + m);
            }
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

    /**
     * @see org.python.pydev.core.IProjectModulesManager#getBuiltins()
     */
    public String[] getBuiltins() {
        String[] builtins = null;
        ISystemModulesManager systemModulesManager = getSystemModulesManager();
        if (systemModulesManager != null) {
            builtins = systemModulesManager.getBuiltins();
        }
        return builtins;
    }
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

            if (ret != null) {
                return ret;
            }
        }
        ArrayList<IModulesManager> list = new ArrayList<IModulesManager>();
        ISystemModulesManager systemModulesManager = getSystemModulesManager();

        //add itself 1st
        list.add(this);

        //get the projects 1st
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

    public List<String> getCompletePythonPath(IInterpreterInfo interpreter, IInterpreterManager manager) {
        List<String> l = new ArrayList<String>();
        IModulesManager[] managersInvolved = getManagersInvolved(true);
        for (IModulesManager m : managersInvolved) {
            if (m instanceof ISystemModulesManager) {
                ISystemModulesManager systemModulesManager = (ISystemModulesManager) m;
                l.addAll(systemModulesManager.getCompletePythonPath(interpreter, manager));

            } else {
                PythonPathHelper h = (PythonPathHelper) m.getPythonPathHelper();
                if (h != null) {
                    List<String> pythonpath = h.getPythonpath();
View Full Code Here

Examples of org.python.pydev.core.ISystemModulesManager

                            + "(Because it was found as a compiled extension).", found.importInfo.mod.getName()));
                    return;
                }

                //nor be a system module
                ISystemModulesManager systemModulesManager = request.nature.getAstManager().getModulesManager()
                        .getSystemModulesManager();
                IModule systemModule = systemModulesManager.getModule(found.importInfo.mod.getName(), request.nature,
                        true);
                if (systemModule != null) {
                    status.addFatalError(com.aptana.shared_core.string.StringUtils.format("Error. The module '%s' may not be renamed\n"
                            + "Only project modules may be renamed\n" + "(and it was found as being a system module).",
                            found.importInfo.mod.getName()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.