Collections.sort(features);
SwingUtilities.invokeAndWait(new Runnable() {
@Override
public void run() {
new FeatureSelectionDialog(ProgressDialog.getLastDialog(), features).setVisible(true);
}
});
for (Feature feature : features) {
featuresCache.getSelected().put(Strings.nullToEmpty(feature.getName()), feature.isSelected());