You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@netbeans.apache.org by Ernie Rael <er...@raelity.com> on 2020/08/18 18:04:52 UTC

NewFile>EmptyFXML, dialog problems and/or module problems

(related to problems with modules)

An issue was filed a couple days ago

    https://issues.apache.org/jira/browse/NETBEANS-4718
    The default package for generated FXML file in maven based JavaFx
    application is not detected

I took a brief look at the behavior and added some comments to the 
issue. There seem to be two problems

 1. Poor defaults in package combo boxes (one for .fxml, one for controller)
 2. The defaults produce code that has a startup exception

The 2nd first. When execution fails the exception has in part

    Error occurred during initialization of boot layer
    java.lang.module.FindException: Error reading module:
    C:\f\tmp\fxml-bug\target\classes
    Caused by: java.lang.module.InvalidModuleDescriptorException:
    FXMLController.class found in top-level directory (unnamed package
    not allowed in module)

So I guess in this case, the unnamed package can not be used. So it 
doesn't seem like it should be available as an option; the dialogs 
validator can flag that as an error. This may relate to the recent 
discussion on IDE handling of modules to know when the default package 
is illegal.

This is much less of a problem if a package from the project is used as 
a default. Even if I bring up the context menu when the cursor is over a 
package, the selected package is not used. I seem to recall that in some 
situations, the cursor matters.

If someone can offer some hints

  * an example of when the selected package influences the package that
    shows up by default in the combo box
  * how best to determine if the default package is legal

then I can take a look.

-ernie


---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@netbeans.apache.org
For additional commands, e-mail: dev-help@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists