void (@NotNull AnActionEvent e) { final VirtualFile[] files = e.getData(CommonDataKeys.VIRTUAL_FILE_ARRAY); final Project project = getEventProject(e); if (files == null || project == null) return; try { final ModifiableModuleModel model = ModuleManager.getInstance(project).getModifiableModel(); for (VirtualFile file : files) { model.loadModule(file.getPath()); } WriteAction.run(() -> model.commit()); } catch (Exception ex) { LOG.info(ex); Messages.showErrorDialog(project, LangBundle.message("dialog.message.cannot.import.module", ex.getMessage()), CommonBundle.getErrorTitle()); } }