public TextBuffer addAllClassTokens(int index, String text, String qualifiedName) {
    if (text.contains("<")) {
      text = text.substring(0, text.indexOf("<"));
    }

    int pos = 0;
    while (text.contains(".") && qualifiedName.substring(pos).contains("$")) {
      int length = text.indexOf(".");
      addClassToken(index, length, qualifiedName.substring(0, qualifiedName.indexOf("$", pos)));
      pos = qualifiedName.indexOf("$", pos) + 1;
      text = text.substring(length + 1);
      index += length + 1;
    }

    if (!text.isBlank()) {
      addClassToken(index, text.length(), qualifiedName);
    }

    return this;
  }
Allows to connect text with resulting lines

@author egor
src/org/jetbrains/java/decompiler/util/TextBuffer.java