srecord noeq G22ProjectStoryEditor(G22Utils g22utils) { JSyntaxTextFileEditor editor; File textFile() { ret g22utils.projectStoryTextFile(); } IVarWithNotify varText() { ret textFileAsVarWithNotify(textFile()); } cachedVisualize { editor = new JSyntaxTextFileEditor(textFile()).autoSave(true); editor.adaptSyntaxTextArea = textArea -> { ((RSyntaxDocument) textArea.getDocument()).setSyntaxStyle(new HashRefTokenMaker); textArea.getSyntaxScheme().setStyle(org.fife.ui.rsyntaxtextarea.Token.WHITESPACE, new org.fife.ui.rsyntaxtextarea.Style(Color.black)); }; editor.visualize(); var ta = editor.textArea(); onLeftClick(ta, (IVF1) pt -> { int ofs = ta.viewToModel2D(toPoint(pt)); LS tok = hashRefTok(ta.getText()); int iTok = charToTokenIndex_left(tok, ofs); if (iTok >= 0 && odd(iTok)) { S t = tok.get(iTok); S url = deRoundBracket(dropPrefix("#", t)); g22utils.projectActions.openPathInProject(url); //infoBox("Link URL: " + url); } }); ret withTopAndBottomMargin(jRaisedCenteredSection("Project Story", editor.visualize() )); } }