In Oracle's JavaFX Scene Builder it is possible to specify which Java class will be used as the controller for a scene. It's member variables will be populated by the FXMLLoader
with instances of the controls. If the FXML file is in the same directory as the Java files, the Scene Builder can automatically suggest the class to use as controller, and from there, suggest the names of member variables in which a reference to the instance of a specific control should be placed.
When using Maven as a build tool, resource files (like the FXML files) are placed in a different directory than source files (like the Java files). Because of this, the Scene Builder is unable to find the Java file and inspect if for suitable properties.
Is there a ways to the the Scene Builder, where it should look for Java files to inspect?
As of right now, this is not possible. There's a feature request to add the functionality in the future:
https://javafx-jira.kenai.com/browse/DTL-5124
As a workaround, you might be able to configure the maven-resources-plugin
to include your source directory as a resource directory:
http://maven.apache.org/plugins/maven-resources-plugin/
If you're using Gradle and Intellij IDEA 13, be aware of this issue:
http://youtrack.jetbrains.com/issue/IDEA-118280#comment=27-654638
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With