blob: 4640bcaa376a4d0cc4ca39015d19c86cb8b04efc [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2005 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
*******************************************************************************/
package org.eclipse.jdt.internal.corext.refactoring.participants;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.runtime.CoreException;
import org.eclipse.core.resources.IProject;
public class RefactoringProcessors {
public static String[] getNatures(IProject[] projects) throws CoreException {
Set result= new HashSet();
for (int i= 0; i < projects.length; i++) {
String[] pns= projects[i].getDescription().getNatureIds();
for (int p = 0; p < pns.length; p++) {
result.add(pns[p]);
}
}
return (String[])result.toArray(new String[result.size()]);
}
}