ProjectHelper.getProjectSourceFolder( (IProject) parentContainer);
wolipsJavaProject .getClasspathAccessor() .getProjectSourceFolder();
	private void addAdditionalContents(		IProgressMonitor monitor,		IContainer parentContainer,		File additionalResourcesDir)		throws InvocationTargetException, InterruptedException {		monitor.beginTask("Copying project contents", IProgressMonitor.UNKNOWN);		CopyFileToResource copy;		File projectFile = new File(additionalResourcesDir, PROJECT_FILE_NAME);		// init directory scanner includes/excludes		String[] resourcesIncludes;		String[] resourcesExcludes =			new String[] {				PROJECT_FILE_NAME,				"CVS",				"*." + EXT_WOA,				"*." + EXT_BUILD,				"*." + EXT_SUBPROJECT,				"*." + EXT_JAVA };		String[] classesIncludes;		String[] classesExcludes =			new String[] {				PROJECT_FILE_NAME,				"CVS",				"*." + EXT_WOA,				"*." + EXT_BUILD,				"*." + EXT_SUBPROJECT };		String[] subprojectsIncludes;		String[] subprojectsExcludes =			new String[] { "CVS", "*." + EXT_WOA, "*." + EXT_BUILD };		PBProject pbProject = null;		if (projectFile.exists()) {			// try to set includes from PB.Project			try {				pbProject =					new PBProject(						projectFile,						additionalResourcesDir.getName().endsWith(							"." + EXT_FRAMEWORK));				List woAppResources =					pbProject.getWoAppResources() != null						? pbProject.getWoAppResources()						: new ArrayList();				List woComponents =					pbProject.getWoComponents() != null						? pbProject.getWoComponents()						: new ArrayList();				// wo app resources and wocomponents				resourcesIncludes =					new String[woAppResources.size() + woComponents.size()];				for (int i = 0; i < woAppResources.size(); i++) {					resourcesIncludes[i] = (String) woAppResources.get(i);				}				for (int i = 0; i < woComponents.size(); i++) {					resourcesIncludes[i + woAppResources.size()] =						(String) woComponents.get(i);				}				// java files				List classes =					pbProject.getClasses() != null						? pbProject.getClasses()						: new ArrayList();				classesIncludes = new String[classes.size()];				for (int i = 0; i < classes.size(); i++) {					classesIncludes[i] = (String) classes.get(i);				}				// subprojects				// java files				List subprojects =					pbProject.getSubprojects() != null						? pbProject.getSubprojects()						: new ArrayList();				subprojectsIncludes = new String[subprojects.size()];				for (int i = 0; i < subprojects.size(); i++) {					subprojectsIncludes[i] = (String) subprojects.get(i);				}			} catch (IOException e) {				resourcesIncludes = new String[] { "*" };				classesIncludes = new String[] { "*." + EXT_JAVA };				subprojectsIncludes = new String[] { "*." + EXT_SUBPROJECT };				WOLipsLog.log(e);			}		} else {			resourcesIncludes = new String[] { "*" };			classesIncludes = new String[] { "*." + EXT_JAVA };			subprojectsIncludes = new String[] { "*." + EXT_SUBPROJECT };		}		// scan directory for non subproject resources		DirectoryScanner ds = new DirectoryScanner();		ds.setBasedir(additionalResourcesDir);		ds.setCaseSensitive(true);		ds.setExcludes(resourcesExcludes);		ds.setIncludes(resourcesIncludes);		ds.scan();		String[] foundFiles = ds.getIncludedFiles();		// copy found files to actual project's parent container		for (int i = 0; i < foundFiles.length; i++) {			try {				copy =					new CopyFileToResource(						additionalResourcesDir,						parentContainer,						foundFiles[i],						monitor);			} catch (FileNotFoundException e) {				WOLipsLog.log(e);				continue;			}			try {				copy.execute();			} catch (CoreException e) {				WOLipsLog.log(e);				continue;			}		}		String[] foundDirs = ds.getIncludedDirectories();		for (int i = 0; i < foundDirs.length; i++) {			if (foundDirs[i].endsWith("." + EXT_COMPONENT)				|| foundDirs[i].endsWith("." + EXT_EOMODEL)) {				try {					copy =						new CopyFileToResource(							additionalResourcesDir,							parentContainer,							foundDirs[i],							monitor);				} catch (FileNotFoundException e) {					WOLipsLog.log(e);					continue;				}				try {					copy.execute();				} catch (CoreException e) {					WOLipsLog.log(e);					continue;				}			}		}		// scan directory for java classes		ds.setExcludes(classesExcludes);		ds.setIncludes(classesIncludes);		ds.scan();		String[] foundJavaFiles = ds.getIncludedFiles();		if (foundJavaFiles.length > 0) {			IContainer sourceFolder = null;			switch (parentContainer.getType()) {				case IResource.PROJECT :					sourceFolder =						ProjectHelper.getProjectSourceFolder(							(IProject) parentContainer);					break;				case IResource.FOLDER :					sourceFolder =						ProjectHelper.getSubprojectSourceFolder(							(IFolder) parentContainer,							true);					break;			}			if (sourceFolder != null) {				for (int i = 0; i < foundJavaFiles.length; i++) {					try {						copy =							new CopyFileToResource(								additionalResourcesDir,								sourceFolder,								foundJavaFiles[i],								monitor);					} catch (FileNotFoundException e) {						WOLipsLog.log(e);						continue;					}					try {						copy.execute();					} catch (CoreException e) {						WOLipsLog.log(e);						continue;					}				}			}		}		// scan directory for subproject resources		ds.setExcludes(subprojectsExcludes);		ds.setIncludes(subprojectsIncludes);		ds.scan();		String[] foundSubprojects = ds.getIncludedDirectories();		WOSubprojectCreator currentSubprojectCreator;		String currentSubprojectName;		for (int i = 0; i < foundSubprojects.length; i++) {			if (foundSubprojects[i].indexOf("." + EXT_SUBPROJECT) != -1) {				currentSubprojectName =					foundSubprojects[i].substring(						0,						foundSubprojects[i].lastIndexOf("." + EXT_SUBPROJECT));			} else {				currentSubprojectName = foundSubprojects[i];			}			currentSubprojectCreator =				new WOSubprojectCreator(parentContainer, currentSubprojectName);			try {				currentSubprojectCreator.createSubproject(					new SubProgressMonitor(monitor, 1));			} catch (CoreException e) {				throw new InvocationTargetException(e);			}			IContainer subprojectContainer =				parentContainer.getFolder(new Path(foundSubprojects[i]));			File additionalSubprojectResourcesFile =				new File(additionalResourcesDir, foundSubprojects[i]);			// recursively add subproject resources			addAdditionalContents(				new SubProgressMonitor(monitor, 1),				subprojectContainer,				additionalSubprojectResourcesFile);		}	}