Uploaded image for project: 'NetBeans'
  1. NetBeans
  2. NETBEANS-4764

EmptyFXML wizard does not fixup module-info as needed

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • javafx - Project

    Description

      To reproduce:
      (note insure JavaFX 2 plugin is active otherwise JavaFX>EmptyFXML is not available)

      1. File >New Project >Java with Maven >FXML JavaFx Maven Archetype (Gluon) >....
      2. File >New File > other > JavaFX > Empty FXML
      3. Next
      4. Checkbox Use Java Controllers
      5. Put the controller in package "newpackage"
      6. Finish

      Notice that the file FXML.java in the editor shows an error

      Class does not exist: newpackage.FXMLController
      

      Things compile but if you try to use the new controller/fxml there is a runtime error.

       The problem is fixed by adding these lines to moduleinfo

              opens newpackage to javafx.fxml;
              exports newpackage;
      

      This should be done automatically by the wizard.

      Notice that after adding these lines, the editor error indication in the fxml file goes away.

      Attachments

        Activity

          People

            Unassigned Unassigned
            errael Ernie Rael
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated: