I am working on the implementation of the ControlsFX autocompletion/suggestion in a small JavaFX desktop application.
I am unable to compile following code:
SuggestionProvider<String> provider = SuggestionProvider.create(list);
AutoCompletionBinding acbLogin = TextFields.bindAutoCompletion(searchField, t -> {
new AutoCompletionTextFieldBinding<>(searchField, provider);return list.stream().filter(elem -> {
return elem.toLowerCase().startsWith(t.getUserText().toLowerCase());
}).collect(Collectors.toList());
});
Getting following error
cannot access class impl.org.controlsfx.autocompletion.SuggestionProvider (in module org.controlsfx.controls) because module org.controlsfx.controls does not export impl.org.controlsfx.autocompletion to module com.example.test
Got a similar error when I implemented ControlsFX AutoCompletion
library and could fix it with following code in the pom.xml in the maven-plugin-section
<options>
<option>-XX:+UseG1GC</option>
<option>--add-exports</option>
<option>javafx.base/com.sun.javafx.event=org.controlsfx.controls</option>
</options>
Any ideas if there is similar troubleshooting available? Appreciate your help. Many thanks.