_page.getRuntime().register(folder, false, null, null, null, template.getProperties());
} else {
_page.getRuntime().register(folder, true, _page.getDatabaseKey(), _page.getDatabaseTitle(), _page.getDomain(), template.getProperties());
}
WGADesignStructureHelper helper = new WGADesignStructureHelper(folder);
try {
// select new created design in packages explorer, resource navigator & project explorer
if(template.getName().equals("empty")){
String wgaDistributionName = runtime.getConfiguration().getWgaDistribution();
WGADeployment wgaDeployment = WGADesignerPlugin.getDefault().getWGADeploymentManager().getDeployment(wgaDistributionName);
WGADesignConfigurationModel configModel = helper.createModel();
VersionCompliance vc = WGADesignStructureHelper.wgaVersionToVersionCompliance(wgaDeployment.getWGAVersion());
if(vc!=null){
configModel.setVersionCompliance(vc);
configModel.saveChanges();
}
}
WorkbenchUtils.setNavigationViewSelection(new SingleStructuredSelection(helper.getSyncInfo()));
WorkbenchUtils.setNavigationViewSelection(new SingleStructuredSelection(folder));
} catch (Exception e) {
}
return true;