| [JET]JETEmitter Problem when running workspace [message #910485] |
Sun, 09 September 2012 16:29  |
Yumin Zhou Messages: 21 Registered: July 2012 |
Junior Member |
|
|
Hello experts,
I want to generate code from one xml based on EMF with JETEmitter in a new file wizard. I was able to generate helloWorld.txtjet after running the new wizard. But when I tried to generate the xml file information, I got blank file. One more thing, when I used the java generated code directly, it worked.
Here is my generate java code:
private void generate(DocumentRoot documentRoot, IProgressMonitor monitor) throws JETException{
String pluginId = "jet.project";
String base = Platform.getBundle(pluginId).getEntry("/").toString();
String relativeUri = "templates/generate.txtjet";
JETEmitter emitter = new JETEmitter(base + relativeUri, getClass().getClassLoader());
IProgressMonitor sub = new SubProgressMonitor(monitor, 1);
String result = emitter.generate(sub, new Object[] {documentRoot});
monitor.worked(1);
}
Has somebody any idea about it? It seems that it cannot load the documentRoot object after pressing the finish button.
|
|
|