feature = getFeature(geoResource, toFilter(obj, monitor));
if (feature != null) {
final IHotlinkSource hotlinkSource = toSource(geoResource, IHotlinkSource.class, monitor);
isHotlinkEnabled = hotlinkSource != null && hotlinkSource.isEnabled();
final IAttachmentSource attachmentSource = toSource(geoResource, IAttachmentSource.class, monitor);
isFeatureEnabled = attachmentSource != null && attachmentSource.isEnabled();
if (isFeatureEnabled || isHotlinkEnabled) {
final String featureLabel = getFeatureLabel(geoResource, feature);
final IDocumentFolder folder = ShpDocFactory.createFolder(feature, featureLabel, attachmentSource);
if (isFeatureEnabled) {
// Set so that source's document list is same with folder's
folder.setDocuments(attachmentSource.getDocuments(feature, monitor));
}
if (isHotlinkEnabled) {
folder.insertDocuments(hotlinkSource.getDocuments(feature, monitor), 0);
}
items.add(folder);