Beispiel #1
0
 /**
  * Return a list of EMFNatures based on the natures that have been configured for this project.
  *
  * @return List of EMFNatures
  * @param project
  * @return list of natures configured for the project.
  * @since 1.0.0
  */
 public static List getRegisteredRuntimes(IProject project) {
   List result = null;
   EMFNature nature = null;
   if (project != null && project.isAccessible()) {
     String natureID;
     Iterator it = EMFNatureRegistry.singleton().REGISTERED_NATURE_IDS.iterator();
     while (it.hasNext()) {
       natureID = (String) it.next();
       try {
         nature = (EMFNature) project.getNature(natureID);
       } catch (CoreException e) {
       }
       if (nature != null) {
         if (result == null) result = new ArrayList(2);
         result.add(nature);
       }
     }
   }
   return result == null ? Collections.EMPTY_LIST : result;
 }