Examples of PythonCodeReader


Examples of org.python.pydev.core.docutils.PythonCodeReader

        assertEquals('h', (char) reader.read());
        assertEquals(PythonCodeReader.EOF, reader.read());
    }

    public void testForwardLiteral() throws Exception {
        reader = new PythonCodeReader();
        doc = new Document("fe\n'too'\nh");
        reader.configureForwardReader(doc, 0, doc.getLength(), true, true, true);
        assertEquals('f', (char) reader.read());
        assertEquals('e', (char) reader.read());
        assertEquals('\n', (char) reader.read());
View Full Code Here

Examples of org.python.pydev.core.docutils.PythonCodeReader

        assertEquals('h', (char) reader.read());
        assertEquals(PythonCodeReader.EOF, reader.read());
    }

    public void testForwardLiteral2() throws Exception {
        reader = new PythonCodeReader();
        doc = new Document("fe\n'''too'''\nh");
        reader.configureForwardReader(doc, 0, doc.getLength(), true, true, true);
        assertEquals('f', (char) reader.read());
        assertEquals('e', (char) reader.read());
        assertEquals('\n', (char) reader.read());
View Full Code Here

Examples of org.python.pydev.core.docutils.PythonCodeReader

        assertEquals('h', (char) reader.read());
        assertEquals(PythonCodeReader.EOF, reader.read());
    }

    public void testForwardCurrentStatement() throws Exception {
        reader = new PythonCodeReader();
        doc = new Document("a = 10\n" +
                "def m1(self): pass");
        reader.configureForwardReader(doc, 0, doc.getLength(), true, true, true);
        FastStringBuffer buf = new FastStringBuffer();
        int c;
View Full Code Here

Examples of org.python.pydev.core.docutils.PythonCodeReader

        }
        assertEquals("a = 10\n", buf.toString());
    }

    public void testBackwardCurrentStatement() throws Exception {
        reader = new PythonCodeReader();
        doc = new Document("a = 10\n" +
                "def m1(self):\n" +
                "   a = 10");
        reader.configureBackwardReader(doc, doc.getLength(), true, true, true);
        FastStringBuffer buf = new FastStringBuffer();
View Full Code Here

Examples of org.python.pydev.core.docutils.PythonCodeReader

        buf.reverse();
        assertEquals(" m1(self):\n   a = 10", buf.toString());
    }

    public void testBackwardCurrentStatement2() throws Exception {
        reader = new PythonCodeReader();
        doc = new Document("" +
                "titleEnd = ('''\n" +
                "            [#''')" + //should wrap to the start
                "");
        reader.configureBackwardReader(doc, doc.getLength(), true, true, true);
View Full Code Here

Examples of org.python.pydev.core.docutils.PythonCodeReader

        buf.reverse();
        assertEquals("titleEnd = ()", buf.toString());
    }

    public void testBackwardCurrentStatement3() throws Exception {
        reader = new PythonCodeReader();
        doc = new Document("" +
                "titleEnd = ('''\n" +
                "# inside string" +
                "            [#''') #actual" + //should wrap to the start
                "");
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.