[Pydev-cvs] org.python.pydev/src/org/python/pydev/editor/refactoring PyRefactoring.java,1.6,1.7
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2004-10-13 19:53:32
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/refactoring In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8966/src/org/python/pydev/editor/refactoring Modified Files: PyRefactoring.java Log Message: Index: PyRefactoring.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/editor/refactoring/PyRefactoring.java,v retrieving revision 1.6 retrieving revision 1.7 diff -C2 -d -r1.6 -r1.7 *** PyRefactoring.java 8 Oct 2004 16:38:43 -0000 1.6 --- PyRefactoring.java 13 Oct 2004 19:52:52 -0000 1.7 *************** *** 34,42 **** public class PyRefactoring { ! /** ! * Reference to a 'global python shell' ! */ ! private static PythonShell pytonShell; ! /** * Instead of making all static, let's use a singleton... it may be useful... --- 34,38 ---- public class PyRefactoring { ! /** * Instead of making all static, let's use a singleton... it may be useful... *************** *** 60,64 **** private PyRefactoring(){ try { ! getServerShell(); //when we initialize, initialize the server. } catch (Exception e) { e.printStackTrace(); --- 56,60 ---- private PyRefactoring(){ try { ! PythonShell.getServerShell(PythonShell.OTHERS_SHELL); //when we initialize, initialize the server. } catch (Exception e) { e.printStackTrace(); *************** *** 66,82 **** } - /** - * @return - * @throws CoreException - * @throws IOException - * - */ - private synchronized PythonShell getServerShell() throws IOException, CoreException { - if(pytonShell == null){ - pytonShell = new PythonShell(); - pytonShell.startIt(); - } - return pytonShell; - } public void addPropertyListener(IPropertyListener l) { --- 62,65 ---- *************** *** 94,98 **** PythonShell pytonShell; try { ! pytonShell = getServerShell(); try { pytonShell.write(str); --- 77,81 ---- PythonShell pytonShell; try { ! pytonShell = PythonShell.getServerShell(PythonShell.OTHERS_SHELL); try { pytonShell.write(str); *************** *** 250,254 **** public void restartShell() { try { ! getServerShell().restartShell(); } catch (IOException e) { e.printStackTrace(); --- 233,237 ---- public void restartShell() { try { ! PythonShell.getServerShell(PythonShell.OTHERS_SHELL).restartShell(); } catch (IOException e) { e.printStackTrace(); |