svoid g22_adaptSyntaxTextAreaForHashRefs(RSyntaxTextArea ta, G22Utils g22utils) { delegate Token to org.fife.ui.rsyntaxtextarea. delegate Style to org.fife.ui.rsyntaxtextarea. onLeftClick(ta, (IVF1) pt -> { int ofs = ta.viewToModel2D(toPoint(pt)); LS tok = hashRefTok(ta.getText()); int iTok = charToTokenIndex_left(tok, ofs); if (odd(iTok) && inRange(iTok, tok)) { S t = tok.get(iTok); S url = deRoundBracket(dropPrefix("#", t)); g22utils.projectActions.openPathInProject(url); //infoBox("Link URL: " + url); } }); ((RSyntaxDocument) ta.getDocument()).setSyntaxStyle(new HashRefTokenMaker); // Set the token types we use to black for (token : ll(Token.WHITESPACE, Token.IDENTIFIER)) ta.getSyntaxScheme().setStyle(token, new Style(Color.black)); }