[Pydev-cvs] org.python.pydev/src/org/python/pydev/plugin/nature PythonPathNature.java, 1.15, 1.16
Brought to you by:
fabioz
From: Fabio Z. <fa...@us...> - 2006-09-26 11:30:04
|
Update of /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13210/src/org/python/pydev/plugin/nature Modified Files: PythonPathNature.java Log Message: Index: PythonPathNature.java =================================================================== RCS file: /cvsroot/pydev/org.python.pydev/src/org/python/pydev/plugin/nature/PythonPathNature.java,v retrieving revision 1.15 retrieving revision 1.16 diff -C2 -d -r1.15 -r1.16 *** PythonPathNature.java 23 Sep 2006 15:47:41 -0000 1.15 --- PythonPathNature.java 26 Sep 2006 11:30:00 -0000 1.16 *************** *** 10,13 **** --- 10,14 ---- import org.eclipse.core.resources.IContainer; + import org.eclipse.core.resources.IFile; import org.eclipse.core.resources.IProject; import org.eclipse.core.resources.IResource; *************** *** 114,140 **** if(r instanceof IContainer){ container = (IContainer) r; - } - - // this is code to get it relative to the project... I was pursuing this solution, but as too many - // things already related to it being relative to the workspace, just the getProjectSourcePath was changed - // if(container == null){ - // IPath projectPath = project.getFullPath(); - // projectPath.append(p); - // p = projectPath; - // //try to get it relative to the project - // r = root.findMember(p); - // if(r instanceof IContainer){ - // container = (IContainer) r; - // } - // } - - if(container != null){ buf.append(REF.getFileAbsolutePath(container.getLocation().toFile())); buf.append("|"); ! }else{ //the location was not found ! ! //not in workspace?... maybe it was removed, so, do nothing, but let the user know about it ! PydevPlugin.log("Unable to find the path "+strings[i]+" in the project were it\n" + ! "is added as a source folder for pydev (project: "+project.getName()+")"); } } --- 115,135 ---- if(r instanceof IContainer){ container = (IContainer) r; buf.append(REF.getFileAbsolutePath(container.getLocation().toFile())); buf.append("|"); ! ! }else if(r instanceof IFile){ //jar file ! String extension = r.getFileExtension(); ! if(extension == null || extension.equals("jar") == false){ ! PydevPlugin.log("Error: the path "+strings[i]+" is a file but is not a .jar file."); ! ! }else{ ! buf.append(REF.getFileAbsolutePath(r.getLocation().toFile())); ! buf.append("|"); ! } ! ! }else{ ! //not in workspace?... maybe it was removed, so, do nothing, but let the user know about it ! PydevPlugin.log("Unable to find the path "+strings[i]+" in the project were it\n" + ! "is added as a source folder for pydev (project: "+project.getName()+")"); } } |