diff --git a/build.gradle b/build.gradle index 0c95655..61c91a2 100644 --- a/build.gradle +++ b/build.gradle @@ -16,8 +16,10 @@ wrapper { sourceCompatibility = '11' targetCompatibility = '11' +[compileJava, compileTestJava]*.options*.release = 11 [compileJava, compileTestJava]*.options*.encoding = 'UTF-8' + repositories { jcenter() } diff --git a/gradle/project-info.gradle b/gradle/project-info.gradle index fc806dc..f415f75 100644 --- a/gradle/project-info.gradle +++ b/gradle/project-info.gradle @@ -3,7 +3,7 @@ // ----------------------------------------------------------------------------- ext.publishing.artifactId = project.name.toLowerCase() ext.publishing.groupId = 'eu.mihosoft.monacofx' -ext.publishing.versionId = '0.0.6' +ext.publishing.versionId = '0.0.7' ext.publishing.developerName = 'Michael Hoffer' ext.publishing.developerAlias = 'miho' diff --git a/src/main/java/eu/mihosoft/monacofx/Document.java b/src/main/java/eu/mihosoft/monacofx/Document.java index f7f84d2..573553d 100644 --- a/src/main/java/eu/mihosoft/monacofx/Document.java +++ b/src/main/java/eu/mihosoft/monacofx/Document.java @@ -61,7 +61,7 @@ void setEditor(WebEngine engine, JSObject window, JSObject editor) { if(text!=null) { try { updatingText = true; - setText(text); + textProperty().set(text); }finally { updatingText=false; } @@ -80,7 +80,17 @@ public StringProperty textProperty() { } public void setText(String text) { - textProperty().set(text); + if(editor==null) { + textProperty.set(text); + } else { + try { + updatingText = true; + textProperty().set(text); + }finally { + updatingText=false; + } + editor.call("setValue", text); + } } public String getText() {