blob: 5033e8f8df6ff1da4f8ac06c1f82a5aca1afaaff [file] [log] [blame]
/*******************************************************************************
* Copyright (c) 2000, 2017 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
*
*******************************************************************************/
package org.eclipse.dltk.internal.corext.refactoring.participants;
import java.util.HashSet;
import java.util.Set;
import org.eclipse.core.resources.IProject;
import org.eclipse.core.runtime.CoreException;
public class RefactoringProcessors {
public static String[] getNatures(IProject[] projects)
throws CoreException {
Set<String> 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 result.toArray(new String[result.size()]);
}
}