private @NlsContexts.Label String getDisplayInfoInternal(boolean showPackageInfo, int totalTextLength) {
    if (isValid()) {
      final int lineNumber = getLineIndex() + 1;
      final int columnNumber = getColumnNumberOrZero();
      String className = getClassName();
      final boolean hasClassInfo = className != null && !className.isEmpty();
      final String methodName = myMethodName;
      final String displayName = methodName != null ? methodName + "()" : null;
      final boolean hasMethodInfo = displayName != null;
      if (hasClassInfo || hasMethodInfo) {
        final StringBuilder info = new StringBuilder();
        boolean isFile = getFileName().equals(className);
        String packageName = null;
        if (hasClassInfo) {
          final int dotIndex = className.lastIndexOf(".");
          if (dotIndex >= 0 && !isFile) {
            packageName = className.substring(0, dotIndex);
            className = className.substring(dotIndex + 1);
          }

          if (totalTextLength != -1) {
            if (className.length() + (hasMethodInfo ? displayName.length() : 0) > totalTextLength + 3) {
              int offset = totalTextLength - (hasMethodInfo ? displayName.length() : 0);
              if (offset > 0 && offset < className.length()) {
                className = className.substring(className.length() - offset);
                info.append("...");
              }
            }
          }

          info.append(className);
        }
        if (hasMethodInfo) {
          if (isFile) {
            info.append(":");
          }
          else if (hasClassInfo) {
            info.append(".");
          }
          info.append(displayName);
        }
        if (showPackageInfo && packageName != null) {
          info.append(" (").append(packageName).append(")");
        }
        if (columnNumber > 0) {
          return JavaDebuggerBundle.message("line.breakpoint.display.name.with.column.and.class.or.method",
                                            lineNumber, columnNumber, info.toString());
        } else {
          return JavaDebuggerBundle.message("line.breakpoint.display.name.with.class.or.method",
                                            lineNumber, info.toString());
        }
      }
      if (columnNumber > 0) {
        return JavaDebuggerBundle.message("line.breakpoint.display.name.with.column", lineNumber, columnNumber);
      } else {
        return JavaDebuggerBundle.message("line.breakpoint.display.name", lineNumber);
      }
    }
    return JavaDebuggerBundle.message("status.breakpoint.invalid");
  }
private @NlsContexts.Label String getDisplayInfoInternal(boolean showPackageInfo, int totalTextLength)