result = template.createFromTemplate(targetFolder);
} else {
result = template.createFromTemplate(targetFolder, name);
}
SourceCookie sourcecookie = (SourceCookie)result.getCookie(SourceCookie.class);
if(sourcecookie == null) {
//what should we do if the template does not contain a class
return Collections.singleton(result);
}
//here we get the outer class
ClassElement aclasselement[] = sourcecookie.getSource().getClasses();
try {
sourcecookie.getSource().addImports(myData.getImports());
sourcecookie.getSource().removeClass(aclasselement[0]);
sourcecookie.getSource().addClass(myData.getOuterClass());
// OOTools.writeManifest(targetFolder.getPrimaryFile().getFileSystem().getSystemName(),myData.getPackage()+ "." + myData.getClassName());
//OOTools.writeBasicCode(targetFolder.getPrimaryFile().getFileSystem().getSystemName(),myData.getServiceName());
// Create a manifest.
OOTools.writeManifest(