void (@Nullable String fileName) { try { Properties properties = myAttrPanel.getProperties(myDefaultProperties); for (FileTemplate child : myTemplate.getChildren()) { createFile(child.getFileName(), child, properties); } String mainFileName; String templateFileName = myTemplate.getFileName(); String propertiesFileName = properties.getProperty(FileTemplate.ATTRIBUTE_FILE_NAME); if (!StringUtil.isEmpty(templateFileName)) { mainFileName = templateFileName; } else if (!StringUtil.isEmpty(propertiesFileName)) { mainFileName = propertiesFileName; } else { mainFileName = fileName; } myCreatedElement = createFile(mainFileName, myTemplate, properties); } catch (Exception e) { showErrorDialog(e); } }