[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/codecompletion PyCodeCompletionPreferencesP
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2004-10-19 14:42:07
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18360/src/org/python/pydev/editor/codecompletion Modified Files: PyCodeCompletionPreferencesPage.java PythonShell.java PyCodeCompletion.java Log Message: code completion changes Index: PythonShell.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PythonShell.java,v retrieving revision 1.16 retrieving revision 1.17 diff -C2 -d -r1.16 -r1.17 *** PythonShell.java 19 Oct 2004 13:29:33 -0000 1.16 --- PythonShell.java 19 Oct 2004 14:41:55 -0000 1.17 *************** *** 30,34 **** public class PythonShell { ! private static final int DEFAULT_SLEEP_BETWEEN_ATTEMPTS = 100; /** * Reference to a 'global python shell' --- 30,34 ---- public class PythonShell { ! private static final int DEFAULT_SLEEP_BETWEEN_ATTEMPTS = 500; /** * Reference to a 'global python shell' Index: PyCodeCompletionPreferencesPage.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PyCodeCompletionPreferencesPage.java,v retrieving revision 1.5 retrieving revision 1.6 diff -C2 -d -r1.5 -r1.6 *** PyCodeCompletionPreferencesPage.java 19 Oct 2004 13:29:33 -0000 1.5 --- PyCodeCompletionPreferencesPage.java 19 Oct 2004 14:41:55 -0000 1.6 *************** *** 57,61 **** Composite p = getFieldEditorParent(); ! String w = "WARNINGS for code completion:\n\n" + "Code completion works on top of a python shell and really \n" + "EXECUTES THE CODE YOU WRITE on the top level on the module.\n\n" --- 57,64 ---- Composite p = getFieldEditorParent(); ! addField(new BooleanFieldEditor( ! USE_CODECOMPLETION, "Use code completion?", p)); ! ! String w = "\nWARNINGS for code completion:\n\n" + "Code completion works on top of a python shell and really \n" + "EXECUTES THE CODE YOU WRITE on the top level on the module.\n\n" *************** *** 67,77 **** + "correctly set, as it creates a shell to make code completion.\n\n" + "Code completion is activated by Ctrl+Space, as are the templates, so,\n" ! + "if you stop using code completion, the templates should still appear."; FieldEditor fe = new LabelFieldEditor("Warning", w, p); addField(fe); - addField(new BooleanFieldEditor( - USE_CODECOMPLETION, "Use code completion?", p)); // addField(new BooleanFieldEditor( --- 70,82 ---- + "correctly set, as it creates a shell to make code completion.\n\n" + "Code completion is activated by Ctrl+Space, as are the templates, so,\n" ! + "if you stop using code completion, the templates should still appear.\n\n" + ! "AUTOCOMPLETION NOTE: autocompletion has been deactivated by default because\n" + ! "sometimes it would seem that the editor hanged, and many times no tips are\n" + ! "gotten, e.g.: Tips on parameters are NEVER gotten.\n\n" + ! "See http://pydev.sourceforge.net/codecompletion.html for more information.\n"; FieldEditor fe = new LabelFieldEditor("Warning", w, p); addField(fe); // addField(new BooleanFieldEditor( Index: PyCodeCompletion.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PyCodeCompletion.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PyCodeCompletion.java 13 Oct 2004 19:52:54 -0000 1.14 --- PyCodeCompletion.java 19 Oct 2004 14:41:55 -0000 1.15 *************** *** 175,182 **** } ! if(lineOfOffset!=-1) ! return "\n"+getDocToParseFromLine(doc, lineOfOffset); ! else return ""; } --- 175,187 ---- } ! if(lineOfOffset!=-1){ ! String docToParseFromLine = getDocToParseFromLine(doc, lineOfOffset); ! if(docToParseFromLine != null) ! return "\n"+docToParseFromLine; ! else ! return ""; ! }else{ return ""; + } } *************** *** 210,214 **** } catch (BadLocationException e1) { ! e1.printStackTrace(); } return newDoc; --- 215,221 ---- } catch (BadLocationException e1) { ! //that's ok... ! //e1.printStackTrace(); ! return null; } return newDoc; |