[JET2] Is output to file system location or string possible? [message #667705] |
Sun, 01 May 2011 14:22 |
Nigel Daniels Messages: 66 Registered: July 2009 |
Member |
|
|
Hi,
I am building an EMF/RCP app and want to add the capability to generate
files from the model being edited. To do this I have added a wizard that
lets me specify a file location then attempt to generate the file using
the following call:
HashMap variableMap = new HashMap();
variableMap.put("my.outputPath", relativePath.toString());
// Call the transform
IStatus status =
JET2Platform.runTransformOnObject("my.jet.allquestions", rootObject,
variableMap, new NullProgressMonitor());
The relative path is the path selected in the wizard. In my main.jet
file I tried to do:
<%@taglib prefix="ws" id="org.eclipse.jet.workspaceTags" %>
<%@taglib prefix="f" id="org.eclipse.jet.formatTags"%>
<%-- Main entry point for my.jet.allquestions --%>
<ws:file template="templates/KeyQuestions.xml.jet"
path="{$my.outputPath}"/>
It seems that the first part of the path is always handles as a
project. Is there any way to generate a file that just sits in the file
system? The RCP application I am using uses file:/path/file.ext rather
than a project and workspace to access the EMF instances being edited.
If the above is just not possible is there anyway to capture the output
of the transformation as a string so I can write out the file myself?
Thanks for any help,
Nigel
|
|
|
Powered by
FUDForum. Page generated in 0.02499 seconds