Skip to content

Java command line application that checks a Java controller file for certain items based on a fxml file

Notifications You must be signed in to change notification settings

tataDan/CheckFxmlControllerFile

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

11 Commits
 
 
 
 
 
 

Repository files navigation

CheckFxmlControllerFile is a Java command line application the takes exactly two arguments. It is used as follows:

Java -jar CheckFxmlControllerFile.jar path_to_fxml_file path_to_controller_file.

It parses the fxml file and searches for elements that have "fx_id" and "onAction" attributes. It then searches the corresponding Java controller file to determine whether or not it correctly reflects the relevant values of those elements.

For example, if the fxml file contains this code:

<TextField fx:id="textField" onAction="#handleTextFieldAction" prefWidth="168.0" />,

then the application will search the controller file for something similar to this:

@FXML private TextField textField; and this:

@FXML private void handleTextFieldAction() ...

It outputs to the console the number of missing items and a list of the missing items. For example:

0 MISSING ITEMS:

or

2 MISSING ITEMS:

handleButtonAction

TextField textField

About

Java command line application that checks a Java controller file for certain items based on a fxml file

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages