File parentDir = file.getParentFile();
if (!parentDir.exists()) {
parentDir.mkdirs();
}
IContainer folder = root.getContainerForLocation(new Path(parentDir.getPath()));
folder.refreshLocal(IResource.DEPTH_ZERO, null);
// Keep charset of component folder and HTML template in sync
if ("wo".equals(folder.getFileExtension()) && file.getPath().endsWith("html")
&& !encoding.equals(folder.getDefaultCharset(true))) {
System.out.println("AbstractEngine.run: setting encoding of " + folder + " to " + encoding);
folder.setDefaultCharset(encoding, null);