Menu

#13 Wrong code generation in NodeEditPart.javajet

open
nobody
5
2005-08-24
2005-08-24
Yann Azoury
No

NodeEditPart.javajet generates files which does not compile if the
node class is an interface because it tries to import and to use the
corresponding "<InterfaceName>Impl" class from the model which
does not exist (because it is an interface).

The problem appears in the getter:
public <%=genClass.getImportedClassName()%> get<%
=ecoreClass.getName()%>() {
return (<%=genClass.getImportedClassName()%>)
getENode().getEObject();
}

For an interface it should be:
public <%=genClass.getImportedInterfaceName()%> get<%
=ecoreClass.getName()%>() {
return (<%=genClass. getImportedInterfaceName()%>)
getENode().getEObject();
}

or something like that.

TIA

Discussion


Log in to post a comment.