Module (String path, @Nullable Project project, Consumer<? super Step> adjuster, ProjectImportProvider[] providers) { VirtualFile file = LocalFileSystem.getInstance().refreshAndFindFileByPath(path); assertNotNull("Can't find " + path, file); assertTrue(providers[0].canImport(file, project)); //noinspection unchecked setWizard((T)ImportModuleAction.createImportWizard(project, null, file, providers)); assertNotNull(myWizard); if (myWizard.getStepCount() > 0) { runWizard(adjuster); } return ContainerUtil.getFirstItem(ImportModuleAction.createFromWizard(project, myWizard)); }