[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/codecompletion PythonShell.java,1.14,1.15 P
Brought to you by:
fabioz
|
From: Fabio Z. <fa...@us...> - 2004-10-13 19:53:06
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8966/src/org/python/pydev/editor/codecompletion Modified Files: PythonShell.java PythonCompletionProcessor.java PyCodeCompletion.java Log Message: Index: PythonShell.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PythonShell.java,v retrieving revision 1.14 retrieving revision 1.15 diff -C2 -d -r1.14 -r1.15 *** PythonShell.java 8 Oct 2004 16:38:41 -0000 1.14 --- PythonShell.java 13 Oct 2004 19:52:53 -0000 1.15 *************** *** 13,17 **** --- 13,19 ---- import java.net.URLEncoder; import java.util.ArrayList; + import java.util.HashMap; import java.util.List; + import java.util.Map; import java.util.StringTokenizer; *************** *** 31,35 **** * Reference to a 'global python shell' */ ! private static PythonShell pytonShell; --- 33,40 ---- * Reference to a 'global python shell' */ ! private static Map shells = new HashMap(); ! ! public static final int COMPLETION_SHELL = 1; ! public static final int OTHERS_SHELL = 2; *************** *** 40,46 **** * */ ! public synchronized static PythonShell getServerShell() throws IOException, CoreException { if(pytonShell == null){ pytonShell = new PythonShell(); pytonShell.startIt(); } --- 45,54 ---- * */ ! public synchronized static PythonShell getServerShell(int id) throws IOException, CoreException { ! PythonShell pytonShell = (PythonShell) shells.get(new Integer(id)); ! if(pytonShell == null){ pytonShell = new PythonShell(); + shells.put(new Integer(id), pytonShell); pytonShell.startIt(); } Index: PyCodeCompletion.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PyCodeCompletion.java,v retrieving revision 1.13 retrieving revision 1.14 diff -C2 -d -r1.13 -r1.14 *** PyCodeCompletion.java 8 Oct 2004 16:38:42 -0000 1.13 --- PyCodeCompletion.java 13 Oct 2004 19:52:54 -0000 1.14 *************** *** 29,34 **** int docBoundary = -1; // the document prior to the activation token - private PythonShell pytonShell; - /** * @param theDoc: --- 29,32 ---- *************** *** 65,69 **** PythonShell serverShell = null; try { ! serverShell = PythonShell.getServerShell(); } catch (Exception e) { throw new RuntimeException(e); --- 63,67 ---- PythonShell serverShell = null; try { ! serverShell = PythonShell.getServerShell(PythonShell.COMPLETION_SHELL); } catch (Exception e) { throw new RuntimeException(e); Index: PythonCompletionProcessor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/codecompletion/PythonCompletionProcessor.java,v retrieving revision 1.9 retrieving revision 1.10 diff -C2 -d -r1.9 -r1.10 *** PythonCompletionProcessor.java 24 Sep 2004 16:41:21 -0000 1.9 --- PythonCompletionProcessor.java 13 Oct 2004 19:52:54 -0000 1.10 *************** *** 39,42 **** --- 39,43 ---- private ProposalsComparator proposalsComparator = new ProposalsComparator(); + /** * @param edit *************** *** 90,94 **** try { ! PythonShell.getServerShell().sendGoToDirMsg(edit.getEditorFile()); } catch (Exception e) { //if we don't suceed, we don't have to fail... just go on and try --- 91,95 ---- try { ! PythonShell.getServerShell(PythonShell.COMPLETION_SHELL).sendGoToDirMsg(edit.getEditorFile()); } catch (Exception e) { //if we don't suceed, we don't have to fail... just go on and try |