Package com.python.pydev.refactoring.actions

Examples of com.python.pydev.refactoring.actions.PyGoToDefinition


    public void checkCase1() throws CoreException {
        String mod1Contents = "from javamod1 import javamod2\njavamod2.JavaClass2";
        setFileContents(mod1Contents);

        PyGoToDefinition pyGoToDefinition = new PyGoToDefinition();
        pyGoToDefinition.setEditor(editor);
        editor.setSelection(mod1Contents.length() - 2, 0);
        editor.doSave(null); //update the caches
        ItemPointer[] itemPointers = pyGoToDefinition.findDefinitionsAndOpen(false);
        for (ItemPointer pointer : itemPointers) {
            System.out.println(pointer);
        }
        assertTrue(itemPointers.length >= 1);
    }
View Full Code Here


    /**
     * Try to find a definition and open it.
     */
    public void open() {
        PyGoToDefinition pyGoToDefinition = new PyGoToDefinition();
        pyGoToDefinition.setEditor(this.fEditor);
        pyGoToDefinition.run((IAction) null);
    }
View Full Code Here

TOP

Related Classes of com.python.pydev.refactoring.actions.PyGoToDefinition

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.