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