[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/codecompletion PythonCompletionProcessor.ja
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-02-16 16:49:03
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv9724/src/org/python/pydev/editor/codecompletion Modified Files: PythonCompletionProcessor.java CompletionCache.java PyCodeCompletion.java Log Message: Code completion improvement Index: PyCodeCompletion.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PyCodeCompletion.java,v retrieving revision 1.29 retrieving revision 1.30 diff -C2 -d -r1.29 -r1.30 *** PyCodeCompletion.java 2 Feb 2005 15:56:22 -0000 1.29 --- PyCodeCompletion.java 16 Feb 2005 16:48:51 -0000 1.30 *************** *** 64,67 **** --- 64,72 ---- /** + * Type for parameter (used to decide the icon) + */ + public static final int TYPE_PARAM = 5; + + /** * Position in document prior to the activation token */ *************** *** 383,391 **** } int lastSpaceIndex = str.lastIndexOf(' '); int lastParIndex = str.lastIndexOf('('); ! if(lastParIndex != -1 || lastSpaceIndex != -1){ int lastIndex = lastSpaceIndex > lastParIndex ? lastSpaceIndex : lastParIndex; return str.substring(lastIndex+1, str.length()); } --- 388,399 ---- } + //this can surely be reworked... int lastSpaceIndex = str.lastIndexOf(' '); int lastParIndex = str.lastIndexOf('('); + int lastCIndex = str.lastIndexOf('['); ! if(lastParIndex != -1 || lastSpaceIndex != -1 || lastCIndex != -1){ int lastIndex = lastSpaceIndex > lastParIndex ? lastSpaceIndex : lastParIndex; + lastIndex = lastIndex > lastCIndex ? lastIndex : lastCIndex; return str.substring(lastIndex+1, str.length()); } Index: PythonCompletionProcessor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PythonCompletionProcessor.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** PythonCompletionProcessor.java 13 Jan 2005 15:09:25 -0000 1.16 --- PythonCompletionProcessor.java 16 Feb 2005 16:48:51 -0000 1.17 *************** *** 100,104 **** //we have to get the qualifier. e.g. bla.foo = foo is the qualifier. if (activationToken.indexOf('.') != -1) { ! while (endsWithSomeChar(new char[] { '.' }, activationToken) == false && activationToken.length() > 0) { --- 100,104 ---- //we have to get the qualifier. e.g. bla.foo = foo is the qualifier. if (activationToken.indexOf('.') != -1) { ! while (endsWithSomeChar(new char[] { '.','[' }, activationToken) == false && activationToken.length() > 0) { Index: CompletionCache.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/CompletionCache.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** CompletionCache.java 17 Jan 2005 14:47:47 -0000 1.14 --- CompletionCache.java 16 Feb 2005 16:48:51 -0000 1.15 *************** *** 81,84 **** --- 81,88 ---- case PyCodeCompletion.TYPE_BUILTIN: return imageCache.get(UIConstants.BUILTINS_ICON); + + case PyCodeCompletion.TYPE_PARAM: + return imageCache.get(UIConstants.COMPLETION_PARAMETERS_ICON); + default: return null; |