[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/actions PyOrganizeImports.java,1.5,1.6
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-02-19 11:21:18
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv7183/src/org/python/pydev/editor/actions Modified Files: PyOrganizeImports.java Log Message: handling from xxx import (eee,yyy) Index: PyOrganizeImports.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/actions/PyOrganizeImports.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyOrganizeImports.java 26 Sep 2005 01:25:23 -0000 1.5 --- PyOrganizeImports.java 19 Feb 2006 11:21:13 -0000 1.6 *************** *** 84,87 **** --- 84,96 ---- if(inComment == false && (str.startsWith("import ") || str.startsWith("from "))){ int iToAdd = i; + if(str.indexOf('(') != -1){ //we have something like from os import (pipe,\nfoo) + i++; + while(i < lines && str.indexOf(')') == -1){ + String str1 = PySelection.getLine(doc, i); + str += PyAction.getDelimiter(doc); + str += str1; + i++; + } + } if(WordUtils.endsWith(str, '\\')){ i++; |