use of com.centurylink.mdw.plugin.codegen.meta.JavaCode in project mdw-designer by CenturyLinkCloud.
the class JavaSource method getDefaultContent.
@Override
public String getDefaultContent() {
try {
// initialize from template
String templateUri = Platform.getBundle(MdwPlugin.getPluginId()).getEntry("/").toString() + "/templates/source/JavaSource.javajet";
JETEmitter emitter = new JETEmitter(templateUri, getClass().getClassLoader());
emitter.addVariable(null, MdwPlugin.getPluginId());
Map<String, Object> map = new HashMap<String, Object>();
JavaCode javaCode = new JavaCode(getJavaPackageName(), getJavaClassName());
map.put("model", javaCode);
map.put("settings", MdwPlugin.getSettings());
return emitter.generate(new NullProgressMonitor(), new Object[] { map });
} catch (JETException ex) {
PluginMessages.uiError(ex, "Generate Java", getProject());
return null;
}
}
Aggregations