woproject/projects/woproject/src/java/org/objectstyle/woproject/ant PBXIndex.java,1.3,1.4

[email protected] Thu, 6 Apr 2006 14:20:03 -0700 (PDT)
Newsgroups gmane.comp.web.webobjects.woproject.cvs
Message-ID <[email protected]>
Update of /cvsroot/woproject/woproject/projects/woproject/src/java/org/objectstyle/woproject/ant
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv6596/projects/woproject/src/java/org/objectstyle/woproject/ant

Modified Files:
	PBXIndex.java 
Log Message:
Fix for http://objectstyle.org/jira/browse/WOL-226

Submitted by Bob Schwarzmann



Index: PBXIndex.java
===================================================================
RCS file: /cvsroot/woproject/woproject/projects/woproject/src/java/org/objectstyle/woproject/ant/PBXIndex.java,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -d -r1.3 -r1.4
--- PBXIndex.java	11 Dec 2004 10:26:06 -0000	1.3
+++ PBXIndex.java	6 Apr 2006 21:18:51 -0000	1.4
@@ -72,6 +72,7 @@
 public class PBXIndex extends Task {
 	protected File projectFile;
 	protected Vector resources = new Vector();
+	protected Vector wsresources = new Vector();
 	protected Vector frameworkSets = new Vector();
 	protected Vector sources = new Vector();
 
@@ -85,6 +86,10 @@
 		resources.addElement(set);
 	}
 
+	public void addWsResources(FileSet set) {
+		wsresources.addElement(set);
+	}
+
 	public void addFrameworks(FrameworkSet set) {
 		frameworkSets.addElement(set);
 	}
@@ -132,10 +137,10 @@
 	}
 	
 	protected void addToProject( PBXProject proj ) {
-		//	Add resource file references.
 		File	dir;
-		
 		Iterator it;
+
+		//	Add source file references.
 		it = sources.iterator();
 		while (it.hasNext()) {
 			FileSet fs = (FileSet) it.next();
@@ -154,6 +159,7 @@
 			}
 		}
 
+		//	Add Resources references.
 		it = resources.iterator();
 		while (it.hasNext()) {
 			FileSet fs = (FileSet) it.next();
@@ -163,15 +169,34 @@
 			
 			String[] allFiles = ds.getIncludedFiles();
 			for (int i = 0; i < allFiles.length; i++) {
-				proj.addFileReference((new File(dir,fixPath(allFiles[i]))).getAbsolutePath());
+				proj.addResourceFileReference((new File(dir,fixPath(allFiles[i]))).getAbsolutePath());
 			}
 
 			String[] allDirs = ds.getIncludedDirectories();
 			for (int i = 0; i < allDirs.length; i++) {
-				proj.addFolderReference((new File(dir,fixPath(allDirs[i]))).getAbsolutePath());
+				proj.addResourceFolderReference((new File(dir,fixPath(allDirs[i]))).getAbsolutePath());
 			}
 		}
-		
+
+		//	Add WebServerResources references.
+		it = wsresources.iterator();
+		while (it.hasNext()) {
+			FileSet fs = (FileSet) it.next();
+			dir = fs.getDir(getProject());
+			DirectoryScanner ds = fs.getDirectoryScanner(getProject());
+			ds.scan();
+			
+			String[] allFiles = ds.getIncludedFiles();
+			for (int i = 0; i < allFiles.length; i++) {
+				proj.addWSResourceFileReference((new File(dir,fixPath(allFiles[i]))).getAbsolutePath());
+			}
+
+			String[] allDirs = ds.getIncludedDirectories();
+			for (int i = 0; i < allDirs.length; i++) {
+				proj.addWSResourceFolderReference((new File(dir,fixPath(allDirs[i]))).getAbsolutePath());
+			}
+		}
+
 		//	Add framework references.
 		it = frameworkSets.iterator();
 		while(it.hasNext()) {



-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642