{
throw new RuntimeException(e);
}
// TODO: show current values in options list
Configuration configuration = shell.promptChoiceTyped(
"Which property do you want to set? (default values shown)\n(Press Enter to return to shell)",
container.getConfigurations(), null);
if (configuration == null)
{
break;
}
ResourceFacet resources = project.getFacet(ResourceFacet.class);
FileResource<?> resource = (FileResource<?>) resources.getTestResourceFolder().getChild("arquillian.xml");
Node xml = null;
if (!resource.exists())
{
xml = createNewArquillianConfig();
} else
{
xml = XMLParser.parse(resource.getResourceInputStream());
}
// TODO show current value
String value = shell.prompt("What value do you want to assign to the " + configuration.getName() + " property?");
addPropertyToArquillianConfig(xml, container.getId(), configuration.getName(), value);
resource.setContents(XMLParser.toXMLString(xml));
}
}