# HG changeset patch # User Eugene Ostroukhov # Date 1269551440 25200 # Node ID c035b31473c1682682f7f391f68d39157ac18999 # Parent 39bbb3a15d6fd1a71a35f72d2de62d44619ff5be Configuration files are excluded from packaging diff -r 39bbb3a15d6f -r c035b31473c1 org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java --- a/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java Thu Mar 25 12:51:27 2010 -0700 +++ b/org.symbian.tools.wrttools/src/org/symbian/tools/wrttools/util/ProjectUtils.java Thu Mar 25 14:10:40 2010 -0700 @@ -268,10 +268,40 @@ addWrtNature(project); + excludeResources(project); + monitor.done(); return project; } + private static void excludeResources(IProject project) { + IFile file = project.getFile(IProjectDescription.DESCRIPTION_FILE_NAME); + if (file.exists()) { + exclude(file); + } + IFolder settings = project.getFolder(".settings"); + if (settings.exists()) { + excludeFolder(settings); + exclude(settings); + } + } + + private static void excludeFolder(IFolder folder) { + exclude(folder); + try { + IResource[] members = folder.members(); + for (IResource resource : members) { + if (resource.getType() == IResource.FOLDER) { + excludeFolder((IFolder) resource); + } else { + exclude(resource); + } + } + } catch (CoreException e) { + Activator.log(e); + } + } + public static List filterExternalProjectEntries(List fileSystemObjects) { List result = new LinkedList(); for (Object object : fileSystemObjects) {