@NotNull
 private static ConfigImportSettings getConfigImportSettings() {
   try {
     @SuppressWarnings("unchecked")
     Class<ConfigImportSettings> customProviderClass =
         (Class<ConfigImportSettings>)
             Class.forName(
                 "com.intellij.openapi.application."
                     + PlatformUtils.getPlatformPrefix()
                     + "ConfigImportSettings");
     if (ConfigImportSettings.class.isAssignableFrom(customProviderClass)) {
       return ReflectionUtil.newInstance(customProviderClass);
     }
   } catch (ClassNotFoundException ignored) {
   } catch (RuntimeException ignored) {
   }
   return new ConfigImportSettings();
 }
Exemplo n.º 2
0
 @Nullable
 public static Image loadFromResource(@NonNls @NotNull String s) {
   Class callerClass = ReflectionUtil.getGrandCallerClass();
   if (callerClass == null) return null;
   return loadFromResource(s, callerClass);
 }