@Override
public Result execute(UIExecutionContext context) throws Exception
{
GitIgnoreFacet facet = getSelectedProject(context).getFacet(GitIgnoreFacet.class);
GitIgnoreResource resource = gitIgnoreResource(context.getUIContext());
StringBuffer buffer = new StringBuffer();
for (String template : templates.getValue().split(" "))
{
String content = facet.contentOf(template);
buffer.append(content).append("\n");
}
String content = buffer.toString();
resource.setContents(content);
StringBuilder resultString = new StringBuilder();
resultString.append("Wrote to .gitignore. Content:").append("\n");
resultString.append(content).append("\n");