* <p>
* Note that calling this method marks all those plug-in customizations
* as 'used'. So call it only when it's really necessary.
*/
public CCustomizations toCustomizationList() {
CCustomizations r=null;
for( BIDeclaration d : this ) {
if(d instanceof BIXPluginCustomization) {
BIXPluginCustomization pc = (BIXPluginCustomization) d;
pc.markAsAcknowledged();
if(!Ring.get(Model.class).options.pluginURIs.contains(pc.getName().getNamespaceURI()))
continue; // this isn't a plugin customization
if(r==null)
r = new CCustomizations();
r.add(new CPluginCustomization(pc.element,pc.getLocation()));
}
}
if(r==null) r = CCustomizations.EMPTY;
return new CCustomizations(r);
}