[Pydev-cvs] org.python.pydev/src/org/python/pydev/builder PyDevBuilderVisitor.java,1.15,1.16 PyDevBu
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2005-08-02 14:02:28
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/builder In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv4314/src/org/python/pydev/builder Modified Files: PyDevBuilderVisitor.java PyDevBuilder.java Log Message: Index: PyDevBuilder.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/builder/PyDevBuilder.java,v retrieving revision 1.26 retrieving revision 1.27 diff -C2 -d -r1.26 -r1.27 *** PyDevBuilder.java 2 Aug 2005 12:59:22 -0000 1.26 --- PyDevBuilder.java 2 Aug 2005 14:02:18 -0000 1.27 *************** *** 198,208 **** */ private void addToResourcesToParse(List<IResource> resourcesToParse, IResource member, PythonNature nature) { ! //analyze it only if it is a valid source file and maps to some ! //module in the pythonpath String fileExtension = member.getFileExtension(); if (fileExtension != null && PythonPathHelper.isValidSourceFile("."+fileExtension)) { ! if(nature.getAstManager().getProjectModulesManager().isInPythonPath(member, nature.getProject())){ ! resourcesToParse.add(member); ! } } } --- 198,205 ---- */ private void addToResourcesToParse(List<IResource> resourcesToParse, IResource member, PythonNature nature) { ! //analyze it only if it is a valid source file String fileExtension = member.getFileExtension(); if (fileExtension != null && PythonPathHelper.isValidSourceFile("."+fileExtension)) { ! resourcesToParse.add(member); } } Index: PyDevBuilderVisitor.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/builder/PyDevBuilderVisitor.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PyDevBuilderVisitor.java 2 Aug 2005 12:59:22 -0000 1.15 --- PyDevBuilderVisitor.java 2 Aug 2005 14:02:17 -0000 1.16 *************** *** 47,50 **** --- 47,65 ---- /** + * @param resource the resource we want to know about + * @return true if it is in the pythonpath + */ + protected boolean isInPythonPath(IResource resource){ + IProject project = resource.getProject(); + PythonNature nature = PythonNature.getPythonNature(project); + if(project != null && nature != null){ + ProjectModulesManager modulesManager = nature.getAstManager().getProjectModulesManager(); + return modulesManager.isInPythonPath(resource, project); + } + + return false; + } + + /** * @param initResource * @return all the IFiles that are below the folder where initResource is located. *************** *** 127,139 **** } IProject project = resource.getProject(); PythonNature nature = PythonNature.getPythonNature(project); if(project != null && nature != null){ - boolean isValidSourceFile = PythonPathHelper.isValidSourceFile("."+ext); - ProjectModulesManager modulesManager = nature.getAstManager().getProjectModulesManager(); - //we just want to make the visit if it is a valid python file and it is in the pythonpath ! if (isValidSourceFile && modulesManager.isInPythonPath(resource, project)) { boolean isAddOrChange = false; --- 142,152 ---- } + //only analyze projects with the python nature... IProject project = resource.getProject(); PythonNature nature = PythonNature.getPythonNature(project); if(project != null && nature != null){ //we just want to make the visit if it is a valid python file and it is in the pythonpath ! if (PythonPathHelper.isValidSourceFile("."+ext)) { boolean isAddOrChange = false; |