site = new FeatureSiteImpl(); // represents whatever is current?
}
List<FeaturePanelTabDescriptor> result = new ArrayList<FeaturePanelTabDescriptor>();
for( FeaturePanelTabDescriptor descriptor : descriptors ) {
FeaturePanelEntry entry = descriptor.getEntry();
if (entry == null) {
continue; // that is wrong!
}
if (entry.isMatch(schema)) {
result.add(descriptor);
} else if (entry.isChecked(site)) {
result.add(descriptor);
}
}
if (result.size() == 0) {
return EMPTY_DESCRIPTOR_ARRAY;