Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

WIP add compile PI: 8238080: FXMLLoader: if script engines implement javax.script.Compilable compile scripts #187

Closed
wants to merge 15 commits into from

Conversation

ronyfla
Copy link
Contributor

@ronyfla ronyfla commented Apr 17, 2020

This WIP 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.

This version builds upon #129.


Progress

  • Change must not contain extraneous whitespace
  • Commit message must refer to an issue
  • Change must be properly reviewed

Download

$ git fetch https://git.openjdk.java.net/jfx pull/187/head:pull/187
$ git checkout pull/187

@bridgekeeper
Copy link

bridgekeeper bot commented Apr 17, 2020

👋 Welcome back ronyfla! A progress list of the required criteria for merging this PR into master will be added to the body of your pull request.

@ronyfla
Copy link
Contributor Author

ronyfla commented Apr 22, 2020

============================ test units for: compile PI

tests/system/src/testscriptapp2/java/mymod/myapp2/FXMLScriptDeployment2Compile_Off.java
... no compile PI given, starts out to not compile scripts by default, therefore no script gets compiled; each script code starts with "demo_02_"

tests/system/src/testscriptapp2/resources/mymod/myapp2/demo_02_off.fxml
... no compile PI given, starts out to not compile scripts by default, therefore no script gets compiled


tests/system/src/testscriptapp2/java/mymod/myapp2/FXMLScriptDeployment2Compile_Off_On.java
... alternatively uses compile PI to turn compilation off and on; the script code starts alternatively with "demo_02_" and "RgfPseudoCompiledScript.eval(", depending on the state set with the PI

tests/system/src/testscriptapp2/resources/mymod/myapp2/demo_02_off_on.fxml
... starts out explicitly with "" switching the state after each element containing a script


tests/system/src/testscriptapp2/java/mymod/myapp2/FXMLScriptDeployment2Compile_On.java
... uses PI "compile true" such that no script gets compiled; each script code starts with "RgfPseudoCompiledScript.eval("

tests/system/src/testscriptapp2/resources/mymod/myapp2/demo_02_on.fxml
... uses PI "" (this PI defaults to true as if "" was given) to turn on compilation of scripts


tests/system/src/testscriptapp2/java/mymod/myapp2/FXMLScriptDeployment2Compile_On_Off.java
... alternatively uses compile PI to turn compilation on and off; the script code starts alternatively with "RgfPseudoCompiledScript.eval(", and "demo_02_" depending on the state set with the PI

tests/system/src/testscriptapp2/resources/mymod/myapp2/demo_02_on_off.fxml
... starts out explicitly with "" switching the state after each element containing a script (sometimes using PI "" to test setting it to true)

@ronyfla ronyfla closed this May 12, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant