if (!(overlayDesign.getSource() instanceof FileSystemDesignSource)) {
throw new WGADesignConfigurationException("Overlay designs can only be file system designs");
}
PluginDesignProvider original = (PluginDesignProvider) originalDesign.createDesignProvider(db, originalOptions);
FileSystemDesignProvider overlay = (FileSystemDesignProvider) overlayDesign.createDesignProvider(db, overlayOptions);
OverlayDesignProvider provider = new OverlayDesignProvider(core, db, overlay, original);
db.setDesignProvider(provider);
db.setAllowDesignModification(false);
core.getLog().info("Application " + db.getDbReference() + " uses design \"" + original.getName() + "\" with overlay \"" + overlay.getName() + "\"");
}
catch (Exception e) {
throw new WGADesignConfigurationException("Exception applying overlay design", e);
}