[Xtend] XtendComponent vs. XtendFacade [message #503205] |
Fri, 11 December 2009 06:52  |
Eclipse User |
|
|
|
Hi all,
i am using Xtend to execute in-place model transformations on GMF
diagram elements from Java code.
However, it seems like there is more than one way to execute Xtend from
Java.
1. Using an XtendComponent and the invoke method
2. Using an XtendFacade and the call method
Right now i'm using the XtendComponent and its working really fine, but
i wonder if there is any real difference between the two and a
recommended way of calling xtend?
The only thing i found so far, is that the XtendComponent can be used to
execute extension which are located somewhere in the file system by
using a "usual" path (like
/home/user/eclipse-runtime/.metadata/...../extension), which is not
possible when using the XtendFacades '::' paths. (?)
Maybe the XtendComponent is a bit more complicated, because i have to
use a workflow context to set the model elements as the extension
parameters where the facade allows the use of Object[].
Cheers,
Michael
|
|
|
|
|
|
|
|
Re: [Xtend] XtendComponent vs. XtendFacade [message #503753 is a reply to message #503682] |
Tue, 15 December 2009 05:56  |
Eclipse User |
|
|
|
Ahhh my fault, i tried to use the hasExtension(...) method before
registering my metamodel.
And because the facade loads extension files by using them as "imported
extensions" the facade itself had no extensions and i assumed that the
file could not be loaded :)
Thanks for your help
> hi,
>
> the same a with my relative path should work with absolute paths. so if
> you can find out file file uri of the state dir and concat it with the
> relative path of the extension file it should work.
|
|
|
Powered by
FUDForum. Page generated in 0.05488 seconds