Package com.qspin.qtaste.ui.tools

Examples of com.qspin.qtaste.ui.tools.FileSearch


                            }

                            if ((text.contains("import ")) || (text.indexOf("from " + selectedText) >= 0)) {
                                // the selected text is then maybe an existing python lib
                                // path to python lib
                                FileSearch fileSearch = new FileSearch();
                                List<String> pythonLibPath = JythonTestScript.getAdditionalPythonPath(new File(fileName));
                                // replace the "." characters to "/"

                                selectedText = selectedText.replace(".", File.separator);
                                if (mTcPane != null) {
                                    fileSearch.addSearchPath(new File(getFileName()).getParent());
                                    fileSearch.addSearchPath(mTcPane.getCurrentSelectedTestsuite());
                                    FileNode selectedNode = mTcPane.getCurrentSelectedFileNode();
                                    if (selectedNode != null) {
                                        if (selectedNode.isTestcaseDir()) {
                                            fileSearch.addSearchPath(selectedNode.getFile().getParent());
                                        }
                                    }
                                    for (String dir : pythonLibPath) {
                                        fileSearch.addSearchPath(dir);
                                    }
                                    fileSearch.addSearchPath(StaticConfiguration.JYTHON_LIB);
                                    fileSearch.addSearchPath(StaticConfiguration.ADDITIONNAL_JYTHON_LIB);
                                    String importFileName =
                                            fileSearch.getFirstFileFound(selectedText + ".py");
                                    if (importFileName != null) // now open the docfile
                                    {
                                        // load the file
                                        mTcPane.loadTestCaseSource(new File(importFileName), true, false);
                                    }
View Full Code Here

TOP

Related Classes of com.qspin.qtaste.ui.tools.FileSearch

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.