Package org.python.pydev.refactoring.ast

Examples of org.python.pydev.refactoring.ast.PythonModuleManager


        initInfo(selection);
    }

    private void initInfo(ITextSelection selection) {
        if (this.nature != null) {
            this.moduleManager = new PythonModuleManager(nature);
        }

        try {
            this.moduleAdapter = VisitorFactory.createModuleAdapter(moduleManager, realFile, doc, nature,
                    this.versionProvider);
View Full Code Here


    /**
     * @param version IPythonNature.PYTHON_VERSION_XXX
     */
    protected ModuleAdapter createModuleAdapterFromDataSource(String version) throws Throwable {
        codeCompletionTestsBase.restorePythonPath(FileUtils.getFileAbsolutePath(data.file.getParentFile()), true);
        PythonModuleManager pythonModuleManager = new PythonModuleManager(CodeCompletionTestsBase.nature);
        if (version != null) {
            //As the files will be found in the system, we need to set the system modules manager info.
            IModulesManager modulesManager = pythonModuleManager.getIModuleManager();
            SystemModulesManager systemModulesManager = (SystemModulesManager) modulesManager.getSystemModulesManager();
            systemModulesManager.setInfo(new InterpreterInfo(version, "", new ArrayList<String>()));

            CodeCompletionTestsBase.nature.setVersion(version, null);
        }
View Full Code Here

        AbstractShell.putServerShell(nature, AbstractShell.COMPLETION_SHELL, null);
    }

    public void testHierarchyWithBuiltins() throws Throwable {

        ModuleAdapter module = VisitorFactory.createModuleAdapter(new PythonModuleManager(nature), file, new Document(
                FileUtils.getFileContents(file)), nature, nature);

        List<IClassDefAdapter> classes = module.getClasses();
        assertEquals(1, classes.size());
        List<IClassDefAdapter> baseClasses = classes.get(0).getBaseClasses();
View Full Code Here

TOP

Related Classes of org.python.pydev.refactoring.ast.PythonModuleManager

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.