[Pydev-cvs] org.python.pydev/src/org/python/pydev/plugin/nature PythonNature.java,1.11,1.12
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-08-04 00:47:41
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8807/src/org/python/pydev/plugin/nature Modified Files: PythonNature.java Log Message: some more on jython and running things... Index: PythonNature.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature/PythonNature.java,v retrieving revision 1.11 retrieving revision 1.12 diff -C2 -d -r1.11 -r1.12 *** PythonNature.java 2 Aug 2005 14:02:19 -0000 1.11 --- PythonNature.java 4 Aug 2005 00:47:32 -0000 1.12 *************** *** 37,42 **** import org.python.pydev.editor.codecompletion.revisited.ICodeCompletionASTManager; import org.python.pydev.plugin.PydevPlugin; - import org.python.pydev.ui.IInterpreterManager; - import org.python.pydev.ui.pythonpathconf.InterpreterInfo; import org.python.pydev.utils.JobProgressComunicator; --- 37,40 ---- *************** *** 219,226 **** astManager = (ICodeCompletionASTManager) IOUtils.readFromFile(getAstOutputFile()); //errors can happen when restoring it ! if(astManager != null){ ! restoreSystemManager(); ! ! }else{ try { String pythonPathStr = pythonPathNature.getOnlyProjectPythonPathStr(); --- 217,221 ---- astManager = (ICodeCompletionASTManager) IOUtils.readFromFile(getAstOutputFile()); //errors can happen when restoring it ! if(astManager == null){ try { String pythonPathStr = pythonPathNature.getOnlyProjectPythonPathStr(); *************** *** 230,234 **** PydevPlugin.log(e); } ! } return Status.OK_STATUS; --- 225,230 ---- PydevPlugin.log(e); } ! }else{ ! astManager.setProject(getProject()); // this is the project related to it } return Status.OK_STATUS; *************** *** 277,284 **** astManager = new ASTManager(); } ! astManager.changePythonPath(paths, project, new JobProgressComunicator(monitor, "Rebuilding modules", 500, this)); saveAstManager(false); - restoreSystemManager(); return Status.OK_STATUS; --- 273,279 ---- astManager = new ASTManager(); } ! astManager.setProject(getProject()); astManager.changePythonPath(paths, project, new JobProgressComunicator(monitor, "Rebuilding modules", 500, this)); saveAstManager(false); return Status.OK_STATUS; *************** *** 288,306 **** } - - /** - * This must be called so that the system manager is restored. - */ - private void restoreSystemManager() { - try { - if (astManager != null) { - IInterpreterManager iMan = PydevPlugin.getInterpreterManager(); - InterpreterInfo info = iMan.getDefaultInterpreterInfo(new NullProgressMonitor()); - astManager.setSystemModuleManager(info.modulesManager, getProject()); - } - } catch (Exception e) { - PydevPlugin.log(e); - } - } /** --- 283,286 ---- |