Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » EMF » [JET]JETEmitter Problem when running workspace
[JET]JETEmitter Problem when running workspace [message #910485] Sun, 09 September 2012 16:29 Go to previous message
Yumin Zhou is currently offline 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.



 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic:EMF Ecore - EOpposite relation to self
Next Topic:[CDO] Validation problem markers
Goto Forum:
  


Current Time: Sat May 25 00:22:50 EDT 2013

Powered by FUDForum. Page generated in 0.01625 seconds