String path = (String)e.nextElement(); cat.debug("Checking if framework '" +path+ "' has open project..."); com.webobjects.appserver._private.WOProjectBundle bundle = com.webobjects.appserver._private.WOProjectBundle.projectBundleForProject(path, true); if(bundle != null) { File f = new File(bundle.projectPath() + "/CPFileList.txt"); if(f.exists()) { cat.info("Found open project for framework '" +path+ "' at path " + bundle.projectPath()); projectPaths.addObject(bundle.projectPath()); } } }
String name = (String)e.nextElement(); WOProjectBundle bundle = WOProjectBundle.projectBundleForProject(name, true); String path;  if(bundle != null) { path = bundle.projectPath(); } else { path = System.getProperty("projects." + name); } if(path != null) { File f = new File( + "/CPFileList.txt"); if(f.exists()) { cat.info("Found open project for framework '" +path+ "' at path " + bundle.projectPath()); projectPaths.addObject(bundle.projectPath()); } } }
    NSArray projectPaths() {	NSArray frameworkNames = (NSArray)NSBundle.frameworkBundles().valueForKey("name");	NSMutableArray projectPaths = new NSMutableArray();	String mainProject = null;	String mainBundleName = NSBundle.mainBundle().name();	try {	    // horrendous hack to avoid having to set the NSProjectPath manually.	    mainProject = com.webobjects.appserver._private.WOProjectBundle.projectBundleForProject(mainBundleName,false).projectPath();	} catch(Exception ex) {	    cat.warn("projectPaths exception: " + ex + " in "+ mainBundleName);	}	if(mainProject == null) {	    mainProject = "../..";	}	if((new File(mainProject + "/CPFileList.txt")).exists()) {	    cat.info("Found open project for app at path " + mainProject);	    projectPaths.addObject(mainProject);	}	for(Enumeration e = frameworkNames.objectEnumerator(); e.hasMoreElements();) {	    String path = (String)e.nextElement();	    cat.debug("Checking if framework '" +path+ "' has open project...");	    com.webobjects.appserver._private.WOProjectBundle bundle = com.webobjects.appserver._private.WOProjectBundle.projectBundleForProject(path, true);	    if(bundle != null) {		File f = new File(bundle.projectPath() + "/CPFileList.txt");		if(f.exists()) {		    cat.info("Found open project for framework '" +path+ "' at path " + bundle.projectPath());		    projectPaths.addObject(bundle.projectPath());		}	    }	}	return projectPaths;    }