[Pydev-cvs] org.python.pydev/src/org/python/pydev/plugin/nature PythonNature.java,1.1,1.2
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-06-08 15:24:28
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31217/src/org/python/pydev/plugin/nature Modified Files: PythonNature.java Log Message: Index: PythonNature.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature/PythonNature.java,v retrieving revision 1.1 retrieving revision 1.2 diff -C2 -d -r1.1 -r1.2 *** PythonNature.java 3 Jun 2005 18:49:33 -0000 1.1 --- PythonNature.java 8 Jun 2005 15:24:19 -0000 1.2 *************** *** 116,119 **** --- 116,122 ---- return; } + if(monitor == null){ + monitor = new NullProgressMonitor(); + } IProjectDescription desc = project.getDescription(); *************** *** 187,191 **** //errors can happen when restoring it if(astManager != null){ ! restoreAditionalManagers(); }else{ --- 190,194 ---- //errors can happen when restoring it if(astManager != null){ ! restoreSystemManager(); }else{ *************** *** 246,251 **** astManager.changePythonPath(paths, project, new JobProgressComunicator(monitor, "Rebuilding modules", 500, this)); - restoreAditionalManagers(); saveAstManager(false); return Status.OK_STATUS; --- 249,254 ---- astManager.changePythonPath(paths, project, new JobProgressComunicator(monitor, "Rebuilding modules", 500, this)); saveAstManager(false); + restoreSystemManager(); return Status.OK_STATUS; *************** *** 257,267 **** /** ! * This must be called so that */ ! private void restoreAditionalManagers() { ! if(astManager != null){ ! IInterpreterManager iMan = PydevPlugin.getInterpreterManager(); ! InterpreterInfo info = iMan.getDefaultInterpreterInfo(new NullProgressMonitor()); ! astManager.setSystemModuleManager(info.modulesManager, getProject()); } } --- 260,274 ---- /** ! * 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); } } |