public static void doCopy(PsiElement[] elements, PsiDirectory defaultTargetDirectory) {
    if (elements.length == 0) return;
    Project project = elements[0].getProject();
    for(CopyHandlerDelegate delegate: CopyHandlerDelegate.EP_NAME.getExtensionList()) {
      if (delegate.canCopy(elements)) {
        if (!DumbService.getInstance(project).isUsableInCurrentContext(delegate)) {
          DumbService.getInstance(project).showDumbModeNotificationForFunctionality(
            RefactoringBundle.message("refactoring.dumb.mode.notification"),
            DumbModeBlockedFunctionality.Refactoring);
          return;
        }
        //todo warn that something can be broken https://youtrack.jetbrains.com/issue/IJPL-402
        delegate.doCopy(elements, defaultTargetDirectory);
        break;
      }
    }
  }
public static void doCopy(PsiElement[] elements, PsiDirectory defaultTargetDirectory)