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

refactor move class to new package doesn't update module-info.java

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Major
    • Resolution: Unresolved
    • None
    • None
    • java - Refactoring

    Description

      This requires a java version supporting java modules. This is not a javafx only problem, but javafx provides a convenient example. Note that controllers in javafx that are referenced from xxx.fxml files must be export for reflection

      To recreate

      • NewProject > JavaWithMaven > FXML JavaFX Maven Archetype (Gluon)
      • Open module-info.java
        Observe the package containing the controller is exported to javafx.fxml
      • PrimaryController.java Refactor>Move to another package
        (May make App.java's setRoot public)
        Observe no warning that PrimaryController is no longer acessible and/or that module-info.java has not been updated
      • Before the move, PrimaryController was available for reflection from javafx.fxml, after the move it is not.

      A warning and/or checkbox to update module-info.java so the class may still be accessed through reflection seems appropriate

      NETBEANS-4765 is loosly related.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated: