public static @Nullable NewFileLocation getNewFileLocation(@NotNull FileReference reference,
                                                             String newFileName,
                                                             boolean isDirectory) {
    return getNewFileLocation(reference, newFileName, reference.getElement().getContainingFile(), isDirectory);
  }
public static @Nullable NewFileLocation getNewFileLocation(@NotNull FileReference reference,
                                                             String newFileName,
                                                             boolean isDirectory)