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); 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)); infoBox("Link URL: " + url); } }); ret withTopAndBottomMargin(jRaisedCenteredSection("Project Story", editor.visualize() )); } }