@Override
  public @NotNull String substitute(@NotNull String text, boolean caseSensitive) {
    if (Strings.isEmpty(text)) {
      return text;
    }

    int startPos = -1;
    if (text.charAt(0) == '$') {
      startPos = 0;
    }
    else {
      for (String protocol : PathMacroProtocolHolder.getProtocols()) {
        if (text.length() > protocol.length() + 4 && text.startsWith(protocol) && text.charAt(protocol.length()) == ':') {
          startPos = protocol.length() + 1;
          if (text.charAt(startPos) == '/') startPos++;
          if (text.charAt(startPos) == '/') startPos++;
        }
      }
    }
    if (startPos < 0) {
      return text;
    }

    myMatcher.reset(text).region(startPos, text.length());
    if (myMatcher.lookingAt()) {
      myMacroMap.put(myMatcher.group(1), null);
    }

    return text;
  }
@Override
  public @NotNull String substitute(@NotNull String text, boolean caseSensitive)