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.makeSyntaxTextAreaWithSearch = -> new RSyntaxTextAreaWithSearch(new RSyntaxTextArea(1, 10) { public org.fife.ui.rsyntaxtextarea.TokenToken modelToToken(int ofs) { var token = super.modelToToken(ofs); printVars("modelToToken", +ofs, +token); ret token; } }); editor.adaptSyntaxTextArea = textArea -> { ((RSyntaxDocument) textArea.getDocument()).setSyntaxStyle(new HashRefTokenMaker); textArea.addHyperlinkListener(evt -> { print("Hyperlink event"); if (evt.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { infoBox("Link URL: " + evt.getURL()); } }); }; ret withTopAndBottomMargin(jRaisedCenteredSection("Project Story", editor.visualize() )); } }