[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/modules CompiledMo
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-08-25 10:54:55
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/modules In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8885/src/org/python/pydev/editor/codecompletion/revisited/modules Modified Files: CompiledModule.java Log Message: Index: CompiledModule.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/revisited/modules/CompiledModule.java,v retrieving revision 1.19 retrieving revision 1.20 diff -C2 -d -r1.19 -r1.20 *** CompiledModule.java 21 Aug 2005 21:27:49 -0000 1.19 --- CompiledModule.java 25 Aug 2005 10:54:46 -0000 1.20 *************** *** 11,14 **** --- 11,15 ---- import java.util.List; + import org.eclipse.core.runtime.IStatus; import org.python.pydev.core.FullRepIterable; import org.python.pydev.editor.codecompletion.PyCodeCompletion; *************** *** 58,64 **** for (Iterator iter = completions.iterator(); iter.hasNext();) { String[] element = (String[]) iter.next(); ! IToken t = new CompiledToken(element[0], element[1], element[2], name, Integer.parseInt(element[3])); ! array.add(t); ! } --- 59,91 ---- for (Iterator iter = completions.iterator(); iter.hasNext();) { String[] element = (String[]) iter.next(); ! //let's make this less error-prone. ! try { ! String o1 = element[0]; //this one is really, really needed ! String o2 = ""; ! String o3 = ""; ! String o4; ! ! if(element.length > 0) ! o2 = element[1]; ! ! if(element.length > 0) ! o3 = element[2]; ! ! if(element.length > 0) ! o4 = element[3]; ! else ! o4 = ""+PyCodeCompletion.TYPE_BUILTIN; ! ! IToken t = new CompiledToken(o1, o2, o3, name, Integer.parseInt(o4)); ! array.add(t); ! } catch (Exception e) { ! String received = ""; ! for (int i = 0; i < element.length; i++) { ! received += element[i]; ! received += " "; ! } ! ! PydevPlugin.log(IStatus.ERROR, "Error getting completions for compiled module "+name+" received = '"+received+"'", e); ! } } |