diff options
Diffstat (limited to 'plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidatorHelper.java')
-rw-r--r-- | plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidatorHelper.java | 69 |
1 files changed, 0 insertions, 69 deletions
diff --git a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidatorHelper.java b/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidatorHelper.java deleted file mode 100644 index 1dbe0bd13..000000000 --- a/plugins/org.eclipse.wst.validation/validate/org/eclipse/wst/validation/internal/operations/ReferencialFileValidatorHelper.java +++ /dev/null @@ -1,69 +0,0 @@ -/******************************************************************************* - * Copyright (c) 2001, 2004 IBM Corporation and others. - * All rights reserved. This program and the accompanying materials - * are made available under the terms of the Eclipse Public License v1.0 - * which accompanies this distribution, and is available at - * http://www.eclipse.org/legal/epl-v10.html - * - * Contributors: - * IBM Corporation - initial API and implementation - *******************************************************************************/ -/* - * Created on May 4, 2004 - * - * To change the template for this generated file go to - * Window - Preferences - Java - Code Generation - Code and Comments - */ -package org.eclipse.wst.validation.internal.operations; - -import java.util.ArrayList; -import java.util.List; - -import org.eclipse.core.resources.IFile; -import org.eclipse.core.resources.IFolder; -import org.eclipse.core.resources.IProject; -import org.eclipse.core.resources.IResource; -import org.eclipse.core.runtime.CoreException; - -/** - * @author vijayb - * - * To change the template for this generated type comment go to Window - Preferences - Java - Code - * Generation - Code and Comments - */ -public class ReferencialFileValidatorHelper { - /** - * - */ - public ReferencialFileValidatorHelper() { - super(); - } - - /** - * return a list of all files contained in project to infinite depth - */ - public static List getAllProjectFiles(IProject project) { - List result = new ArrayList(); - if (project == null) - return result; - try { - result = collectFiles(project.members(), result); - } catch (CoreException e) { - //Ignore - } - return result; - } - - private static List collectFiles(IResource[] members, List result) throws CoreException { - // recursively collect files for the given members - for (int i = 0; i < members.length; i++) { - IResource res = members[i]; - if (res instanceof IFolder) { - collectFiles(((IFolder) res).members(), result); - } else if (res instanceof IFile) { - result.add(res); - } - } - return result; - } -}
\ No newline at end of file |