MCPcopy Index your code
hub / github.com/badvision/jace / createEditor

Method createEditor

src/main/java/jace/ide/Program.java:137–144  ·  view source on GitHub ↗
(boolean isBlank)

Source from the content-addressed store, hash-verified

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()) {

Callers 1

initEditorMethod · 0.95

Calls 5

getHandlerMethod · 0.95
getFileContentsMethod · 0.95
buildOptionsMethod · 0.95
setValueMethod · 0.95
getNewDocumentContentMethod · 0.65

Tested by

no test coverage detected