EMF and Java Templates [message #991789] |
Thu, 20 December 2012 02:53  |
Eclipse User |
|
|
|
Hi,
Is any way to generate Java Templates with EMF?
some interfaces like:
__________________ ___________________
| ITemplate<T> | | <T> |
|------------------|-------get---->|-------------------|
| | 0..* | |
|__________________| |___________________|
to generate:
public interface ITemplate<T>{
public List<T> get();
}
And when some class is inherited from this interface I should point a class name of T.
The reason is that in my EcorDiagram I have some repeated patterns of classes and it would be better collapse them to java templates.
Is any way to do this in current version of EMF? if no, is any futher plans for realising that?
Thanks,
Dmitriy.
|
|
|
|
|
|
Re: EMF and Java Templates [message #992835 is a reply to message #992241] |
Sat, 22 December 2012 14:40  |
Eclipse User |
|
|
|
Dmitriy,
There are open bugzillas that we don't constrain the children in a way
that takes generics into account, i.e., this feature in the erased model
is of type EObject, so we allow any EObject, which in a RootClass
instance, isn't restricted enough. Sorry, I've not had time to address
this yet...
On 20/12/2012 11:28 PM, Dmitriy Shishkin wrote:
> With java generics the default editor behaves strangely.
> Was it bad idea to encapsulate containment reference to generic?
>
>
>
>
> Thanks,
> Dmitriy
|
|
|
Powered by
FUDForum. Page generated in 0.26360 seconds