private static String @NotNull [] getPathToReferencePart(FileReference reference) {
    if (reference.getIndex() == 0) {
      return ArrayUtil.EMPTY_STRING_ARRAY;
    }

    FileReference[] references = reference.getFileReferenceSet().getAllReferences();
    String[] path = new String[reference.getIndex()];
    for (int i = 0; i < reference.getIndex(); i++) {
      path[i] = references[i].getFileNameToCreate();
    }
    return path;
  }
private static String @NotNull [] getPathToReferencePart(FileReference reference)