Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Update to JDK 16

AuthorDaveJarvis <email>
Date2021-04-07 19:32:29 GMT-0700
Commit4520ee8a46defb88cc3f303a71ed2c602f614c8b
Parent7d771ba
BUILD.md
Download and install the following software packages:
-* [OpenJDK 14.0.2](https://openjdk.java.net) (full JDK, including JavaFX)
-* [Gradle 6.4](https://gradle.org/releases)
+* [OpenJDK 16](https://openjdk.java.net) (full JDK, must include JavaFX)
+* [Gradle 7.0](https://services.gradle.org/distributions)
* [Git 2.28.0](https://git-scm.com/downloads)
build.gradle
javafx {
- version = "15"
+ version = "16"
modules = ['javafx.controls', 'javafx.swing']
configuration = 'compileOnly'
}
dependencies {
- def v_junit = '5.5.2'
+ def v_junit = '5.7.1'
def v_flexmark = '0.62.2'
def v_jackson = '2.12.2'
application {
applicationName = config["application.title"].toLowerCase()
- mainClassName = "com.${applicationName}.Main"
+ mainClass.set("com.${applicationName}.Main")
applicationDefaultJvmArgs = [
"--add-opens=javafx.controls/javafx.scene.control=ALL-UNNAMED",
"--add-opens=javafx.controls/javafx.scene.control.skin=ALL-UNNAMED",
"--add-opens=javafx.graphics/com.sun.javafx.css=ALL-UNNAMED",
+ "--add-exports=javafx.graphics/com.sun.javafx.application=ALL-UNNAMED",
]
}
test {
useJUnitPlatform()
+
+ doFirst {
+ jvmArgs = [
+ '--add-exports', "javafx.base/com.sun.javafx.event=ALL-UNNAMED",
+ ]
+
+ classpath = files()
+ }
testLogging {
src/main/java/com/keenwrite/editors/TextEditor.java
*
* @param indexes Document offset where style is to start and end.
- * @param style The style class to apply between the given offset indexes.
+ * @param style The style class to apply between the given offset indexes.
*/
default void stylize( final IndexRange indexes, final String style ) {
* Requests making the selected text, or word at caret, bold.
*/
- default void bold() {
- }
+ default void bold() { }
/**
* Requests making the selected text, or word at caret, italic.
*/
- default void italic() {
- }
+ default void italic() { }
/**
* Requests making the selected text, or word at caret, a superscript.
*/
- default void superscript() {
- }
+ default void superscript() { }
/**
* Requests making the selected text, or word at caret, a subscript.
*/
- default void subscript() {
- }
+ default void subscript() { }
/**
* Requests making the selected text, or word at caret, struck.
*/
- default void strikethrough() {
- }
+ default void strikethrough() { }
/**
* Requests making the selected text, or word at caret, a blockquote block.
*/
- default void blockquote() {
- }
+ default void blockquote() { }
/**
* Requests making the selected text, or word at caret, inline code.
*/
- default void code() {
- }
+ default void code() { }
/**
* Requests making the selected text, or word at caret, a fenced code block.
*/
- default void fencedCodeBlock() {
- }
+ default void fencedCodeBlock() { }
/**
* Requests making the selected text, or word at caret, a heading.
*
* @param level The heading level to apply (typically 1 through 3).
*/
- default void heading( final int level ) {
- }
+ default void heading( final int level ) { }
/**
* Requests making the selected text, or word at caret, an unordered list
* block.
*/
- default void unorderedList() {
- }
+ default void unorderedList() { }
/**
* Requests making the selected text, or word at caret, an ordered list block.
*/
- default void orderedList() {
- }
+ default void orderedList() { }
/**
* Requests making the selected text, or inserting at the caret, a
* horizontal rule.
*/
- default void horizontalRule() {
- }
+ default void horizontalRule() { }
}
src/main/java/com/keenwrite/ui/actions/ApplicationActions.java
selection.ifPresent( ( file ) -> {
+ final var path = file.toPath();
+ final var document = editor.getText();
+ final var context = main.createProcessorContext( path, format );
+
final var task = new Task<Path>() {
@Override
protected Path call() throws Exception {
- final var path = file.toPath();
- final var doc = editor.getText();
- final var context = main.createProcessorContext( path, format );
final var chain = createProcessors( context );
- final var export = chain.apply( doc );
+ final var export = chain.apply( document );
// Processors can export binary files. In such cases, processors
}
- public void file‿export‿pdf() { file‿export( APPLICATION_PDF ); }
+ public void file‿export‿pdf() {
+ file‿export( APPLICATION_PDF );
+ }
public void file‿export‿html_svg() {
Delta35 lines added, 35 lines removed