boolean () { if (myLocationField == null) return true; String projectPath = myLocationField.getText().trim(); if (projectPath.isEmpty()) { setErrorText(IdeBundle.message("new.dir.project.error.empty")); return false; } try { Paths.get(projectPath); } catch (InvalidPathException e) { setErrorText(IdeBundle.message("new.dir.project.error.invalid")); return false; } if (myProjectGenerator != null) { ValidationResult validationResult = myProjectGenerator.validate(projectPath); if (!validationResult.isOk()) { setErrorText(validationResult.getErrorMessage()); return false; } ValidationInfo peerValidationResult = getPeer().validate(); if (peerValidationResult != null) { setErrorText(peerValidationResult.message); return false; } } setErrorText(null); return true; }