eclipse-efx / efxclipse-eclipse

Eclipse Public License 2.0
15 stars 5 forks source link

Synchronizing Controllers and FXML file automatically #13

Open OlivierAlves opened 7 years ago

OlivierAlves commented 7 years ago

Good morning,

Here is a new the issue related to this topic on eclipse community forum: Check topic here

While developing a small Eclipse plugin for our developers, we implemented a feature that allows to generate missing FXML fields and handlers in the associated controller.

The option is called at the moment "Generate missing FXML Fields and Handlers" and is accessible in the "Source" popup menu when right-clicking on the Controller class.

At the moment we rely on a naming convention for both controller and FXML i.e. an FXML file called Xyz.fxml is expected to have XyzController.java in the same package. Like this, from the controller name one can find out the associated FXML file. Not having a specific naming convention would require an additional dialog for the user to select the FXML file.

It supports generation of fields (from elements having fx:id attribute), event handlers (e.g. onAction, onMouseDragOver, etc), property change listeners and observable collections change listeners. All of them having FXML annotation and default (package) access.

Please let us know how to proceed.

Cheers, Olivier

tomsontom commented 7 years ago

@OlivierAlves could you provide a pull request for this feature? Just in case can we somehow Combine this with the "Generate Controller" command?

jprie commented 5 years ago

Hey! I was wondering, if that feature eventually made it into the release version. From what I read here, it doesn't look like it... is there any further development planned? I'm currently teaching JavaFX at an institute and I think this feature could improve adoption among people new to the topic of JavaFX-MVC-based development. Please let me know! Johannes

tomsontom commented 5 years ago

as no PR has ever been provided no this feature is not available