public static @Nonnull Cloud createCloudWithoutInitializing(BugCollection bc) {
CloudPlugin plugin = getCloudPlugin(bc);
if (plugin == null) {
LOGGER.log(Level.FINE, "default cloud " + DEFAULT_CLOUD + " not registered");
return getPlainCloud(bc);
}
LOGGER.log(Level.FINE, "Using cloud plugin " + plugin.getId());
try {
Class<? extends Cloud> cloudClass = plugin.getCloudClass();
Properties properties = bc.getProject().getCloudProperties();
Constructor<? extends Cloud> constructor = cloudClass.getConstructor(CloudPlugin.class, BugCollection.class,
Properties.class);
Cloud cloud = constructor.newInstance(plugin, bc, properties);
if (DEBUG) {
bc.getProject().getGuiCallback().showMessageDialog("constructed " + cloud.getClass().getName());
}
LOGGER.log(Level.FINE, "constructed cloud plugin " + plugin.getId());
if (!cloud.availableForInitialization()) {
handleInitializationException(bc, plugin,
new IllegalStateException(cloud.getClass().getName() + " cloud " + plugin.getId()+ " doesn't have information needed for initialization"));
}
return cloud;
} catch (InvocationTargetException e) {
return handleInitializationException(bc, plugin, e.getCause());
} catch (Exception e) {
return handleInitializationException(bc, plugin, e);
}
}