1 11 package org.eclipse.jdt.internal.corext.refactoring.participants; 12 13 import java.util.HashSet ; 14 import java.util.Set ; 15 16 import org.eclipse.core.runtime.CoreException; 17 18 import org.eclipse.core.resources.IProject; 19 20 public class RefactoringProcessors { 21 22 public static String [] getNatures(IProject[] projects) throws CoreException { 23 Set result= new HashSet (); 24 for (int i= 0; i < projects.length; i++) { 25 String [] pns= projects[i].getDescription().getNatureIds(); 26 for (int p = 0; p < pns.length; p++) { 27 result.add(pns[p]); 28 } 29 } 30 return (String [])result.toArray(new String [result.size()]); 31 } 32 } 33 | Popular Tags |