private void doDrop(@NotNull DropContext dropContext, boolean externalDrop) {
      @Nullable PsiElement target = dropContext.targetElement();
      PsiElement @Nullable [] sources = getPsiElements(dropContext);
      if (target == null || sources == null) return;

      if (!myProject.isInitialized()) {
        Messages.showMessageDialog(myProject, LangBundle.message("dialog.message.move.refactoring.available"),
                                   LangBundle.message("dialog.title.project.initialization"), null);
        return;
      }

      Module module = dropContext.targetModule();
      final DataContext dataContext = DataManager.getInstance().getDataContext(myTree);
      PsiDocumentManager.getInstance(myProject).commitAllDocuments();

      if (!target.isValid()) return;
      for (PsiElement element : sources) {
        if (!element.isValid()) return;
      }

      DataContext context = CustomizedDataContext.withSnapshot(externalDrop ? DataContext.EMPTY_CONTEXT : dataContext, sink -> {
        sink.set(LangDataKeys.TARGET_MODULE, module);
        sink.set(LangDataKeys.TARGET_PSI_ELEMENT, target);
      });
      getActionHandler().invoke(myProject, sources, context);
    }
private void doDrop(@NotNull DropContext dropContext, boolean externalDrop)