Index: PerlExecutableUtilities.java =================================================================== RCS file: /cvsroot/e-p-i-c/org.epic.perleditor/src/org/epic/perleditor/editors/util/PerlExecutableUtilities.java,v retrieving revision 1.14 diff -u -r1.14 PerlExecutableUtilities.java --- PerlExecutableUtilities.java 20 Dec 2004 19:29:23 -0000 1.14 +++ PerlExecutableUtilities.java 2 Feb 2005 03:50:11 -0000 @@ -13,7 +13,12 @@ import org.eclipse.ui.IFileEditorInput; import org.eclipse.ui.editors.text.TextEditor; +import org.eclipse.core.resources.IContainer; +import org.eclipse.core.resources.IFolder; import org.eclipse.core.resources.IProject; +import org.eclipse.core.resources.IResource; +import org.eclipse.core.runtime.CoreException; +import org.eclipse.core.runtime.IPath; import gnu.regexp.RE; @@ -117,6 +122,24 @@ cmdList.add("-I"); cmdList.add(path); } + try { + if (project instanceof IContainer) { + int flags = IResource.DEPTH_ONE | IResource.FOLDER; + IResource[] folders + = ((IContainer) project).members(flags); + for (int i = 0; i < folders.length; i++) { + if (folders[i] instanceof IFolder) { + IFolder folder = (IFolder) folders[i]; + IPath path = folder.getRawLocation(); + + cmdList.add("-I"); + cmdList.add(path.toOSString()); + } + } + } + } catch (CoreException e) { + // we couldn't add the folders in the project to the build path. + } } return cmdList;