Examples of PyImportsHandling


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

                }

                if (groupImports) {
                    try {
                        realImportHandleInfo = new ImportHandleInfo(realImportRep);
                        PyImportsHandling importsHandling = new PyImportsHandling(document);
                        for (ImportHandle handle : importsHandling) {
                            if (handle.contains(realImportHandleInfo)) {
                                lineToAddImport = -2; //signal that there's no need to find a line available to add the import
                                break;
View Full Code Here

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

     * @param endLineDelim
     */
    public static void performArrangeImports(IDocument doc, String endLineDelim, String indentStr) {
        List<Tuple3<Integer, String, ImportHandle>> list = new ArrayList<Tuple3<Integer, String, ImportHandle>>();
        //Gather imports in a structure we can work on.
        PyImportsHandling pyImportsHandling = new PyImportsHandling(doc);
        int firstImport = -1;
        for (ImportHandle imp : pyImportsHandling) {
            list.add(new Tuple3<Integer, String, ImportHandle>(imp.startFoundLine, imp.importFound, imp));

            if (firstImport == -1) {
View Full Code Here

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

            case IAnalysisPreferences.TYPE_UNRESOLVED_IMPORT:
                //This case is the following: from other_module4 import Foo
                //with 'Foo' being undefined.
                //So, we have to suggest creating a Foo class/method in other_module4
                PyImportsHandling importsHandling = new PyImportsHandling(ps.getDoc(), false);
                int offsetLine = ps.getLineOfOffset(start);
                String selectedText = ps.getSelectedText();

                Tuple<IModule, String> found = null;
                String foundFromImportStr = null;
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.