Package org.python.pydev.core

Examples of org.python.pydev.core.ICompletionCache


                        PythonNature nature = PythonNature.getPythonNature(project);
                        String moduleName = nature.resolveModule(file);
                        if (moduleName != null) {
                            IModule mod = nature.getAstManager().getModule(moduleName, nature, true);
                            if (mod != null) {
                                ICompletionCache completionCache = new CompletionCache();
                                IDefinition[] definitions = mod.findDefinition(CompletionStateFactory
                                        .getEmptyCompletionState(testPath, nature, completionCache), -1, -1, nature);

                                if (definitions != null && definitions.length > 0) {
                                    List<ItemPointer> pointers = new ArrayList<ItemPointer>();
View Full Code Here


                "        for c in remove_chars:\n"
                +
                "            printed = printed.replace(c, '')\n" +
                "";
        IModule mod = SourceModule.createModuleFromDoc(null, new Document(str), nature);
        ICompletionCache completionCache = new CompletionCache();
        ArrayList<IDefinition> selected = new ArrayList<IDefinition>();
        PyRefactoringFindDefinition.findActualDefinition(null, mod, "printed.replace", selected, 8, 32, nature,
                completionCache);
        assertEquals(0, selected.size());
    }
View Full Code Here

                "        mantissa, _exponent_str = exp_format.split('e')\n"
                +
                "        mantissa = mantissa.strip().rjust(exp_format_digits + 3)\n" +
                "";
        IModule mod = SourceModule.createModuleFromDoc(null, new Document(str), nature);
        ICompletionCache completionCache = new CompletionCache();
        ArrayList<IDefinition> selected = new ArrayList<IDefinition>();
        PyRefactoringFindDefinition.findActualDefinition(null, mod, "mantissa.strip", selected, 6, 20, nature,
                completionCache);
        assertEquals(0, selected.size());
    }
View Full Code Here

                +
                "        return result\n" +
                "\n" +
                "";
        IModule mod = SourceModule.createModuleFromDoc(null, new Document(str), nature);
        ICompletionCache completionCache = new CompletionCache();
        ArrayList<IDefinition> selected = new ArrayList<IDefinition>();
        PyRefactoringFindDefinition.findActualDefinition(null, mod, "parent.find", selected, 10, 33, nature,
                completionCache);
        assertEquals(0, selected.size());
    }
View Full Code Here

TOP

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

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.