public static @NotNull List<? extends @NotNull LocalQuickFix> registerQuickFix(@NotNull FileReference reference) {
    final FileReferenceSet fileReferenceSet = reference.getFileReferenceSet();
    int index = reference.getIndex();

    if (index < 0) return emptyList();
    final String newFileName = reference.getFileNameToCreate();

    // check if we could create file
    if (newFileName.isEmpty() ||
        newFileName.indexOf('\\') != -1 ||
        newFileName.indexOf('*') != -1 ||
        newFileName.indexOf('?') != -1 ||
        SystemInfo.isWindows && newFileName.indexOf(':') != -1) {
      return emptyList();
    }

    PsiElement element = reference.getElement();
    PsiFile containingFile = element.getContainingFile();

    if (fileReferenceSet.isCaseSensitive()) {
      PsiElement psiElement = containingFile == null ? null : reference.innerSingleResolve(false, containingFile);

      if (psiElement != null) {
        String existingElementName = ((PsiNamedElement)psiElement).getName();

        RenameFileReferenceIntentionAction renameRefAction = new RenameFileReferenceIntentionAction(existingElementName, reference);
        RenameFileFix renameFileFix = new RenameFileFix(newFileName);
        return Arrays.asList(renameRefAction, renameFileFix);
      }
    }


    if (reference.isLast()) {
      NewFileLocation location = getNewFileLocation(reference, newFileName, containingFile, false);
      if (location == null) return emptyList();
      return singletonList(new MyCreateFileFix(element, location, reference.getNewFileTemplateName()));
    }
    else {
      NewFileLocation location = getNewFileLocation(reference, newFileName, containingFile, true);
      if (location == null) return emptyList();
      return singletonList(new CreateDirectoryPathFix(element, location));
    }
  }
public static @NotNull List<? extends @NotNull LocalQuickFix> registerQuickFix(@NotNull FileReference reference)