private static Set<String> loadGroovyFileNames() {
   IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
   if (contentTypeManager != null) {
     Set<String> names = null;
     IContentType groovyContentType =
         contentTypeManager.getContentType(GROOVY_SOURCE_CONTENT_TYPE);
     for (IContentType contentType : contentTypeManager.getAllContentTypes()) {
       if (contentType.isKindOf(groovyContentType)) {
         for (String fileName : contentType.getFileSpecs(IContentType.FILE_NAME_SPEC)) {
           if (names == null) names = new TreeSet<String>();
           names.add(fileName);
         }
       }
     }
     if (names != null) return names;
   }
   return Collections.emptySet();
 }
 private static Set<String> loadGroovyFileExtensions() {
   IContentTypeManager contentTypeManager = Platform.getContentTypeManager();
   if (contentTypeManager != null) {
     IContentType groovyContentType =
         contentTypeManager.getContentType(GROOVY_SOURCE_CONTENT_TYPE);
     Set<String> extensions = new HashSet<String>();
     // https://bugs.eclipse.org/bugs/show_bug.cgi?id=121715
     // content types derived from groovy content type should be included
     for (IContentType contentType : contentTypeManager.getAllContentTypes()) {
       if (contentType.isKindOf(
           groovyContentType)) { // note that contentType.isKindOf(javaContentType) == true
         for (String fileExtension : contentType.getFileSpecs(IContentType.FILE_EXTENSION_SPEC)) {
           extensions.add(fileExtension);
         }
       }
     }
     return extensions;
   }
   return Collections.singleton("groovy");
 }