public void setFeaturesService(FeaturesService featuresService) {
this.featuresService = featuresService;
}
public int complete(final String buffer, final int cursor, final List candidates) {
StringsCompleter delegate = new StringsCompleter();
try {
for (Feature feature : featuresService.listFeatures()) {
if (!featuresService.isInstalled( feature )) {
delegate.getStrings().add(feature.getName());
}
}
} catch (Exception e) {
// Ignore
}
return delegate.complete(buffer, cursor, candidates);
}