(boolean isBlank)
| 135 | } |
| 136 | |
| 137 | public void createEditor(boolean isBlank) { |
| 138 | String document = targetFile == null ? isBlank ? "" : getHandler().getNewDocumentContent() : getFileContents(targetFile); |
| 139 | String optionString = buildOptions(); |
| 140 | editor.getEngine().executeScript("var codeMirror = CodeMirror(document.body, " + optionString + ");"); |
| 141 | codeMirror = (JSObject) editor.getEngine().executeScript("codeMirror"); |
| 142 | Platform.runLater(() -> setValue(document)); |
| 143 | // setValue(document); |
| 144 | } |
| 145 | |
| 146 | public String getFileContents(File sourceFile) { |
| 147 | if (sourceFile != null && sourceFile.exists() && sourceFile.isFile()) { |
no test coverage detected