Source:
<code><START> public WorkspaceConfigImpl devFileToWorkspaceConfig( <END> Devfile devfile, RecipeFileContentProvider recipeFileContentProvider) throws DevfileFormatException, DevfileRecipeFormatException { validateCurrentVersion(devfile); WorkspaceConfigImpl config = new WorkspaceConfigImpl(); config.setName(devfile.getName()); List<ProjectConfigImpl> projects = new ArrayList<>(); devfile.getProjects().forEach(project -> projects.add(devProjectToProjectConfig(project))); config.setProjects(projects); Map<String, String> attributes = new HashMap<>(); StringJoiner pluginsStringJoiner = new StringJoiner(","); StringJoiner toolIdToNameMappingStringJoiner = new StringJoiner(","); for (Tool tool : devfile.getTools()) { switch (tool.getType()) { case EDITOR_TOOL_TYPE: attributes.put(WORKSPACE_TOOLING_EDITOR_ATTRIBUTE, tool.getId()); break; case PLUGIN_TOOL_TYPE: pluginsStringJoiner.add(tool.getId()); break; case KUBERNETES_TOOL_TYPE: case OPENSHIFT_TOOL_TYPE: try { EnvironmentImpl environment = devfileEnvironmentFactory.createEnvironment(tool, recipeFileContentProvider); final String environmentName = tool.getName(); config.setDefaultEnv(environmentName); config.setEnvironments(singletonMap(environmentName, environment)); } catch (IllegalArgumentException e) { throw new DevfileFormatException(e.getMessage()); } continue; default: throw new DevfileFormatException( format("Unsupported tool %s type provided: %s", tool.getName(), tool.getType())); } toolIdToNameMappingStringJoiner.add(tool.getId() + "=" + tool.getName()); } if (pluginsStringJoiner.length() > 0) { attributes.put(WORKSPACE_TOOLING_PLUGINS_ATTRIBUTE, pluginsStringJoiner.toString()); } if (toolIdToNameMappingStringJoiner.length() > 0) { attributes.put(ALIASES_WORKSPACE_ATTRIBUTE_NAME, toolIdToNameMappingStringJoiner.toString()); } config.setAttributes(attributes); List<CommandImpl> commands = new ArrayList<>(); devfile .getCommands() .forEach(command -> commands.addAll(devCommandToCommandImpls(devfile, command))); config.setCommands(commands); return config; }</code><technical_language>Please add java doc</technical_language>

Target:
public WorkspaceConfigImpl devFileToWorkspaceConfig( Devfile devfile, RecipeFileContentProvider recipeFileContentProvider) throws DevfileException { validateCurrentVersion(devfile); WorkspaceConfigImpl config = new WorkspaceConfigImpl(); config.setName(devfile.getName()); List<ProjectConfigImpl> projects = new ArrayList<>(); devfile.getProjects().forEach(project -> projects.add(devProjectToProjectConfig(project))); config.setProjects(projects); Map<String, String> attributes = new HashMap<>(); StringJoiner pluginsStringJoiner = new StringJoiner(","); StringJoiner toolIdToNameMappingStringJoiner = new StringJoiner(","); for (Tool tool : devfile.getTools()) { switch (tool.getType()) { case EDITOR_TOOL_TYPE: attributes.put(WORKSPACE_TOOLING_EDITOR_ATTRIBUTE, tool.getId()); break; case PLUGIN_TOOL_TYPE: pluginsStringJoiner.add(tool.getId()); break; case KUBERNETES_TOOL_TYPE: case OPENSHIFT_TOOL_TYPE: try { EnvironmentImpl environment = devfileEnvironmentFactory.createEnvironment(tool, recipeFileContentProvider); final String environmentName = tool.getName(); config.setDefaultEnv(environmentName); config.setEnvironments(singletonMap(environmentName, environment)); } catch (IllegalArgumentException e) { throw new DevfileFormatException(e.getMessage(), e); } continue; default: throw new DevfileFormatException( format("Unsupported tool %s type provided: %s", tool.getName(), tool.getType())); } toolIdToNameMappingStringJoiner.add(tool.getId() + "=" + tool.getName()); } if (pluginsStringJoiner.length() > 0) { attributes.put(WORKSPACE_TOOLING_PLUGINS_ATTRIBUTE, pluginsStringJoiner.toString()); } if (toolIdToNameMappingStringJoiner.length() > 0) { attributes.put(ALIASES_WORKSPACE_ATTRIBUTE_NAME, toolIdToNameMappingStringJoiner.toString()); } config.setAttributes(attributes); List<CommandImpl> commands = new ArrayList<>(); devfile .getCommands() .forEach(command -> commands.addAll(devCommandToCommandImpls(devfile, command))); config.setCommands(commands); return config; }