When Scene Builder Kit is part of a modular runtime image, the library explorer can find other modules in such image that might have custom controls to be discovered.
Currently, there is a JarExplorer and a FolderExplorer, but when dealing with modules, we need a ModuleExplorer implementation.
Expected Behavior
The module can be explored for classes in the exported packages that could be imported as custom controls.
Current Behavior
There is an exception if a module is explored.
For instance, if ControlsFX is part of the modular image (that is, it is included in the modules file), its path is /modules/org.controlsfx.controls, and when the library explorer tries to read it:
INFO: Start exploring JAR /modules/org.controlsfx.controls
Exception in thread "LibraryFolderWatcher(~/Library/Application Support/Scene Builder/Library)" java.lang.UnsupportedOperationException
at java.base/jdk.internal.jrtfs.JrtPath.toFile(Unknown Source)
at com.gluonhq.scenebuilder.kit@24.0.0-SNAPSHOT/com.oracle.javafx.scenebuilder.kit.library.util.FolderExplorer.lambda$explore$0(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$2$1.accept(Unknown Source)
at java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
at java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp.evaluateSequential(Unknown Source)
at java.base/java.util.stream.ForEachOps$ForEachOp$OfRef.evaluateSequential(Unknown Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown Source)
at java.base/java.util.stream.ReferencePipeline.forEach(Unknown Source)
at com.gluonhq.scenebuilder.kit@24.0.0-SNAPSHOT/com.oracle.javafx.scenebuilder.kit.library.util.FolderExplorer.explore(Unknown Source)
at com.gluonhq.scenebuilder.kit@24.0.0-SNAPSHOT/com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.exploreAndUpdateLibrary(Unknown Source)
at com.gluonhq.scenebuilder.kit@24.0.0-SNAPSHOT/com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.runDiscovery(Unknown Source)
at com.gluonhq.scenebuilder.kit@24.0.0-SNAPSHOT/com.oracle.javafx.scenebuilder.kit.library.user.LibraryFolderWatcher.run(Unknown Source)
at java.base/java.lang.Thread.run(Unknown Source)
When Scene Builder Kit is part of a modular runtime image, the library explorer can find other modules in such image that might have custom controls to be discovered.
Currently, there is a
JarExplorer
and aFolderExplorer
, but when dealing with modules, we need aModuleExplorer
implementation.Expected Behavior
The module can be explored for classes in the exported packages that could be imported as custom controls.
Current Behavior
There is an exception if a module is explored.
For instance, if ControlsFX is part of the modular image (that is, it is included in the
modules
file), its path is/modules/org.controlsfx.controls
, and when the library explorer tries to read it:Context