private static void copyStaticImports(@NotNull PsiElement from,
                                        @NotNull PsiJavaFile destFile,
                                        @NotNull PsiElementFactory elementFactory) {
    PsiJavaFile fromFile = PsiTreeUtil.getParentOfType(from, PsiJavaFile.class);
    if (fromFile != null) {
      PsiImportList sourceImportList = fromFile.getImportList();
      if (sourceImportList != null) {
        PsiImportList destImportList = destFile.getImportList();
        LOG.assertTrue(destImportList != null, "import list of destination file should not be null");
        for (PsiImportStatementBase importStatement : sourceImportList.getAllImportStatements()) {
          if (importStatement instanceof PsiImportStaticStatement && isPublic((PsiImportStaticStatement)importStatement)) {
            PsiElement importStatementCopy = copy((PsiImportStaticStatement)importStatement, elementFactory);
            if (importStatementCopy != null) {
              destImportList.add(importStatementCopy);
            }
            else {
              LOG.warn("Unable to copy static import statement: " + importStatement.getText());
            }
          }
        }
      }
    }
  }
private static void copyStaticImports(@NotNull PsiElement from,
                                        @NotNull PsiJavaFile destFile,
                                        @NotNull PsiElementFactory elementFactory)