void (@NotNull WizardContext context) { String pathToUse = getFileToImport(); VirtualFile file = LocalFileSystem.getInstance().refreshAndFindFileByPath(pathToUse); if (file != null && !file.isDirectory() && file.getParent() != null) { pathToUse = file.getParent().getPath(); } final ImportFromGradleControl importFromGradleControl = getControl(context.getProject()); importFromGradleControl.setLinkedProjectPath(pathToUse); }