Jet2 using Jet2Platform [message #59554] |
Tue, 21 April 2009 06:49  |
Eclipse User |
|
|
|
Originally posted by: johannes.nel.gmail.com
Hi,
I execute a Jet transform successfully from my plugin, but the files do
not get written to disk.
I execute the the following code from a wizard finish event,
IRunnableWithProgress op = new IRunnableWithProgress()
{
public void run(IProgressMonitor monitor) throws
InvocationTargetException {
try
{
IStatus status =
JET2Platform.runTransformOnString("some.package.SimpleTransform ","<rxml/>",monitor);
System.out.println(status.getMessage());
}
finally
{
monitor.done();
}
}
};
try
{
getContainer().run(true, true, op);
}
catch(Exception e)
{
and I get an "execution successful" status back.
This same transformation works when I run it as a Jet Transformation.
Any hints would be handy, this has become a major hold up for me now.
TIA
JOhan
|
|
|
|
Re: Jet2 using Jet2Platform [message #59820 is a reply to message #59604] |
Thu, 23 April 2009 06:25   |
Eclipse User |
|
|
|
Originally posted by: johannes.nel.gmail.com
Hi Paul
Paul Elder wrote:
> Johannes:
>
> You don't say what kind of model your transformation is working with.
>
> The runTransformOnString variant you are using assumes the input is XML,
> and tries to parse it as such. If your transformation is the workspace
> is loading the model differently (say via EMF
> serialization/deserialization), then your XPath expressions may be
> silently returning nothing, and your transformation may be silently
> doing nothing.
>
> Some questions:
>
> 1) how did you create the input model/file that works correctly? Is it
> via EMF?
>
Its xml which I build and is valid.
> 2) If unsure of #1, how about pasting the first few lines into a reply -
> that will quickly sort things out...
>
> 3) thinking ahead. How are you producing the input your are trying to
> pass to JET2Platform.runTransformOnString() ? Do you, by any chance,
> have an EMF generated API for it? If so, we'll take a look at
> runTransformOnObject, where you pass in an emf Resource object
> containing your input.
this is my long term goal, but currently I am linking an existing swt
wizard (create new class type) to output the string (via an adaptor),
which I then pass to the transform.
>
>
> Paul
>
I added all the code that is used already.
Its really weird, but it just does not output any files when I invoke it
from within another plugin, could there be some stupid permissions error?
Johan
|
|
|
|
Re: Jet2 using Jet2Platform [message #59865 is a reply to message #59843] |
Thu, 23 April 2009 07:52  |
Eclipse User |
|
|
|
Originally posted by: johannes.nel.gmail.com
Paul Elder wrote:
> Johannes Nel wrote:
>
>> I added all the code that is used already.
>> Its really weird, but it just does not output any files when I invoke
>> it from within another plugin, could there be some stupid permissions
>> error?
>
>> Johan
>
> Sounds like its time for some serious debugging. What version of Eclipse
> are you using, and what OS are you running on?
>
> Also, the JET new project wizard uses pretty much the same technique.
> Does that work for you?
>
> Paul
>
Yes, running the same file as a JET transform works, I am running OS X
10.5.6 and I have debugged already and the transforms are writing into
JetWriter.
My eclipse build is 3.4 ganymede modeling edition.
Time for a fresh build of that me thinks.
|
|
|
Powered by
FUDForum. Page generated in 0.26143 seconds