IFile props = folder.getFile(DesignTemplate.PROPERTIES_FILENAME);
if (props.exists()) {
props.delete(true, new NullProgressMonitor());
}
DesignDefinition syncinfo = new DesignDefinition();
syncinfo.setDesignKey(designKey);
syncinfo.setFileEncoding(DesignDefinition.FILEENCODING_CSCONFIG_DEFINED);
try {
syncinfo.write(new File(folder.getLocation().toFile(), DesignDirectory.DESIGN_DEFINITION_FILE));
} catch (IOException e) {
WGADesignerPlugin.getDefault().logError("cound not create design definition", e);
}
folder.refreshLocal(IResource.DEPTH_INFINITE, null);
new WGADesignStructureHelper(folder).enforceDesignEncoding();