NamePathComponent (WizardContext context) { NamePathComponent component = new NamePathComponent( IdeBundle.message("label.project.name"), IdeBundle.message("label.project.files.location"), JavaUiBundle.message("title.select.project.file.directory", IdeCoreBundle.message("project.new.wizard.project.identification")), JavaUiBundle.message("description.select.project.file.directory", StringUtil.capitalize(IdeCoreBundle.message("project.new.wizard.project.identification"))), true, false ); String baseDir = context.getProjectFileDirectory(); String projectName = context.getProjectName(); String initialProjectName = projectName != null ? projectName : ProjectWizardUtil.findNonExistingFileName(baseDir, "untitled", ""); component.setPath(projectName == null ? (baseDir + File.separator + initialProjectName) : baseDir); component.setNameValue(initialProjectName); component.getNameComponent().select(0, initialProjectName.length()); return component; }