Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Modeling » M2T (model-to-text transformation) » Re: JET2 with oaw features
Re: JET2 with oaw features [message #4133] Sat, 17 February 2007 12:41 Go to next message
Eclipse User
Originally posted by: merks.ca.ibm.com

Hans,

JET2 has its own newsgroup now, so I've redirected your question there.


Hans Boerstra wrote:
> We have been using JET for a while and one of the things that I would
> suggest for improvement is the single generate method result. We recently
> evaluated oaw and one of the nice things about it is the ability to
> specialize templates using the class-hierarchy of the incoming model. In oaw
> it is imo easier to develop a generator using modules, because it supports
> aop and generalization in templates.
> I would like to build general templates kind of like methods of a general
> generator class and specialize these methods/templates for specific models.
> Are there any plans to support this kind of generator development in JET2 or
> am I missing a feature in the current solution that could provide the same
> functionality?
>
> Regards,
>
> Hans
>
>
>
Re: JET2 with oaw features [message #4203 is a reply to message #4133] Mon, 19 February 2007 13:30 Go to previous messageGo to next message
Paul Elder is currently offline Paul Elder
Messages: 849
Registered: July 2009
Senior Member
Hans:

Short answer: There are no current plans for this.

But the idea is intriguing. I haven't had enough time to think about this to
propose a design, but let me try to summarize what I think you're asking
for:

1) View templates as methods on a target class, rather than essentially
static methods.
2) Allow multiple templates per target class.
3) Like any good OO system, let subclasses inherit and/or override templates
defined on their super classes.

The hard part is in the details. XPand/oaw has the advantage of doing
template invocation via some service API:
serviceObject.invokeTemplate(targetObject, "methodName")
With JET/JET2, I could do a similar thing with the tag libraries (and have
an underlying Java invocation API), but I must also contend with Java users
who are currenting invoking 'generate' methods directly from Java. It sure
would be nice to have the templates appear as methods on the target class.
Perhaps this can be done with AOP - I haven't used it enough to know.

If you are interested in pursuing this idea, please continue this thread,
and eventually we can turn this into a formal enhancement.

Paul Elder
JET2 Lead
IBM Rational Software


"Ed Merks" <merks@ca.ibm.com> wrote in message
news:er6t60$5hr$3@utils.eclipse.org...
> Hans,
>
> JET2 has its own newsgroup now, so I've redirected your question there.
>
>
> Hans Boerstra wrote:
>> We have been using JET for a while and one of the things that I would
>> suggest for improvement is the single generate method result. We recently
>> evaluated oaw and one of the nice things about it is the ability to
>> specialize templates using the class-hierarchy of the incoming model. In
>> oaw it is imo easier to develop a generator using modules, because it
>> supports aop and generalization in templates.
>> I would like to build general templates kind of like methods of a general
>> generator class and specialize these methods/templates for specific
>> models.
>> Are there any plans to support this kind of generator development in JET2
>> or am I missing a feature in the current solution that could provide the
>> same functionality?
>>
>> Regards,
>>
>> Hans
>>
>>
Re: JET2 with oaw features [message #4274 is a reply to message #4203] Mon, 19 February 2007 19:36 Go to previous message
Eclipse User
Originally posted by: hansboerstra.hotmail.com

Paul,

I don't know enough of the internals of JET2 to suggest a feasible solution,
but you summarized my request perfectly. My first naive thought for JET1 was
another
attribute like the skeleton could define the method target, but I quickly
realized that was not going to be very clean.
For JET2 I suppose it could be easier because of the mvc pattern and
extensibility already built in,
but as I said I am not confident enough to suggest a solution path.

I'd be happy to participate in discussing alternatives.

Regards,

Hans


"Paul Elder" <pelder@ca.ibm.com> wrote in message
news:erc8pt$k7g$1@utils.eclipse.org...
> Hans:
>
> Short answer: There are no current plans for this.
>
> But the idea is intriguing. I haven't had enough time to think about this
> to propose a design, but let me try to summarize what I think you're
> asking for:
>
> 1) View templates as methods on a target class, rather than essentially
> static methods.
> 2) Allow multiple templates per target class.
> 3) Like any good OO system, let subclasses inherit and/or override
> templates defined on their super classes.
>
> The hard part is in the details. XPand/oaw has the advantage of doing
> template invocation via some service API:
> serviceObject.invokeTemplate(targetObject, "methodName")
> With JET/JET2, I could do a similar thing with the tag libraries (and have
> an underlying Java invocation API), but I must also contend with Java
> users who are currenting invoking 'generate' methods directly from Java.
> It sure would be nice to have the templates appear as methods on the
> target class. Perhaps this can be done with AOP - I haven't used it enough
> to know.
>
> If you are interested in pursuing this idea, please continue this thread,
> and eventually we can turn this into a formal enhancement.
>
> Paul Elder
> JET2 Lead
> IBM Rational Software
>
>
> "Ed Merks" <merks@ca.ibm.com> wrote in message
> news:er6t60$5hr$3@utils.eclipse.org...
>> Hans,
>>
>> JET2 has its own newsgroup now, so I've redirected your question there.
>>
>>
>> Hans Boerstra wrote:
>>> We have been using JET for a while and one of the things that I would
>>> suggest for improvement is the single generate method result. We
>>> recently evaluated oaw and one of the nice things about it is the
>>> ability to specialize templates using the class-hierarchy of the
>>> incoming model. In oaw it is imo easier to develop a generator using
>>> modules, because it supports aop and generalization in templates.
>>> I would like to build general templates kind of like methods of a
>>> general generator class and specialize these methods/templates for
>>> specific models.
>>> Are there any plans to support this kind of generator development in
>>> JET2 or am I missing a feature in the current solution that could
>>> provide the same functionality?
>>>
>>> Regards,
>>>
>>> Hans
>>>
>>>
>
>
Previous Topic:[Announce] EclipseCon 2007 Registration
Next Topic:MOFScript and the M2T project
Goto Forum:
  


Current Time: Thu Oct 30 23:51:39 GMT 2014

Powered by FUDForum. Page generated in 0.14080 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software