please include class RSyntaxTextArea. import org.fife.ui.rsyntaxtextarea.TokenMakerBase; sclass HashRefTokenMaker extends TokenMakerBase { delegate Token to org.fife.ui.rsyntaxtextarea. /** * Returns a list of tokens representing the given text. * * @param text The text to break into tokens. * @param startTokenType The token with which to start tokenizing. * @param startOffset The offset at which the line of tokens begins. * @return A linked list of tokens representing text. */ @Override public Token getTokenList(Segment text, int startTokenType, final int startOffset) { resetTokenList(); char[] array = text.array; int offset = text.offset; int count = text.count; int end = offset + count; int newStartOffset = startOffset - offset; S src = str(array, offset, count); LS tok = hashRefTok(src); int ofs = offset; for i, t over tok: { if (empty(t)) continue; int l = l(t); bool isHyperlink = odd(i); var tokenType = isHyperlink ? Token.VARIABLE : Token.WHITESPACE; // ?? addToken(array, ofs, ofs+l, tokenType, ofs+newStartOffset, isHyperlink); ofs += l; } addNullToken(); // Return the first token in our linked list. ret firstToken; } }