|
Re: Access EMF Operation in JET? [message #35770 is a reply to message #35469] |
Wed, 07 November 2007 13:39 |
Paul Elder Messages: 849 Registered: July 2009 |
Senior Member |
|
|
Roshan:
You have to choices:
1) If you just take control of the getOutputFolder() method in the EMF
generated code, $Root/@outputFolder will work as you expect. Under the
covers, JET is using EObject.eGet() which is calling getOutputFolder().
2) If you must use an EOperation, you'll have to write some Java code in
your template.
There isn't an easy, but there is a way, involving some Java:
<%jet imports="xxx.Root"%>
....
<someTag that sets the 'Root' variable/>
<%
Root root = (Root)context.getVariable("Root");
%>
<%= root.getOutputFolder() %>
Paul
"Roshan Soni" <roshan.soni1@gmail.com> wrote in message
news:23b6b9b97f87f4095f0faa36729b290a$1@www.eclipse.org...
> Hi,
>
> Is it possible to access the EOperation in my eCore in JET? I don't know
> much about XPath.
>
> For Example,
> I have a eCore Object called Root with a single attribute called
> outputFolder, I know in my JET template I can access it by using:
>
> <c:get select="$Root/@outputFolder" />
>
> Now, if I add an operation called getOutputFolder() to my eCore model and
> in my implementation class I do some logic and return a string. How would
> I access that operation in my JET Template?
>
|
|
|
Powered by
FUDForum. Page generated in 0.02943 seconds