Package org.python.pydev.core

Examples of org.python.pydev.core.ICompletionState


                + "                                              \n"
                + "TestCase.                                     \n";

        IToken[] comps = null;
        Document doc = new Document(sDoc);
        ICompletionState state = new CompletionState(line, col, token, nature, "");
        comps = getComps(doc, state);
        assertTrue(comps.length > 5);
        ASTManagerTest.assertIsIn("assertEquals", comps);
        ASTManagerTest.assertIsIn("assertNotEquals", comps);
        ASTManagerTest.assertIsIn("assertAlmostEquals", comps);
View Full Code Here


        sDoc = "" + "from testlib.unittest import GUITest  \n" + "                                      \n"
                + "GUITest.                              \n";

        IToken[] comps = null;
        Document doc = new Document(sDoc);
        ICompletionState state = new CompletionState(line, col, token, nature, "");
        comps = getComps(doc, state);
        ASTManagerTest.assertIsIn("SetWidget", comps);
        ASTManagerTest.assertIsIn("assertEquals", comps);
        ASTManagerTest.assertIsIn("assertNotEquals", comps);
        ASTManagerTest.assertIsIn("assertAlmostEquals", comps);
View Full Code Here

        sDoc = "" + "from testlib.unittest import AnotherTest  \n" + "                                          \n"
                + "AnotherTest.                              \n";

        IToken[] comps = null;
        Document doc = new Document(sDoc);
        ICompletionState state = new CompletionState(line, col, token, nature, "");
        comps = getComps(doc, state);
        assertTrue(comps.length > 5);
        ASTManagerTest.assertIsIn("assertEquals", comps);
        ASTManagerTest.assertIsIn("assertNotEquals", comps);
        ASTManagerTest.assertIsIn("assertAlmostEquals", comps);
View Full Code Here

        sDoc = "" + "from testlib import unittest as t \n" + "                                  \n"
                + "t.                                \n";

        IToken[] comps = null;
        Document doc = new Document(sDoc);
        ICompletionState state = new CompletionState(line, col, token, nature, "");
        comps = getComps(doc, state);
        assertEquals(13, comps.length);

        ASTManagerTest.assertIsIn("__name__", comps);
        ASTManagerTest.assertIsIn("__file__", comps);
View Full Code Here

                + "                                              \n"
                + "t.                                            \n";

        IToken[] comps = null;
        Document doc = new Document(sDoc);
        ICompletionState state = new CompletionState(line, col, token, nature, "");
        comps = getComps(doc, state);
        assertTrue(comps.length > 5);
        ASTManagerTest.assertIsIn("assertEquals", comps);
        ASTManagerTest.assertIsIn("assertNotEquals", comps);
        ASTManagerTest.assertIsIn("assertAlmostEquals", comps);
View Full Code Here

                + "                                                            \n"
                + "Derived.                                                    \n";

        IToken[] comps = null;
        Document doc = new Document(sDoc);
        ICompletionState state = new CompletionState(line, col, token, nature, "");
        comps = getComps(doc, state);
        ASTManagerTest.assertIsIn("test1", comps);
        ASTManagerTest.assertIsIn("test2", comps);
        assertEquals(2, comps.length);
View Full Code Here

                "        self.m1." +
                "";

        SystemPythonNature nature = new SystemPythonNature(PyCodeCompletion2Test.nature.getRelatedInterpreterManager());
        PySelection ps = new PySelection(new Document(s), s.length() - 1);
        ICompletionState state = new CompletionState(ps.getStartLineIndex(), ps.getAbsoluteCursorOffset()
                - ps.getStartLine().getOffset(), null, nature, "");
        CompletionRequest request = new CompletionRequest(null, nature, ps.getDoc(), "self.m1",
                ps.getAbsoluteCursorOffset(), 0, new PyCodeCompletion(), "");
        List<IToken> selfCompletions = new ArrayList<IToken>();
        PyCodeCompletion.getSelfOrClsCompletions(request, selfCompletions, state, false, false, "self.m1");
View Full Code Here

    public void testRecursion() throws FileNotFoundException, Exception, CompletionRecursionException {
        String file = TestDependent.TEST_PYSRC_LOC +
                "testrec3/rec.py";
        String strDoc = "RuntimeError.";
        File f = new File(file);
        ICompletionState state = CompletionStateFactory.getEmptyCompletionState("RuntimeError", nature,
                new CompletionCache());
        IModule module = AbstractASTManager.createModule(f, new Document(FileUtils.getFileContents(f)), nature);
        try {
            nature.getAstManager().getCompletionsForModule(module, state, true, true);
        } catch (CompletionRecursionException e) {
View Full Code Here

TOP

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

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.