> This PR adds a "compile" process instruction to FXML files with the optional > PI data "true" (default) and "false". The > PI data is turned into a boolean value using "Boolean.parseBoolean(String)". > This makes it possible to inject the compile PI everywhere in a FXML file and > turn on and off compilation of scripts if > the scripting engine implements the javax.script.Compilable interface. The PR > adds the ability for a fallback in case > compilation of scripts fails, in which case a warning gets issued about this > fact and evaluation of the script will be > done without compilation. Because of the fallback scripts get compiled with > this version by default. > --------- > ### Progress > - [x] Change must not contain extraneous whitespace > - [x] Commit message must refer to an issue > - [ ] Change must be properly reviewed > > ### Issue > * [JDK-8238080](https://bugs.openjdk.java.net/browse/JDK-8238080): > FXMLLoader: if script engines implement > javax.script.Compilable compile scripts > > > ### Download > `$ git fetch https://git.openjdk.java.net/jfx pull/192/head:pull/192` > `$ git checkout pull/192`
Rony G. Flatscher has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 27 commits: - Updates to meet Kevin's comment in PR 192 as of May 27th. - Merge remote-tracking branch 'upstream/master' into scriptCompilablePIcompileFallback - Reword the compile processing instructions (replace 'Hint' with 'Note:', adjust text to context), remove spurious empty line in script example code. - Document the compile processing instruction for scripts. - Add missing language processing instruction. - Correct typo, replace tabs, remove trailing blanks. - Make sure we test the default behaviour to compile script by leaving out the compile PI. - Revert temporary rename of test method. - Correct ModuleLauncherTest (remove non-existing test), correct formatting. - Always supply the script's filename in the error message first to further ease spotting the location of script exceptions. - ... and 17 more: https://git.openjdk.java.net/jfx/compare/6bd0e22d...7ef1bd68 ------------- Changes: https://git.openjdk.java.net/jfx/pull/192/files Webrev: https://webrevs.openjdk.java.net/jfx/192/webrev.02 Stats: 2545 lines in 29 files changed: 2516 ins; 2 del; 27 mod Patch: https://git.openjdk.java.net/jfx/pull/192.diff Fetch: git fetch https://git.openjdk.java.net/jfx pull/192/head:pull/192 PR: https://git.openjdk.java.net/jfx/pull/192