{"record":{"id":"f17bc42806c6fa2d","repo":"JetBrains/intellij-community","slug":"enter-0-file-location-f17bc4","errorCode":null,"errorMessage":"Enter {0} file location","messagePattern":"Enter (.+?) file location","errorType":"validation","errorClass":"ConfigurationException","httpStatus":null,"severity":"error","filePath":"java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java","lineNumber":112,"sourceCode":"    myWizardContext.setProjectFileDirectory(getProjectFileDirectory());\n  }\n\n  @Override\n  public Icon getIcon() {\n    return myWizardContext.getStepIcon();\n  }\n\n  @Override\n  public boolean validate() throws ConfigurationException {\n    String name = myNamePathComponent.getNameValue();\n    if (name.isEmpty()) {\n      ApplicationNamesInfo info = ApplicationNamesInfo.getInstance();\n      throw new ConfigurationException(JavaUiBundle.message(\"prompt.new.project.file.name\", info.getFullProductName(), myWizardContext.getPresentationName()));\n    }\n\n    final String projectFileDirectory = getProjectFileDirectory();\n    if (projectFileDirectory.isEmpty()) {\n      throw new ConfigurationException(JavaUiBundle.message(\"prompt.enter.project.file.location\", myWizardContext.getPresentationName()));\n    }\n\n    final boolean shouldPromptCreation = myNamePathComponent.isPathChangedByUser();\n    String prefix = JavaUiBundle.message(\"directory.project.file.directory\", myWizardContext.getPresentationName());\n    if (!ProjectWizardUtil.createDirectoryIfNotExists(prefix, projectFileDirectory, shouldPromptCreation)) {\n      return false;\n    }\n\n    boolean shouldContinue = true;\n\n    final String path = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASED\n                        ? getProjectFileDirectory() + \"/\" + Project.DIRECTORY_STORE_FOLDER : getProjectFilePath();\n    final File projectFile = new File(path);\n    if (projectFile.exists()) {\n      final String title = myWizardContext.isCreatingNewProject()\n                           ? IdeCoreBundle.message(\"title.new.project\")\n                           : IdeCoreBundle.message(\"title.add.module\");\n      final String message = myWizardContext.isCreatingNewProject() && myWizardContext.getProjectStorageFormat() == DIRECTORY_BASED","sourceCodeStart":94,"sourceCodeEnd":130,"githubUrl":"https://github.com/JetBrains/intellij-community/blob/be881553f2a76ac8b4ea53950d93f0de78295c19/java/idea-ui/src/com/intellij/ide/util/projectWizard/ProjectNameStep.java#L94-L130","documentation":"Thrown by ProjectNameStep.validate() when the project file directory field is empty. The step needs a location to run ProjectWizardUtil.createDirectoryIfNotExists and to compute the .ipr or .idea path, so empty location aborts validation.","triggerScenarios":"Calling validate() on ProjectNameStep while getProjectFileDirectory() returns the empty string — path component cleared or WizardContext has no project file directory set.","commonSituations":"User erased the location line in the new-project step; wizard reopened after an earlier failure leaving the path field blank; programmatic use without wizardContext.setProjectFileDir().","solutions":["Fill in the project location field (absolute path) in the wizard step","Re-pick the parent directory via browse so the field is re-derived from the name","Programmatically, set context.setProjectFileDir(LocalFileSystem.getInstance().refreshAndFindFileByPath(baseDir)) equivalent before validate()"],"exampleFix":null,"handlingStrategy":"validation","validationCode":"if (step.getProjectFileDirectory().isEmpty()) {\n  wizardContext.setProjectFileDir(VfsUtilCore.pathToUrl(defaultBaseDir));\n}\nstep.validate();","typeGuard":null,"tryCatchPattern":null,"preventionTips":["Initialize the project file directory from the wizard's previously selected base path","Recompute the directory whenever the name changes, unless user customized it"],"tags":["wizard","project","path","validation","intellij"],"backgroundTag":null,"analyzedSha":"be881553f2a76ac8b4ea53950d93f0de78295c19","analyzedAt":"2026-08-14T14:13:06.425Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}